Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp26243pxa; Tue, 18 Aug 2020 14:39:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrx1B8gesYhu2am5hzImHwCx1/ieY9EhtnTKN8AhtKZiL5YcS01/xA0WZ6DLkYg28YGyt0 X-Received: by 2002:a17:906:2b44:: with SMTP id b4mr21844605ejg.406.1597786797219; Tue, 18 Aug 2020 14:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597786797; cv=none; d=google.com; s=arc-20160816; b=a1kcwy6LpAlTH1vlCknA51xIaH4W5aLtlO0Zp4XleiejTVKmUqBF/Tt0gkD8m9uIuI BFDcqdssWpVBhfkBGsX1hOVOPdvsO6DgG13g5UMzvJ+qrScqrVexR9eMC7JpcWJnidPS Wb6Py5gJCxOHA2ztXqjYr18Q8qk6j79MPOsFPXJB9pDvuGjnpvpNIXInnGDwmlUG93Yg L1vy+A7nPaZJIgXkJlBP2sGIRc0CQqeWL2je73pqrzdBb3Hl4NIeInwu9gwHogpmf5/s J3pf3hHMIlUMtdVkS2ffB0MaBwSYrn2YypOCtKfJohUP//QrKLyFSAEZ/Ts4YWJs9wcy G6ZA== 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=ybOhs8+dx9P2iFwI368SaqDm3zdxTEc5V/150xICHKY=; b=orDwWe5TDlvc4b37IVCh+Uix1Zh3yDy2toyYSno7sZwX40oRK5RPOSO6HNKStdCjDT DeXyILhb2JYPXEtxoaANC/o7tc90eDGd42CdculGg50wBkNIm8v7TncTRKxz/MJe5skU TuXU5erlzdqgx+9y3D1cmAmTFwC8/5pAMpl0LpK5BwLoRhNANGGmSvw6E0VtgIfrcoQS n//u1tjDpvfNo7A7Th6M8Ddwn7ZcVaEeFBnWM/nZSp2aNWREEJ2xwggaEVNACrDgUoSs 1uSKHM1SKlAuJaiEIze/mgVhP1Ul254VKN4kI97UKJAQfVpwgB4dyhi03tkNITSLEMjE /COg== 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 q2si14643063edn.377.2020.08.18.14.39.33; Tue, 18 Aug 2020 14:39:57 -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 S1726929AbgHRVid (ORCPT + 99 others); Tue, 18 Aug 2020 17:38:33 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34574 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbgHRViT (ORCPT ); Tue, 18 Aug 2020 17:38:19 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 9FAF129480C Message-ID: <57e324f9e3e7e56aa634bcfa0aeebf08c118776d.camel@collabora.com> Subject: Re: [PATCH v3 16/19] media: rkvdec: Drop unneeded per_request driver-specific control flag From: Ezequiel Garcia To: Jonas Karlman , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec Date: Tue, 18 Aug 2020 18:38:07 -0300 In-Reply-To: <7ce53e65-1a05-bef7-afe7-9a5113d5bd4f@kwiboo.se> References: <20200814133634.95665-1-ezequiel@collabora.com> <20200814133634.95665-17-ezequiel@collabora.com> <7ce53e65-1a05-bef7-afe7-9a5113d5bd4f@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 Tue, 2020-08-18 at 20:17 +0000, Jonas Karlman wrote: > Hi Ezequiel, > > On 2020-08-14 15:36, Ezequiel Garcia wrote: > > Currently, the drivers makes no distinction between per_request > > and mandatory, as both are used in the same request validate check. > > > > The driver only cares to know if a given control is > > required to be part of a request, so only one flag is needed. > > This patch cause decoding issues with ffmpeg. > > The removal of per_request makes DECODE_MODE and START_CODE ctrls > mandatory to be included in the request. > Ugh, I just failed boolean logic 101. Yeah, we those controls shouldn't be mandatory. I'll send a fix for that. Other than this, can I add your tested-by to the series? Thanks, Ezequiel > Best regards, > Jonas > > > Signed-off-by: Ezequiel Garcia > > --- > > drivers/staging/media/rkvdec/rkvdec.c | 6 +----- > > drivers/staging/media/rkvdec/rkvdec.h | 1 - > > 2 files changed, 1 insertion(+), 6 deletions(-) > > > > diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c > > index 7c5129593921..cd720d726d7f 100644 > > --- a/drivers/staging/media/rkvdec/rkvdec.c > > +++ b/drivers/staging/media/rkvdec/rkvdec.c > > @@ -55,23 +55,19 @@ static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = { > > > > static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = { > > { > > - .per_request = true, > > .mandatory = true, > > .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS, > > }, > > { > > - .per_request = true, > > .mandatory = true, > > .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SPS, > > .cfg.ops = &rkvdec_ctrl_ops, > > }, > > { > > - .per_request = true, > > .mandatory = true, > > .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PPS, > > }, > > { > > - .per_request = true, > > .mandatory = true, > > .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX, > > }, > > @@ -615,7 +611,7 @@ static int rkvdec_request_validate(struct media_request *req) > > u32 id = ctrls->ctrls[i].cfg.id; > > struct v4l2_ctrl *ctrl; > > > > - if (!ctrls->ctrls[i].per_request || !ctrls->ctrls[i].mandatory) > > + if (!ctrls->ctrls[i].mandatory) > > continue; > > > > ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl, id); > > diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h > > index 2fc9f46b6910..77a137cca88e 100644 > > --- a/drivers/staging/media/rkvdec/rkvdec.h > > +++ b/drivers/staging/media/rkvdec/rkvdec.h > > @@ -25,7 +25,6 @@ > > struct rkvdec_ctx; > > > > struct rkvdec_ctrl_desc { > > - u32 per_request : 1; > > u32 mandatory : 1; > > struct v4l2_ctrl_config cfg; > > }; > >