Re: [PATCH v3 2/2] v4l: async: add subnotifier registration for subdevices

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

 



On 06/13/2017 04:30 PM, Niklas Söderlund wrote:
When the registered() callback of v4l2_subdev_internal_ops is called the
subdevice has access to the master devices v4l2_dev and it's called with
the async frameworks list_lock held. In this context the subdevice can
register its own notifiers to allow for incremental discovery of
subdevices.

The master device registers the subdevices closest to itself in its
notifier while the subdevice(s) register notifiers for their closest
neighboring devices when they are registered. Using this incremental
approach two problems can be solved:

1. The master device no longer has to care how many devices exist in
    the pipeline. It only needs to care about its closest subdevice and
    arbitrary long pipelines can be created without having to adapt the
    master device for each case.

2. Subdevices which are represented as a single DT node but register
    more than one subdevice can use this to improve the pipeline
    discovery, since the subdevice driver is the only one who knows which
    of its subdevices is linked with which subdevice of a neighboring DT
    node.

To enable subdevices to register/unregister notifiers from the
registered()/unregistered() callback v4l2_async_subnotifier_register()
and v4l2_async_subnotifier_unregister() are added. These new notifier
register functions are similar to the master device equivalent functions
but run without taking the v4l2-async list_lock which already is held
when the registered()/unregistered() callbacks are called.

Signed-off-by: Niklas Söderlund<niklas.soderlund+renesas@xxxxxxxxxxxx>
Acked-by: Hans Verkuil<hans.verkuil@xxxxxxxxx>
Acked-by: Sakari Ailus<sakari.ailus@xxxxxxxxxxxxxxx>

Acked-by: Sylwester Nawrocki <snawrocki@xxxxxxxxxx>



[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