lkml.org 
[lkml]   [2020]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 16/18] media: mtk-vcodec: venc: make S_PARM return -ENOTTY for CAPTURE queue
From
Date
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@chromium.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.

Regards,

Hans

>
> ctx->enc_params.framerate_num =
> a->parm.output.timeperframe.denominator;
>

\
 
 \ /
  Last update: 2020-07-03 10:30    [W:0.153 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site