[Bug 735660] v4l2: fix new v4l2 code not working with certain devices (regression)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 29 07:04:23 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=735660
  GStreamer | gst-plugins-good | 1.4.1

--- Comment #8 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2014-08-29 14:04:20 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > Review of attachment 284800 [details] [details]:
> > 
> > If a driver refuse to free buffers when there is no buffers allocator, why
> > would it work when there is 1 buffer ?
> 
> These drivers always refuse to free buffers, using count=0 to free buffer is an
> extension to the V4L2 requestbufs ioctl which got added much later then the
> introduction of the requestbufs ioctl itself. These drivers only free buffers
> when the fd get closed.

Yep, that's why the patch isn't correct.

> 
> > Also, if it already support freeing the
> > 1 buffer, it can't be that hard to fix upstream driver to comply with the spec.
> 
> Fixing these drivers means moving them over to the videobuf2 internal
> kernel-api, problem is that that API does not yet support cards capable of
> hardware video overlays, which these cards are. This is not going to get fixed
> anytime soon, and all userspace apps know how to deal with these cards. This
> used to work in gstreamer too until the recent v4l2 support rework. This is a
> regression in gstreamer which needs to be fixed in gstreamer.

As long as we make it explicit what it is a workaround, and what is real code.
This has grown into a large mess with the "transparent" workaround attitude.
Note that the reason your patch didn't work is that later S_FMT will fail if
you have requested 1 buffer (may only happen on M2M device btw). If REQBUFS(0)
does not work when no buffer are allocated, it won't work more if 1 is
allocated. Unless I'm mistaken, this method would only work if you made sure
S_FMT is not called afterward. I don't want this approach since it will cause
further issue for memory type like DMABUF and USERPTR, as it will prevent any
attempt to adapt memory alignment.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list