Re: [PATCH 1/7] v4l: add videobuf2 Video for Linux 2 driver framework

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

 



Hi,

On Thu, Nov 25, 2010 at 03:23, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> On Thursday, November 25, 2010 10:48:39 Marek Szyprowski wrote:
>> Hello,
>>
>> On Thursday, November 25, 2010 2:17 AM Laurent Pinchart wrote:
>>
>> > On Friday 19 November 2010 16:55:38 Marek Szyprowski wrote:
>> > > From: Pawel Osciak <p.osciak@xxxxxxxxxxx>
>> > >

>> > > +/**
>> > > + * vb2_has_consumers() - return true if the userspace is waiting for a
>> > > buffer + * @q:            videobuf2 queue
>> > > + *
>> > > + * This function returns true if a userspace application is waiting for a
>> > > buffer + * to be ready to dequeue (on which a hardware operation has been
>> > > finished). + */
>> > > +bool vb2_has_consumers(struct vb2_queue *q)
>> > > +{
>> > > + return waitqueue_active(&q->done_wq);
>> > > +}
>> > > +EXPORT_SYMBOL_GPL(vb2_has_consumers);
>> >
>> > What is this for ? Do you have use cases in mind ?
>>
>> The vivi driver is using it, but frankly it should be redesigned to use some
>> other check.
>
> It is a bit of an odd function. I'm also not sure how useful it is.
>

I'd say it's pretty useful for virtual drivers at least. Why do
anything (generate data) if nothing is waiting to get it? I can see
the difference between virtual and real hardware, we might want real
hardware not to disable itself even if nobody is waiting for it (might
be expensive to setup, etc.), but the driver does not to have to use
this function in the first place for that. I really see no reason to
remove it, it benefits virtual drivers and doesn't hurt anything else.

-- 
Best regards,
Pawel Osciak
--
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