RE: [RFCv1 PATCH 5/9] vb2_poll: don't start DMA, leave that to the first read().

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

 



Hello,

On Friday, April 08, 2011 10:08 AM Hans Verkuil wrote:

> On Friday, April 08, 2011 09:00:55 Marek Szyprowski wrote:
> > Hello,
> >
> > On Monday, April 04, 2011 1:52 PM Hans Verkuil wrote:
> >
> > > The vb2_poll function would start read DMA if called without any
> streaming
> > > in progress. This unfortunately does not work if the application just
> wants
> > > to poll for exceptions. This information of what the application is
> polling
> > > for is sadly unavailable in the driver.
> > >
> > > Andy Walls suggested to just return POLLIN | POLLRDNORM and let the
> first
> > > call to read start the DMA. This initial read() call will return EAGAIN
> > > since no actual data is available yet, but it does start the DMA.
> >
> > The current implementation of vb2_read() will just start streaming on
> first
> > call without returning EAGAIN. Do you think this should be changed?
> 
> In the non-blocking case vb2_read will also return EAGAIN. Which is what
> I meant. So nothing needs to be changed.

Right, I got confused again. vb2_read internally calls vb2_dqbuf, which 
in case of nonblocking io returns EAGAIN.

Acked-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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