From: Vikash Garodia <quic_vgarodia@quicinc.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Tomasz Figa <tfiga@chromium.org>, <linux-media@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCHv3] media: venus: provide video device lock
Date: Thu, 1 Jun 2023 15:46:17 +0530 [thread overview]
Message-ID: <034bdb7b-7576-6353-6fe9-3433bd674e76@quicinc.com> (raw)
In-Reply-To: <f9219cb0-2cac-bace-20f7-27005cd0e6f1@xs4all.nl>
Hi Hans,
On 5/24/2023 8:14 PM, Hans Verkuil wrote:
> On 24/05/2023 16:29, Bryan O'Donoghue wrote:
>> On 24/05/2023 15:12, Sergey Senozhatsky wrote:
>>> Video device has to provide ->lock so that __video_do_ioctl()
>>> can serialize IOCTL calls. Provided dedicated enc/dec mutex-s
>>> for that purpose.
>>>
>>> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
>
> Since these are m2m devices, I think this should set vfh->m2m_ctx->q_lock
> instead.
>
> The vb2_queue is per filehandle for such devices, so by just setting
> vdev->lock you will have all vb2_queues use the same mutex.
>
> Instead the struct v4l2_m2m_ctx q_lock pointer, if set, will use that
> mutex for all vb2 operations.
Recently we came across a race between queryctrl and s_fmt. Above lock would
synchronize the operations for IOCTL with flag INFO_FL_QUEUE. Any suggestion on
how other IOCTLs can be serialized as well, for ex s_fmt and queryctrl which are
of type INFO_FL_PRIO and INFO_FL_CTRL.
Thanks,
Vikash
> I think you can set it to the 'lock' mutex in struct venus_inst.
>
> Regards,
>
> Hans
prev parent reply other threads:[~2023-06-01 10:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 1:36 [PATCH] media: venus: provide video device lock Sergey Senozhatsky
2023-05-24 12:40 ` Sergey Senozhatsky
2023-05-24 13:56 ` [PATCHv2] " Sergey Senozhatsky
2023-05-24 14:12 ` [PATCHv3] " Sergey Senozhatsky
2023-05-24 14:29 ` Bryan O'Donoghue
2023-05-24 14:44 ` Hans Verkuil
2023-05-24 16:36 ` Vikash Garodia
2023-05-25 0:53 ` Sergey Senozhatsky
2023-05-25 11:02 ` Vikash Garodia
2023-05-26 3:35 ` Sergey Senozhatsky
2023-05-25 7:22 ` Hans Verkuil
2023-05-25 8:59 ` Sergey Senozhatsky
2023-05-25 9:03 ` Hans Verkuil
2023-06-01 10:16 ` Vikash Garodia [this message]
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=034bdb7b-7576-6353-6fe9-3433bd674e76@quicinc.com \
--to=quic_vgarodia@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=stanimir.k.varbanov@gmail.com \
--cc=tfiga@chromium.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