Re: [PATCH v4 6/7] media: subdev: add v4l2_subdev_call_state_active()

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

 



On 16/02/2022 23:30, Laurent Pinchart wrote:
Hi Tomi,

Thank you for the patch.

On Wed, Feb 16, 2022 at 03:00:48PM +0200, Tomi Valkeinen wrote:
Add v4l2_subdev_call_state_active() macro to help calling subdev ops
that take a subdev state as a parameter.

We should not encourage subdev drivers to call into each other. There
may be some valid use cases for such a helper at this point, namely in
the .start_streaming() implementation in a vb2 queue, but even then, I
think it would be best to rework the pipeline start API to lock the
states of all subdevs in the pipeline (I've already improved pipeline
start on top of your streams series, the locking isn't there yet, but I
could give it a try).

On the other hand, this macro could help identifying drivers that handle
locking manually, helping reworking them once the pipeline start API
handles locking too.

I use this in the cal-video.c to implement the legacy non-MC support. That is a bit special case, and I could do that with a CAL internal helper. So I'm fine with dropping this if there won't be other users.

 Tomi



[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