[PATCH v2 2/2] media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
Nicolas Dufresne
nicolas at ndufresne.ca
Tue Dec 2 12:21:40 PST 2025
Hi Ming,
Le lundi 01 décembre 2025 à 09:52 +0800, Ming Qian(OSS) a écrit :
> > Then instead of this, I would like to add a kref to v4l2_m2m_dec, I checked
> > already and this is both safe and backward compatible.
> >
> > Then in the get function, you will walk over the compatible that are
> > different
> > from the currently probe node. If you find one that is initialized, you will
> > call v4l2_m2m_get() to obtained a shared reference. In _remove() you will
> > simply
> > do v4l2_m2m_put() instead of v4l2_m2m_release().
> >
> > Hope the others are happy with this. For Hantro drivers, this will make it a
> > much more powerfull mechanism.
> >
> > Nicolas
> >
>
> For v4l2_m2m_get() and v4l2_m2m_put(), do you mean defining these two
> functions in v4l2 m2m, instead of just adding them in the hantro driver?
my idea was to add a kref to be able to share v4l2_m2m_dev. One thing I notice
is that its the v4l2_m2m dev that creates the media controller on all other
drivers. Note sure why Hantro does it own still, maybe it predates, maybe its
something else.
Its quite weirdly glued together, since the v4l2_m2m_release() function just
happily free the m2m_dev without even trying to cleanup the media controller. It
totally orthogonal to the job queue, maybe it shouldn't be there.
I'll make an RFC for the kref anyway, if that has a change, I'll try and split
out the v4l2_m2m_mc_dev on it own, so driver can share a m2m and use the
helpers.
Nicolas
-------------- 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-arm-kernel/attachments/20251202/a151fc4e/attachment.sig>
More information about the linux-arm-kernel
mailing list