Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp196326ybt; Tue, 7 Jul 2020 20:19:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxToBXljH4Tm2469Qt0/i1/EnBjGLxqhujy4xMLit7+YQwia3r65+Uff5MDQDBe5h7AbUEA X-Received: by 2002:a17:907:41dc:: with SMTP id og20mr26839660ejb.183.1594178391018; Tue, 07 Jul 2020 20:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594178391; cv=none; d=google.com; s=arc-20160816; b=HKT/obvQ1zZ9kKCkig2FWdpCFt3FXLPviuzByg3tVoI7mw5JfpdtEByFzKJf6KW7ap JsCAe0np3HHxIYtqUWU5LNp9FO0j2nkbQxD2rqEC6kJIucxednayRfkw46vY4sCHNf/W jR926oouD6MstjT5ASLxrsVNTVIjb89jaO7DFys3GYxgJJT6W1PVQnoXqCauGD7vA2tJ oozLECUEu3ldzDUKtyADT4nJHEjHIhE46x2tgMQpi2jFPr/kuAmQSmgv6388D0/YbeEE aJIXnHXXenbWhasC77JZMfDiNfZFTazF3+xvQIuPIO9ZKcxaHJFlRJw4fPm3+5jJkH27 EOUw== 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:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=8TGa4NU5b1qfa36tm+jgvidRspnfyYMxuj4Rv/CVIP4=; b=KY7aWIvxzX+GJRVC5ixRr+JNA4iHJ0GIHE6ogi4++K5jp/RNVITuoC9x+6aufKJbe7 AMLV3pMogOyUC0PZKCDsXgylOtr18nHkmBXpwPwzKUNoN8g+Tl0VLB2LB9viJBb8mu1s uetnmlWIlaKKM3CpPJOAktACW3WcuaDaEFufQDQ+tGOKBuaHBcQhsgeod58ZkgoWC1JG N3aPfITdCIzYdfSlTHWXm/L/zWToFvQMZn8fpCToSGyebHuBHU6mz1LcFg7QGOig45WI UPG/rOGbYI5Y/ZcNohj6sHNAXWkktm/qEqa/5Iq53H3K5zfGj/+W4Js+jSHXz10lIL2m PLdA== 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 r24si8138310edx.94.2020.07.07.20.19.28; Tue, 07 Jul 2020 20:19:51 -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; 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 S1728768AbgGHDTR (ORCPT + 99 others); Tue, 7 Jul 2020 23:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728335AbgGHDTQ (ORCPT ); Tue, 7 Jul 2020 23:19:16 -0400 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 889C8C061755; Tue, 7 Jul 2020 20:19:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id C13EA2A4F7D Message-ID: <97a4c51aa5cfcdef7f4c96fcf84f85bd7c8b3729.camel@collabora.com> Subject: Re: [PATCH v2 12/12] media: rkvdec: h264: Support profile and level controls From: Ezequiel Garcia To: Jonas Karlman , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Hans Verkuil , Nicolas Dufresne , Tomasz Figa , Alexandre Courbot Date: Wed, 08 Jul 2020 00:19:05 -0300 In-Reply-To: <20200706215430.22859-13-jonas@kwiboo.se> References: <20200701215616.30874-1-jonas@kwiboo.se> <20200706215430.22859-1-jonas@kwiboo.se> <20200706215430.22859-13-jonas@kwiboo.se> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-07-06 at 21:54 +0000, Jonas Karlman wrote: > 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, Nicolas recently pointed out to me that our drivers can't support ASO/FMO baseline features, and so seems we need to leave baseline out. (Applies to Hantro as well). Thanks, Ezequiel > + .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 = {