Re: [PATCH v3 8/8] media: v4l: subdev: Also assert acquired mutex for non-stream drivers

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

 



Hi Laurent,

On Tue, Oct 24, 2023 at 01:14:53AM +0300, Laurent Pinchart wrote:
> Hi Sakari,
> 
> Thank you for the patch.
> 
> On Mon, Oct 23, 2023 at 08:44:08PM +0300, Sakari Ailus wrote:
> > Assert mutex is taken by drivers that are not stream-aware.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> 
> Do you expect the assertions to trigger ?

Good question.

We should actually probably postpone this patch for now and test more
before merging. Drivers that have not been converted to sub-device state
also use these functions on subdev ops where the framework doesn't take the
state lock such as s_stream. The drivers use their own locks to serialise
access to the data but because the state lock hasn't been acquired, there's
going to be a warning.

The best option would probably be to also acquire the lock for s_stream but
that's not a trivial change as multiple sub-devices may use the same lock
so special handling will be required.

-- 
Regards,

Sakari Ailus



[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