Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662556 > unrolled thread

Re: [RFC 00/10] V4L2 explicit synchronization support

Started byNicolas Dufresne <nicolas@ndufresne.ca>
First post2017-06-09 17:40 +0200
Last post2017-06-09 17:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC 00/10] V4L2 explicit synchronization support Nicolas Dufresne <nicolas@ndufresne.ca> - 2017-06-09 17:40 +0200

#1662556 — Re: [RFC 00/10] V4L2 explicit synchronization support

FromNicolas Dufresne <nicolas@ndufresne.ca>
Date2017-06-09 17:40 +0200
SubjectRe: [RFC 00/10] V4L2 explicit synchronization support
Message-ID<tQub0-3k4-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Le lundi 03 avril 2017 à 15:46 -0400, Javier Martinez Canillas a
écrit :
> > The problem is that adding implicit fences changed the behavior of
> > the ioctls, causing gstreamer to wait forever for buffers to be ready.
> > 
> 
> The problem was related to trying to make user-space unaware of the implicit
> fences support, and so it tried to QBUF a buffer that had already a pending
> fence. A workaround was to block the second QBUF ioctl if the buffer had a
> pending fence, but this caused the mentioned deadlock since GStreamer wasn't
> expecting the QBUF ioctl to block.

That QBUF may block isn't a problem, but modern userspace application,
not just GStreamer, need "cancellable" operations. This is achieved by
avoiding blocking call that cannot be interrupted. What is usually
done, is that we poll the device FD to determine when it is safe to
call QBUF in a way that it will return in a finit amount of time. For
the implicit fence, it could not work, since the driver is not yet
aware of the fence, hence cannot use it to delay the poll operation.
Though, it's not clear why it couldn't wait asynchronously like this
RFC is doing with the explicit fences.

In the current RFC, the fences are signalled through a callback, and
QBUF is split in half. So waiting on the fence is done elsewhere, and
the qbuf operation completes on the fence callback thread.

Nicolas 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web