From patchwork Wed Jul 1 21:56:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11637369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7453692A for ; Wed, 1 Jul 2020 21:56:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B4B22077D for ; Wed, 1 Jul 2020 21:56:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ky0Y9RGQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="drxafeTD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B4B22077D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:References:In-Reply-To:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OD/x+H7r+xI+GD/rsiLLfby9+F+oFePmBj12+m9YKM0=; b=Ky0Y9RGQ5RXq1Tn5EZHwYQp0zR 76So5UxF99GW00rsQaIR9aIfR5FPm+780Ang+wYEBx3tdaFHG8wFnZo/7t1acNXqymEo9bJe8eqLF Gy/g5q9Iy+ALfixyCIB3KgBrdUgZtIZGTuErn03u1+5zu49tLFXsLfHsDrz7BQu6IMFDgYOccvcDs ekXnPINdfwZCx2qu/d02sCX8o+LlOrFfvZApPCA6l3NlO/CimsYFNKjel/l6k+CZSWEYzl+zK2+LC XZJarzOSPHP/JxqiBkeDX98n0IBKVzrB5cKl3APad5Rue7wEiFffVZIv/CmG2X4mCvmB0TsbbX4Z4 JlZ35Bwg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqkiS-00083s-JC; Wed, 01 Jul 2020 21:56:28 +0000 Received: from o1.b.az.sendgrid.net ([208.117.55.133]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqkiO-0007yx-4u for linux-rockchip@lists.infradead.org; Wed, 01 Jul 2020 21:56:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:to:cc:content-type: content-transfer-encoding; s=001; bh=XmtEOL5z29rJknfytBNHORtHb2Nm7tVfN/Y1gB5MiiA=; b=drxafeTDsC5oSNDY7yjcvf8tqadri3sgtKEdqyF3p+S0/tTU9Eu6m5kaDtCJ0NkGYPzN r6L9AZt8GvVhnK/6/E9OFb1+J2kckUVk8qz3wY9LsDk5UPOwnCbELWTi0eBWHNJJB+zv7C D5cG0ySxvywuHWZEt0onh+54SG2I3xmN4= Received: by filterdrecv-p3iad2-5b55dcd864-xvj6x with SMTP id filterdrecv-p3iad2-5b55dcd864-xvj6x-20-5EFD0684-32 2020-07-01 21:56:20.910063557 +0000 UTC m=+449225.017700609 Received: from bionic.localdomain (unknown) by ismtpd0001p1lon1.sendgrid.net (SG) with ESMTP id ueJzYseqQZu-NjifuuudoQ Wed, 01 Jul 2020 21:56:20.653 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 1/9] media: rkvdec: h264: Support profile and level controls Date: Wed, 01 Jul 2020 21:56:20 +0000 (UTC) Message-Id: <20200701215616.30874-2-jonas@kwiboo.se> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701215616.30874-1-jonas@kwiboo.se> References: <20200701215616.30874-1-jonas@kwiboo.se> X-SG-EID: TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxAfZekEeQsTe+RrMu3cja6a0h8KQq7f245XMvoJBQWbKyKxTBiTpCKA0QKio1XYIlmibAU6xWacJ7dcJg44E7Yr06rCX7G/4OP/eSiJ2W/9yL6FZahkZ8+Tl0SIUvGIVcZh/hHiRN4y4COl2GGchXuYMbrdBOnI9/UBSxMvno1jhZXa/DY66e9IRDXyaZEekbxZQNV056fvP7NOEBDmWolFy2w== To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_175624_281464_8C3DEA92 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [208.117.55.133 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [208.117.55.133 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Courbot , Jonas Karlman , Tomasz Figa , Hans Verkuil , Nicolas Dufresne , Ezequiel Garcia MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org The Rockchip Video Decoder used in RK3399 supports H.264 profiles from Baseline to High 4:2:2 up to Level 5.1, except for the Extended profile. Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE and the V4L2_CID_MPEG_VIDEO_H264_LEVEL control, so that userspace can query the driver for the list of supported profiles and level. In current state only Baseline to High profile is supported by the driver. Signed-off-by: Jonas Karlman Reviewed-by: Ezequiel Garcia --- drivers/staging/media/rkvdec/rkvdec.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 0f81b47792f6..b1de55aa6535 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -94,6 +94,19 @@ static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = { .cfg.def = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, .cfg.max = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, }, + { + .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PROFILE, + .cfg.min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE, + .cfg.max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, + .cfg.menu_skip_mask = + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED), + .cfg.def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN, + }, + { + .cfg.id = V4L2_CID_MPEG_VIDEO_H264_LEVEL, + .cfg.min = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, + .cfg.max = V4L2_MPEG_VIDEO_H264_LEVEL_5_1, + }, }; static const struct rkvdec_ctrls rkvdec_h264_ctrls = {