Re: [PATCH] drm/ingenic: Allocate and register the internal bridge separately

From: Luca Ceresoli

Date: Tue Nov 10 2026 - 12:46:04 EST


On Mon Nov 9, 2026 at 8:46 PM CET, Paul Cercueil wrote:
> Hi,
>
> Le jeudi 05 novembre 2026 à 12:35 -0800, Florian Fainelli a écrit :
>> The LCD controller's internal bridge is embedded in an object
>> allocated
>> with drmm_encoder_alloc(). This initializes the encoder but leaves
>> the
>> bridge's reference count at zero. Since drm_bridge_attach() takes a
>> reference, probing the CI20 display produces addition-on-zero and
>> underflow warnings and fails to attach the HDMI bridge chain.
>>
>> Allocate the internal bridge with devm_drm_bridge_alloc() and
>> register
>> it with devm_drm_bridge_add() before attaching it. Keep the encoder
>> in a
>> separate DRM-managed allocation: encoder cleanup can drop the final
>> bridge reference before it has finished accessing the encoder. Find
>> the internal bridge through the encoder's bridge chain during mode
>> setting, and use the bridge argument directly in bridge callbacks.
>>
>> Fixes: 94d50c1a2ca3 ("drm/bridge: get/put the bridge reference in
>> drm_bridge_attach/detach()")
>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>
> Looks like I lost my commit rights to drm-misc-next, I guess for
> inactivity.
>
> So I'll ack it (LGTM) and let someone else (Maxime?) commit it.

Ah, OK, I'll add it to my pipeline then.

> Reviewed-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>

Thanks!

Cheers,
Luca

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