[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <570d444a92b0e49a11379cabc8f7f838e5228f7a.camel@ndufresne.ca>
Date: Tue, 02 Dec 2025 15:21:40 -0500
From: Nicolas Dufresne <nicolas@...fresne.ca>
To: "Ming Qian(OSS)" <ming.qian@....nxp.com>, linux-media@...r.kernel.org
Cc: mchehab@...nel.org, hverkuil-cisco@...all.nl,
benjamin.gaignard@...labora.com, p.zabel@...gutronix.de,
sebastian.fricke@...labora.com, shawnguo@...nel.org,
ulf.hansson@...aro.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-imx@....com, l.stach@...gutronix.de,
Frank.li@....com, peng.fan@....com, eagle.zhou@....com,
imx@...ts.linux.dev, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/2] media: verisilicon: Avoid G2 bus error while
decoding H.264 and HEVC
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
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists