[PATCH v3 3/3] media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC

Nicolas Dufresne nicolas at ndufresne.ca
Thu Dec 4 10:15:35 PST 2025


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.

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
-------------- 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/20251204/9175db9d/attachment.sig>


More information about the linux-arm-kernel mailing list