[PATCH weston] simple-dmabuf-v4l: Remove incorrect assert

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 17 11:56:27 UTC 2017


On Fri, 10 Mar 2017 14:21:32 -0600
Derek Foreman <derekf at osg.samsung.com> wrote:

> According to v4l2 documentation, DQBUF always clears FLAG_DONE, so
> this assert can be expected to fire 100% of the time.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
>  clients/simple-dmabuf-v4l.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c
> index b49d62fd..82b55a99 100644
> --- a/clients/simple-dmabuf-v4l.c
> +++ b/clients/simple-dmabuf-v4l.c
> @@ -457,8 +457,6 @@ dequeue(struct display *display)
>  		return -1;
>  	}
>  
> -	assert(buf.flags & V4L2_BUF_FLAG_DONE);
> -
>  	return buf.index;
>  }
>  

Hi,

indeed, this is an issue we have hit before, and we assumed a patch was
written and merged, but obviously nothing was merged, and I cannot find
evidence anywhere of a patch even been submitted before.

I did find a discussion though, where Emmanuel points out the kernel
changed behaviour between 4.4 and 4.9 and this assert started firing
because of that. However, since the assert is not really testing our
own code and there is a question if it was right even to begin with,
this patch is the right solution.

Today's behaviour is also documented nowadays:
https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/buffer.html#buffer-flags

Pushed:
   080f130..300bc6e  master -> master


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170317/013080ac/attachment.sig>


More information about the wayland-devel mailing list