[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPBb6MW9deo11+YH9Mh3u08sEt7ShAF_a+S0-Jb_VDGhCQot_Q@mail.gmail.com>
Date: Sat, 4 Jul 2020 21:36:15 +0900
From: Alexandre Courbot <acourbot@...omium.org>
To: Hans Verkuil <hverkuil@...all.nl>
Cc: Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Rui Wang <gtk_ruiwang@...iatek.com>,
Yunfei Dong <yunfei.dong@...iatek.com>,
Pi-Hsun Shih <pihsun@...omium.org>,
Maoguang Meng <maoguang.meng@...iatek.com>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 16/18] media: mtk-vcodec: venc: make S_PARM return
-ENOTTY for CAPTURE queue
On Fri, Jul 3, 2020 at 5:30 PM Hans Verkuil <hverkuil@...all.nl> wrote:
>
> On 26/06/2020 10:04, Alexandre Courbot wrote:
> > v4l2-compliance expects ENOTTY to be returned when a given queue does
> > not support S_PARM.
> >
> > Signed-off-by: Alexandre Courbot <acourbot@...omium.org>
> > ---
> > drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> > index aae610e6d4e8..346a33c6869d 100644
> > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> > @@ -200,7 +200,7 @@ static int vidioc_venc_s_parm(struct file *file, void *priv,
> > struct mtk_vcodec_ctx *ctx = fh_to_ctx(priv);
> >
> > if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
> > - return -EINVAL;
> > + return -ENOTTY;
>
> This doesn't look right: S_PARM *is* supported, just not for this buffer type.
> So -EINVAL is the correct error code.
>
> What is the exact v4l2-compliance failure? It might be a bug in the test.
The error is as follows:
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
fail: v4l2-test-formats.cpp(1336): got error 22 when
setting parms for buftype 9
test VIDIOC_G/S_PARM: FAIL
Maybe we need to check for EINVAL and return ENOTTY in that case, like
what is done on line 1305 of v4l2-test-formats.cpp for VIDIOC_G_PARM?
>
> Regards,
>
> Hans
>
> >
> > ctx->enc_params.framerate_num =
> > a->parm.output.timeperframe.denominator;
> >
>
Powered by blists - more mailing lists