From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
"Ivan T. Ivanov" <iivanov@mm-sol.com>,
Guru Raj <gururaj.nagendra@intel.com>
Subject: [RFC v2 0/7] V4L2 file handles and event interface
Date: Tue, 22 Dec 2009 18:42:59 +0200 [thread overview]
Message-ID: <4B30F713.8070004@maxwell.research.nokia.com> (raw)
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
next reply other threads:[~2009-12-22 16:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 16:42 Sakari Ailus [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B30F713.8070004@maxwell.research.nokia.com \
--to=sakari.ailus@maxwell.research.nokia.com \
--cc=gururaj.nagendra@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=iivanov@mm-sol.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox