Hello Martin,

On Sun Nov 30, 2025 at 2:09 PM CET, Martin Blumenstingl wrote:
> Hi Luca,
>
> On Fri, Nov 28, 2025 at 5:54 PM Luca Ceresoli <[email protected]> 
> wrote:
>>
>> This driver obtains a bridge pointer from of_drm_find_bridge() in the probe
>> function and stores it until driver removal. of_drm_find_bridge() is
>> deprecated. Move to devm_of_drm_get_bridge() which puts the bridge
>> reference on remove or on probe failure.
>>
>> Signed-off-by: Luca Ceresoli <[email protected]>
>> ---
>>  drivers/gpu/drm/meson/meson_encoder_cvbs.c | 2 +-
>>  drivers/gpu/drm/meson/meson_encoder_dsi.c  | 2 +-
>>  drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c 
>> b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
>> index dc374bfc5951..bf8588a5f6dd 100644
>> --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c
>> +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
>> @@ -241,7 +241,7 @@ int meson_encoder_cvbs_probe(struct meson_drm *priv)
>>                 return 0;
>>         }
>>
>> -       meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote);
>> +       meson_encoder_cvbs->next_bridge = devm_of_drm_get_bridge(priv->dev, 
>> remote);
>>         of_node_put(remote);
>>         if (!meson_encoder_cvbs->next_bridge)
>>                 return dev_err_probe(priv->dev, -EPROBE_DEFER,
> Would you be happy with me sending a patch that replaces the whole
> logic in two meson_encoder_{cvbs,dsi,hdmi}.c with
> devm_drm_of_get_bridge()?
> I see two benefits:
> - simpler code
> - a patch less in your series (less maintenance burden for you)
>
> What I'm not sure about is how this series interacts with
> devm_drm_of_get_bridge() which is why I'm asking before cooking a
> patch.

Apologies for the long delay in getting back to you. You might have noticed
some discussion about the overall approach, and I waited for it to settle.

About devm_drm_of_get_bridge(), it is a very different function so it does
not affect this series. The name similarity is confusing indeed, but
devm_of_drm_get_bridge() has been removed from my approach, so one less
source of confusion.

I'm soon sending v3, and I have updated my patch to
eson_encoder_{cvbs,dsi,hdmi}.c, actually splitting it in 3. I'd be grateful
if you could reviewd and/ot test them when I send v3. But I don't think
there is a need for you to send any patches related to this topic.

Best regards,
Luca

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

Reply via email to