Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: ming.qian@oss.nxp.com, linux-media@vger.kernel.org,
	mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
	benjamin.gaignard@collabora.com, p.zabel@pengutronix.de,
	sebastian.fricke@collabora.com, shawnguo@kernel.org,
	ulf.hansson@linaro.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	l.stach@pengutronix.de, peng.fan@nxp.com, eagle.zhou@nxp.com,
	imx@lists.linux.dev, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 3/3] media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
Date: Thu, 4 Dec 2025 17:57:05 -0500	[thread overview]
Message-ID: <aTIRwcocnye0Y6yV@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <9f38bda2f1753645a1ae392ce5364ea0165fdc01.camel@ndufresne.ca>

On Thu, Dec 04, 2025 at 01:15:35PM -0500, Nicolas Dufresne wrote:
> Hi Frank,
>
> Le jeudi 04 décembre 2025 à 12:34 -0500, Frank Li a écrit :
> > > +static struct v4l2_m2m_dev *hantro_get_v4l2_m2m_dev(struct hantro_dev *vpu)
> > > +{
> > > +	struct device_node *node;
> > > +	struct hantro_dev *shared_vpu;
> > > +
> > > +	if (!vpu->variant || !vpu->variant->shared_devices)
> > > +		goto init_new_m2m_dev;
> >
> > I found only use shared_devices here, how to  ensure that g1 and g2 operate
> > alternately by using shared_devices?
>
> shared_devices is an array of of_device_id we match against. All the matching
> devices will share the same v4l2_m2m_dev (aka m2m scheduler). Typically, both
> cores will be schedule as one. This achieve what alternate operations without
> active polling or blocking locks/mutex.

Okay, but this code require shared_devices==NULL's device probe firstly.
generally not order guaranteed, if there are not depentance at DT.

Does VPU always probe before g1/g2?

and if there are two VPU instances, what's happen?

Frank

>
> For this platform, we only matched against the compatible for simplicity, since
> we know there is only one of each type. I've suggested this method to Ming,
> since it will make it really easy to apply such a quirk if other hardware have
> problems or design constraints.
>
> regards,
> Nicolas




  reply	other threads:[~2025-12-04 22:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04  9:08 [PATCH v3 1/3] media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure ming.qian
2025-12-04  9:08 ` [PATCH v3 2/3] pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu ming.qian
2025-12-04 17:24   ` Frank Li
2025-12-04  9:08 ` [PATCH v3 3/3] media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC ming.qian
2025-12-04 17:34   ` Frank Li
2025-12-04 18:15     ` Nicolas Dufresne
2025-12-04 22:57       ` Frank Li [this message]
2025-12-05  0:05         ` Nicolas Dufresne
2025-12-05 15:07           ` Frank Li
2025-12-04 17:23 ` [PATCH v3 1/3] media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure Frank Li

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=aTIRwcocnye0Y6yV@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=eagle.zhou@nxp.com \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@oss.nxp.com \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=peng.fan@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastian.fricke@collabora.com \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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