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]

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.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Reply via email to