public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/7] V4L2 file handles and event interface
@ 2009-12-22 16:42 Sakari Ailus
  2009-12-22 16:43 ` [RFC v2 1/7] V4L: File handles Sakari Ailus
  2010-01-18 13:07 ` [RFC v2 0/7] V4L2 file handles and event interface Hans Verkuil
  0 siblings, 2 replies; 22+ messages in thread
From: Sakari Ailus @ 2009-12-22 16:42 UTC (permalink / raw)
  To: linux-media@vger.kernel.org
  Cc: Laurent Pinchart, Hans Verkuil, Ivan T. Ivanov, Guru Raj

Hi,

Here's the second version of the V4L2 file handle and event interface 
patchset. Still RFC since I'd like to get more feedback on it.

The first patch adds the V4L2 file handle support and the rest are for 
V4L2 events.

The patchset works with the OMAP 3 ISP driver. Patches for OMAP 3 ISP 
are not part of this patchset but are available in Gitorious (branch is 
called events):

	git://gitorious.org/omap3camera/mainline.git event

The major change since the last one v4l2_fh structure is now part of 
driver's own file handle. It's used as file->private_data as well. I did 
this based on Hans Verkuil's suggestion. Sequence numbers and event 
queue length limitation is there as well. There are countless of smaller 
changes, too.

A few notes on the patches:

- I don't like the locking too much. Perhaps the file handle specific 
lock (events->lock) could be dropped in favour of the lock for 
v4l2_file_handle in video_device?

- Poll. The V4L2 specifiction says:

	"When the application did not call VIDIOC_QBUF or
	VIDIOC_STREAMON yet the poll() function succeeds, but sets the
	POLLERR flag in the revents field."

   The current events for OMAP 3 ISP are related to streaming but not 
all might be in future. For example there might be some radio or DVB 
related events.

- Sequence numbers are local to file handles.

- Subscribing V4L2_EVENT_ALL causes any other events to be unsubscribed.

- If V4L2_EVENT_ALL has been subscribed, unsubscribing any one of the 
events leads to V4L2_EVENT_ALL to be unsubscribed. This problem would be 
difficult to work around since this would require the event system to be 
aware of the driver private events as well.

- If events are missed, the sequence number is incremented in any case. 
This way the user space knows events have been missed.

Comments would be very, very welcome.

Cheers,

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-01-24 13:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 16:42 [RFC v2 0/7] V4L2 file handles and event interface Sakari Ailus
2009-12-22 16:43 ` [RFC v2 1/7] V4L: File handles Sakari Ailus
2009-12-22 16:43   ` [RFC v2 2/7] V4L: Events: Add new ioctls for events Sakari Ailus
2009-12-22 16:43     ` [RFC v2 3/7] V4L: Events: Support event handling in do_ioctl Sakari Ailus
2009-12-22 16:43       ` [RFC v2 4/7] V4L: Events: Add backend Sakari Ailus
2009-12-22 16:43         ` [RFC v2 5/7] V4L: Events: Limit event queue length Sakari Ailus
2009-12-22 16:43           ` [RFC v2 6/7] V4L: Events: Sequence numbers Sakari Ailus
2009-12-22 16:43             ` [RFC v2 7/7] V4L: Events: Support all events Sakari Ailus
2010-01-18 12:48             ` [RFC v2 6/7] V4L: Events: Sequence numbers Hans Verkuil
2010-01-18 12:58           ` [RFC v2 5/7] V4L: Events: Limit event queue length Hans Verkuil
2010-01-19  8:11             ` Laurent Pinchart
2010-01-19  9:03               ` Hans Verkuil
2010-01-24 13:06             ` Sakari Ailus
2009-12-23  1:01         ` [RFC v2 4/7] V4L: Events: Add backend Andy Walls
2009-12-23 10:15           ` Sakari Ailus
2010-01-18 12:43         ` Hans Verkuil
2010-01-22 17:10           ` Sakari Ailus
2010-01-18 12:32   ` [RFC v2 1/7] V4L: File handles Hans Verkuil
2010-01-22 16:43     ` Sakari Ailus
2010-01-18 13:07 ` [RFC v2 0/7] V4L2 file handles and event interface Hans Verkuil
2010-01-19  8:23   ` Laurent Pinchart
2010-01-19  9:06     ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox