[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFrWx3FwNDAzYrsQTaoZtmaM+bnx=Q7c5vxjntv4L06BiQ@mail.gmail.com>
Date: Tue, 6 Jan 2026 14:28:19 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Nicolas Dufresne <nicolas@...fresne.ca>
Cc: ming.qian@....nxp.com, linux-media@...r.kernel.org, mchehab@...nel.org,
hverkuil-cisco@...all.nl, benjamin.gaignard@...labora.com,
p.zabel@...gutronix.de, sebastian.fricke@...labora.com, shawnguo@...nel.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 v4 1/3] media: v4l2-mem2mem: Add a kref to the
v4l2_m2m_dev structure
On Mon, 5 Jan 2026 at 19:08, Nicolas Dufresne <nicolas@...fresne.ca> wrote:
>
> Hi,
>
> Le mardi 30 décembre 2025 à 14:39 +0100, Ulf Hansson a écrit :
> > On Fri, 5 Dec 2025 at 02:55, <ming.qian@....nxp.com> wrote:
> > >
> > > From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> > >
> > > Adding a reference count to the v4l2_m2m_dev structure allow safely
> > > sharing it across multiple hardware nodes. This can be used to prevent
> > > running jobs concurrently on m2m cores that have some internal resource
> > > sharing.
> > >
> > > Signed-off-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> > > Signed-off-by: Ming Qian <ming.qian@....nxp.com>
> >
> > I certainly don't have the complete picture for how this needs to work.
> >
> > However, I was thinking that rather than using a kref and having to
> > share two specific functions to update it (v4l2_m2m_get|put), couldn't
> > we just use a device-link instead?
>
> The device link seems to be intended for power management, I'm effectively not
> familiar with it, so thanks for the information. However, my impression is that
> this is indented to describe power management dependencies on siblings, but this
> was done differently on this SoC (way before my time here), the DT seems to
> describe a block controller which is common to the two (defective) cores. So
> power management wise, its already handled.
>
> Be aware that my intent is to rename v4l2_m2m_dev into v4l2_m2m_sched. Its not a
> dev wrapper, but a helper object that will schedule work coming from N
> v4l2_m2m_ctx (per open() calls). Making this helper object ref counted makes the
> live-time management a lot simpler, and since its not a dev wrapper, this patch
> is not creating a second refcount for the same object.
Okay, fair enough. No objections from my side,
[...]
Kind regards
Uffe
Powered by blists - more mailing lists