Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp500869ybt; Mon, 6 Jul 2020 14:55:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRcVJtoOoqRS9rlrDk+5YfJFlchIgAcqXHmC0AxlVquob3TUQnR4NwqSCtKUj3c3OqjJRM X-Received: by 2002:a17:906:2799:: with SMTP id j25mr31686548ejc.466.1594072515469; Mon, 06 Jul 2020 14:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594072515; cv=none; d=google.com; s=arc-20160816; b=jD83454iBOSIaOjWJykCq2l4I+AOsVJ0SCoYxgzQ7nRDQvu09DuaeWYq1vhwMFKm1M tZeOt32grNdYfQPcBVAOmPCCTUREVY1Qmc/xnHchLpXR7r+m4lWxG8oXND4K0M6gYdUj xGvq4m2Dw4sp/DUdz0TyczZ8rAkC5PUwfVhsxgSg5asMade0/2VF9IwlYaTVTFn1J2SC O1bkXdYVObpuzLH2UcPA80wRdaS62SqMHsJ+rku9ynyDGFJQD5HL7jaMaKCqWEbFYq4x IOzNTOtu5GtSQqY8x/yOuVuaDz5q2y2rOJ+a4owBSkS8nMN/ppSIgb8Th4g2tXT8Hqsc 8evA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to :references:in-reply-to:message-id:date:subject:from:dkim-signature; bh=xRvXleIsFrOUoVEFb2+EqS1sO8vNP09eztv2NUch3P4=; b=THNQaZKS4TIdQpVkOWalbvQeUurcegpTVKqk41NUWuqe3g4jeaNSxqIFStzWxnH7VD sp4CAgXWZ4a0qDUpNx1VgI6uYyotuH7zB6qBzTceTjqKlkoOBnEUoXdhJGNLOo2Vbp1r Hgjsn3WU928DwLcAYntnIe7Q9dAQkO0fb+OJFAF1/5ptlzjLntKlcvEjfiMY/osono9Y NYbQetLqnXwgFyT5/z5PSuj/7LV10TW/k9VojsuZs5c0o+VdXxupjzBVhPVGO/PNLzMd 2mC9t8CCBerXo1mKiPGyC0ljvHNWHmF1rMU63w1yLG3RapgJ1GXkTqH4Fv6kGXzfiw/f v11Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=001 header.b=S1nVBMGm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si13012173ejs.633.2020.07.06.14.54.52; Mon, 06 Jul 2020 14:55:15 -0700 (PDT) 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; dkim=pass header.i=@kwiboo.se header.s=001 header.b=S1nVBMGm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727831AbgGFVyk (ORCPT + 99 others); Mon, 6 Jul 2020 17:54:40 -0400 Received: from o1.b.az.sendgrid.net ([208.117.55.133]:43226 "EHLO o1.b.az.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbgGFVyj (ORCPT ); Mon, 6 Jul 2020 17:54:39 -0400 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=xRvXleIsFrOUoVEFb2+EqS1sO8vNP09eztv2NUch3P4=; b=S1nVBMGmkIVtJMfuJDtwUDlmFM36++kjO/Sbbw3SBF8V8MLUQ0Wa2NB0F8t1ZP48hTSJ JisXget+1VHsk17FOWWgMnzDtNWN/XDp5tbZ99jItemPZevfJGfHzlI2LtJbd5FtUnKbPi Gy8qguUJHcFQ6DKTvydNbrTVCU1K60Pos= Received: by filterdrecv-p3iad2-5b55dcd864-5dqzw with SMTP id filterdrecv-p3iad2-5b55dcd864-5dqzw-19-5F039D9E-D 2020-07-06 21:54:38.266225202 +0000 UTC m=+881111.140990039 Received: from bionic.localdomain (unknown) by ismtpd0008p1lon1.sendgrid.net (SG) with ESMTP id RkkRZ2UwQbil5L0N__xREg Mon, 06 Jul 2020 21:54:38.020 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 12/12] media: rkvdec: h264: Support profile and level controls Date: Mon, 06 Jul 2020 21:54:38 +0000 (UTC) Message-Id: <20200706215430.22859-13-jonas@kwiboo.se> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706215430.22859-1-jonas@kwiboo.se> References: <20200701215616.30874-1-jonas@kwiboo.se> <20200706215430.22859-1-jonas@kwiboo.se> X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h1vz2=2F=2Fhk378RB7Ov?= =?us-ascii?Q?uU+Unwr2NFFYBDDmKvAj6aOu7u4GSrColBrbVrh?= =?us-ascii?Q?TX5qJmcTnPslZyASlbiJvcXj2p9JfMzjX5zyH7B?= =?us-ascii?Q?0qES3lj+vbCZ=2FytItQv96DZpHDFc2HO8fogwtUg?= =?us-ascii?Q?2NvF6lBgEJZfMbfOUnDzH1bXxqE8=2FnGqDvpUgEv?= =?us-ascii?Q?HIgT=2FKPegL9dEePjyLfHA=3D=3D?= To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Jonas Karlman , Ezequiel Garcia , Hans Verkuil , Nicolas Dufresne , Tomasz Figa , Alexandre Courbot Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Signed-off-by: Jonas Karlman Reviewed-by: Ezequiel Garcia --- Changes in v2: - Moved to end - Collect r-b tag --- 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 4faee9262392..b21031535330 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -144,6 +144,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_422, + .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 = { -- 2.17.1