Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1477665pxb; Fri, 13 Nov 2020 13:53:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxOMSHg+aAEGb+owJozUXyaSeZ+uQ9bC1brGn56zaeFzI3XB/LLMDIxVyO7DVzAHFNxLvW X-Received: by 2002:a50:f104:: with SMTP id w4mr4542416edl.381.1605304434114; Fri, 13 Nov 2020 13:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605304434; cv=none; d=google.com; s=arc-20160816; b=u38lokLpUP6Doc81KghTRa1ITcg9s2pEmCr3AMK4QTTkKxSVjd4uhzwbOLezWkAi/y P15I7EPDMsk0+e0TAdHmYBqTDgtLa2PyUEpv5cu8uzNWR3/+TVcuCbbAvpyf+R5daBON qhq4/Z/CpHWmYEBEU1VjCk+bLEukZpEyYFCha/RhmSG6IA4Q/1SVr0hVG4RkXsOe44yI BsPmUJii61ylLbrGxnsx5MmmdHuoE+RWWP1u+y6yH5HbjrPKRrQRdiB7XVeRU1nM2cP4 1td1/9cyypPy8i/JVHQkoxG5ybr846XltxzEFAMvQFK1hWOqd5+8OVJByKQaiBuMOB/l v3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=c9/w6OFu06BP8MPVIFTE3Ej7ka5C1+nIXjUYroFS5fM=; b=NUPOisLS8UQtD0bFCirc5Hi7mBeWeeZ+xoRhmA/pj31Fu4R8V9T/pcVmS4rHJgKXFu 6J5zptuTiTCbWAJ7uNfl51dvap+xLxsXRwlrEaHvNrH3BJYMh4KcpGWzsYvUjDlKwoZA MI4q9vz2kTIi7L3ExP3OzKoGs70N4uVuzRF7SL4lee6zDPWNIWlIyRyrIuKXv9LbWVwg skx00QmUPjobmqSSCMt0gQEJCClmV79ra6sgwCjoFxUhCFbWcNmTBzKGVSc2vhu1o4P1 oglKVwdJ5oZywGrJniEsBxiKeVOgkXdmvxn2Nzc2p/CDC0WrgtWdtB8kU2XkLLfo4s3Y 5a8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh13si6927724ejb.360.2020.11.13.13.53.31; Fri, 13 Nov 2020 13:53:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726319AbgKMVvt (ORCPT + 99 others); Fri, 13 Nov 2020 16:51:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgKMVvq (ORCPT ); Fri, 13 Nov 2020 16:51:46 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D2AC0613D1; Fri, 13 Nov 2020 13:51:46 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 661831F46BB5 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com, Jonas Karlman , Hans Verkuil , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec , Ezequiel Garcia Subject: [PATCH v2 2/9] media: cedrus: h264: Support profile and level controls Date: Fri, 13 Nov 2020 18:51:14 -0300 Message-Id: <20201113215121.505173-3-ezequiel@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201113215121.505173-1-ezequiel@collabora.com> References: <20201113215121.505173-1-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cedrus supports H.264 profiles from Baseline to High, up to Level 5.1, except for the Extended profile Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE and V4L2_CID_MPEG_VIDEO_H264_LEVEL so that userspace can query the driver for the supported profiles and levels. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/sunxi/cedrus/cedrus.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index 9a102b7c1bb9..8b0e97752d27 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -103,6 +103,27 @@ static const struct cedrus_control cedrus_controls[] = { .codec = CEDRUS_CODEC_H264, .required = false, }, + { + .cfg = { + .id = V4L2_CID_MPEG_VIDEO_H264_PROFILE, + .min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE, + .def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN, + .max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, + .menu_skip_mask = + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED), + }, + .codec = CEDRUS_CODEC_H264, + .required = false, + }, + { + .cfg = { + .id = V4L2_CID_MPEG_VIDEO_H264_LEVEL, + .min = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, + .max = V4L2_MPEG_VIDEO_H264_LEVEL_5_1, + }, + .codec = CEDRUS_CODEC_H264, + .required = false, + }, { .cfg = { .id = V4L2_CID_MPEG_VIDEO_HEVC_SPS, -- 2.27.0