[PATCH v2] media: mediatek: vcodec: Use spinlock for context list protection lock
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Sep 4 06:34:40 PDT 2025
Hi,
Le jeudi 04 septembre 2025 à 15:39 +0900, Tomasz Figa a écrit :
> On Thu, Sep 4, 2025 at 3:18 PM Chen-Yu Tsai <wenst at chromium.org> wrote:
> >
> > Ping?
> >
> > On Wed, Aug 20, 2025 at 6:37 PM Fei Shao <fshao at chromium.org> wrote:
> > >
> > > On Wed, Aug 20, 2025 at 3:54 PM Chen-Yu Tsai <wenst at chromium.org> wrote:
> > > >
> > > > Previously a mutex was added to protect the encoder and decoder context
> > > > lists from unexpected changes originating from the SCP IP block, causing
> > > > the context pointer to go invalid, resulting in a NULL pointer
> > > > dereference in the IPI handler.
> > > >
> > > > Turns out on the MT8173, the VPU IPI handler is called from hard IRQ
> > > > context. This causes a big warning from the scheduler. This was first
> > > > reported downstream on the ChromeOS kernels, but is also reproducible
> > > > on mainline using Fluster with the FFmpeg v4l2m2m decoders. Even though
> > > > the actual capture format is not supported, the affected code paths
> > > > are triggered.
> > > >
> >
> > We really should get this in as this triggers a very large and scary
> > warning every time the encoder or decoder is used.
>
> Just to clarify, it does actually cause BUG_ON() panics, so if the
> original change is already present in a stable kernel, this fix should
> be merged to stable as well.
Pulled by Linus in 6.9 it seems, I will CC stable.
Nicolas
commit 9875c0beb8adaab602572b983fb59dbd761d5882
Merge: fe5b5ef836c8 d353c3c34af0
Author: Linus Torvalds <torvalds at linux-foundation.org>
Date: Wed Apr 10 13:38:35 2024 -0700
Merge tag 'media/v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
- some fixes for mediatec vcodec encoder/decoder oopses
* tag 'media/v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: mediatek: vcodec: support 36 bits physical address
media: mediatek: vcodec: adding lock to protect encoder context list
media: mediatek: vcodec: adding lock to protect decoder context list
media: mediatek: vcodec: Fix oops when HEVC init fails
media: mediatek: vcodec: Handle VP9 superframe bitstream with 8 sub-frames
>
> Best,
> Tomasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250904/ef54b62b/attachment-0001.sig>
More information about the Linux-mediatek
mailing list