Re: [RFC PATCH 07/28] media: mali-vpu: implement TRY_FMT and S_FMT ioctls
From: Nicolas Dufresne
Date: Tue Nov 24 2026 - 12:39:22 EST
Le lundi 23 novembre 2026 à 17:26 +0000, Charvi Mehta a écrit :
> > This is suspicious, the vb queue already do some locking in most of the vidioc
> > call.
> Both queues assign `&sess->vq_lock` to `vb2_queue::lock`, but
> `video_device::lock`
> is unset. The V4L2 core acquires it for queue-management ioctls marked
> INFO_FL_QUEUE, but not for G_FMT, TRY_FMT or S_FMT.
>
> video_device::lock is unset, as this driver uses per-session locking and
> format ioctls are not required to be serialized among different sessions.
> The explicit locks therefore protect format access against queue operations
> and asynchronous firmware updates, which use the same mutex. They do not
> reacquire a lock already held by the ioctl core.
I missed that in the review, please document carefully your locking somewhere in
text.
Nicolas
Attachment:
signature.asc
Description: This is a digitally signed message part