public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org, iivanov@mm-sol.com,
	gururaj.nagendra@intel.com, david.cohen@nokia.com
Subject: Re: [PATCH v4 7/7] V4L: Events: Support all events
Date: Fri, 19 Feb 2010 21:11:27 +0200	[thread overview]
Message-ID: <4B7EE25F.9050402@maxwell.research.nokia.com> (raw)
In-Reply-To: <732a3c26ed77df5896cb310597d1c79e.squirrel@webmail.xs4all.nl>

Hans Verkuil wrote:
>> Then don't call it v4l2_event_subscribe_all if it only subscribes to a set
>> of
>> event :-)
>>
>>> For each event this function would then call:
>>>
>>> fh->vdev->ioctl_ops->vidioc_subscribe_event(fh, sub);
>>>
>>> The nice thing about that is that in the driver you have a minimum of
>>> fuss.
>>>
>>> I'm leaning towards this second solution due to the simple driver
>>> implementation.
>>>
>>> Handling EVENT_ALL will simplify things substantially IMHO.
>>
>> I'm wondering if subscribing to all events should be allowed. Do we have
>> use
>> cases for that ? I'm always a bit cautious when adding APIs with no users,
>> as
>> that means the API has often not been properly tested against possible use
>> cases and mistakes will need to be supported forever (or at least for a
>> long
>> time).
> 
> I think that is a good point. Supporting V4L2_EVENT_ALL makes sense for
> unsubscribe, but does it makes sense for subscribe as well? I think it
> does not. It just doesn't feel right when I tried to implement it in ivtv.

I don't see any harm in supporting it there. We could also specify that
drivers may support that. At least for testing purposes that could be
quite useful. :-) Perhaps not for regular use, though.

> I also wonder whether the unsubscribe API shouldn't just receive the event
> type instead of the big subscription struct. Or get its own struct. I
> don't think it makes much sense that they both have the same struct.

So for unsubscribing the argument would be just event type as __u32?

I don't see harm in having the struct there. There might be flags in
future, perhaps telling that events of that type should be cleaned up
from the event queue, for example. (I can't think of any other purposes
now. :))

Cheers,

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

  reply	other threads:[~2010-02-19 19:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 14:57 [PATCH v4 0/7] V4L2 file handles and event interface Sakari Ailus
2010-02-10 14:58 ` [PATCH v4 1/7] V4L: File handles Sakari Ailus
2010-02-10 14:58   ` [PATCH v4 2/7] V4L: Events: Add new ioctls for events Sakari Ailus
2010-02-10 14:58     ` [PATCH v4 3/7] V4L: Events: Add backend Sakari Ailus
2010-02-10 14:58       ` [PATCH v4 4/7] V4L: Events: Support event handling in do_ioctl Sakari Ailus
2010-02-10 14:58         ` [PATCH v4 5/7] V4L: Events: Count event queue length Sakari Ailus
2010-02-10 14:58           ` [PATCH v4 6/7] V4L: Events: Sequence numbers Sakari Ailus
2010-02-10 14:58             ` [PATCH v4 7/7] V4L: Events: Support all events Sakari Ailus
2010-02-13 14:42               ` Hans Verkuil
2010-02-15 10:11                 ` Laurent Pinchart
2010-02-15 10:36                   ` Hans Verkuil
2010-02-19 19:11                     ` Sakari Ailus [this message]
2010-02-13 14:18           ` [PATCH v4 5/7] V4L: Events: Count event queue length Hans Verkuil
2010-02-13 13:49         ` [PATCH v4 4/7] V4L: Events: Support event handling in do_ioctl Hans Verkuil
2010-02-15 10:05           ` Laurent Pinchart
2010-02-15 10:31             ` Hans Verkuil
2010-02-13 13:41       ` [PATCH v4 3/7] V4L: Events: Add backend Hans Verkuil
2010-02-13 13:19     ` [PATCH v4 2/7] V4L: Events: Add new ioctls for events Hans Verkuil
2010-02-15  9:55       ` Laurent Pinchart
2010-02-15 10:28         ` Hans Verkuil
2010-02-15 10:45           ` Laurent Pinchart
2010-02-13 13:10   ` [PATCH v4 1/7] V4L: File handles 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=4B7EE25F.9050402@maxwell.research.nokia.com \
    --to=sakari.ailus@maxwell.research.nokia.com \
    --cc=david.cohen@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