[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ce53e65-1a05-bef7-afe7-9a5113d5bd4f@kwiboo.se>
Date: Tue, 18 Aug 2020 20:17:51 +0000 (UTC)
From: Jonas Karlman <jonas@...boo.se>
To: Ezequiel Garcia <ezequiel@...labora.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Tomasz Figa <tfiga@...omium.org>, kernel@...labora.com,
Hans Verkuil <hverkuil@...all.nl>,
Alexandre Courbot <acourbot@...omium.org>,
Jeffrey Kardatzke <jkardatzke@...omium.org>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Maxime Ripard <mripard@...nel.org>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Jernej Skrabec <jernej.skrabec@...l.net>
Subject: Re: [PATCH v3 16/19] media: rkvdec: Drop unneeded per_request
driver-specific control flag
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.
Best regards,
Jonas
>
> Signed-off-by: Ezequiel Garcia <ezequiel@...labora.com>
> ---
> 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;
> };
>
Powered by blists - more mailing lists