From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jianhao Xu <jianhao.xu@seu.edu.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH] media: mediatek: vcodec: Initialize context lock before firmware setup
Date: Sun, 04 Oct 2026 15:18:17 +0200 [thread overview]
Message-ID: <c9b5b9ffef594023e25e174cf9936e0b74575e87.camel@ndufresne.ca> (raw)
In-Reply-To: <20261004123920.1251165-1-runyu.xiao@seu.edu.cn>
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
Le dimanche 04 octobre 2026 à 20:39 +0800, Runyu Xiao a écrit :
> Hi Nicolas,
>
> On Sun, 4 Oct 2026 07:17:43 -0400, Nicolas Dufresne wrote:
>
> > The very first place the lock will be taken is in _open() and that cannot
> > happen before video_register_device(), which is kept last. Please
> > demonstrate what the issue you are suggesting if you'd like to see this
> > merged.
>
> The normal encoder open path is as you describe. On VPU-backed systems,
> firmware setup registers the encoder reset callback before dev_ctx_lock is
> initialized. A timeout on the shared VPU while another client is active
> queues reset work, which invokes registered callbacks. If that work runs
> before spin_lock_init(), the callback takes the uninitialized lock. The
> context list is initialized but empty during probe, so I cannot claim list
> corruption or a user-visible failure. With CONFIG_DEBUG_SPINLOCK, the
> zeroed lock fails the magic check.
Then please make a v2 that includes the mention of the encoder path, and that
includes the debug output when CONFIG_DEBUG_SPINLOCK in your message. That will
show that you actually tested it. Its extra effort, but please understand that I
receive dozen of hypothetical fixes (sometimes multiple time the same fix made
by LLM users that may or may not follow the list).
cheers,
Nicolas
>
> Thanks,
> Runyu
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-10-04 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 14:48 Runyu Xiao
2026-10-04 11:17 ` Nicolas Dufresne
2026-10-04 12:39 ` Runyu Xiao
2026-10-04 13:18 ` Nicolas Dufresne [this message]
2026-10-08 12:14 ` [PATCH v2] " Runyu Xiao
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=c9b5b9ffef594023e25e174cf9936e0b74575e87.camel@ndufresne.ca \
--to=nicolas@ndufresne.ca \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=runyu.xiao@seu.edu.cn \
--cc=stable@vger.kernel.org \
--cc=tiffany.lin@mediatek.com \
--cc=yunfei.dong@mediatek.com \
/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
all inboxes | Powered by JetHome®