On Fri, Nov 06, 2026 at 02:55:47PM +0100, Luca Ceresoli wrote:
> Hi Maxime,
> 
> On Fri Nov 6, 2026 at 2:14 PM CET, Maxime Ripard wrote:
> > The ingenic driver allocates a structure holding both the DPI encoder
> > and the source bridge of its pipeline, and allocates it as a whole
> > through drmm_encoder_alloc(). The bridge is thus not known to
> > devm_drm_bridge_alloc(), which drm_bridge_attach() already warns
> > about.
> >
> > The bridge private object also gets its name from the devm bridge
> > allocation, and drm_bridge_attach() will soon report a failure of
> > that initialization instead of ignoring it, so a bridge allocated any
> > other way would prevent the driver from probing.
> >
> > Allocate the structure through devm_drm_bridge_alloc(), making the
> > bridge the primary object of the allocation, and initialise the
> > embedded encoder in place with drmm_encoder_init(). Both objects
> > stay in the same structure, so the container_of() conversions keep
> > working, and the bridge funcs assignment moves into the allocator
> > call.
> >
> > Signed-off-by: Maxime Ripard <[email protected]>
> 
> Seems there are now 3 competing patches to fix the same issue! :)
> This, [0] and [1].
> 
> [0] 
> https://lore.kernel.org/all/4f30341735d77c77a9a4952abd91879007bc00fd.1787604223.git....@goldelico.com/
> [1] https://lore.kernel.org/r/[email protected]

ouch, I completely missed those ptaches somehow, sorry.

> However yours does not add a call to [devm_]drm_bridge_add(), so I'd rather
> prefer applying [1]. Also [1] removes the encoder pointer as it is not
> really necessary.

Yeah, that makes total sense to me

Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to