Re: [PATCH 7/7] media: coda: enable capture S_PARM for stateful encoder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le lundi 04 avril 2022 à 18:35 +0200, Philipp Zabel a écrit :
> Allow to call S_PARM with type == V4L2_BUF_TYPE_VIDEO_OUTPUT,
> to fix the following v4l2-compliance test failure:
> 
> 		fail: v4l2-test-formats.cpp(1413): got error 22 when setting parms for buftype 1
> 	test VIDIOC_G/S_PARM: FAIL

That one may be missing something though. As you don't implement performance
target, you need to override the value somehow with the value you wrote into the
bitstream no ? Otherwise we just ignore what userland sets silently ? I might
not have got exactly how this case is supposed to be handled. Looking for
feedback on what is proper behaviour for drivers that do not implement
performance targets (resource reservation).

> 
> Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> ---
>  drivers/media/platform/chips-media/coda-common.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c
> index 33fcd8c7d72b..cd9ff2fa4147 100644
> --- a/drivers/media/platform/chips-media/coda-common.c
> +++ b/drivers/media/platform/chips-media/coda-common.c
> @@ -1421,9 +1421,6 @@ static int coda_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
>  	struct coda_ctx *ctx = fh_to_ctx(fh);
>  	struct v4l2_fract *tpf;
>  
> -	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
> -		return -EINVAL;
> -
>  	a->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
>  	tpf = &a->parm.output.timeperframe;
>  	coda_approximate_timeperframe(tpf);





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux