Hello Luca,

        Thank you very much for your review and suggestions.

> -----邮件原件-----
> 发件人: Luca Ceresoli <[email protected]>
> 发送时间: 2026年12月1日 1:30
> 收件人: Luo Liu <[email protected]>
> 抄送: Maarten Lankhorst <[email protected]>; Maxime
> Ripard <[email protected]>; Thomas Zimmermann
> <[email protected]>; Liviu Dudau <[email protected]>; Russell King
> <[email protected]>; [email protected]; Ayan Halder
> <[email protected]>; Andrzej Hajda <[email protected]>; Neil
> Armstrong <[email protected]>; Robert Foss <[email protected]>;
> Laurent Pinchart <[email protected]>; Jonas Karlman
> <[email protected]>; Jernej Skrabec <[email protected]>; Kory
> Maincent <[email protected]>; Luca Ceresoli
> <[email protected]>; David Airlie <[email protected]>; Simona Vetter
> <[email protected]>; [email protected]; cix-kernel-upstream
> <[email protected]>; Wuyi Shen (沈武义)
> <[email protected]>
> 主题: Re: [PATCH v5 1/2] drm/komeda: Use the bridge connector
>
> [Some people who received this message don't often get email from
> [email protected]. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL
>
> Hello Luo,
>
> > Bridges following the new DRM bridge model no longer create a
> > connector
> > themselves: the display driver has to attach them with
> > DRM_BRIDGE_ATTACH_NO_CONNECTOR and create one connector for the
> whole
> > chain with drm_bridge_connector_init().
> >
> > Convert komeda to that model, so it keeps working with bridges that
> > have moved to the new one. The bridges komeda binds to in mainline
> > support connector-less attach, so boards using them are unaffected.
>
> You say all those bridges support connector-less attach. But I only found one 
> such
> bridge bound in mainline dts files, that's the tda998x, and v4 patch 4 (which 
> you
> are correctly sending separately now) is "tda998x: fix
> DRM_BRIDGE_ATTACH_NO_CONNECTOR support". So does this patch depend
> on the tda998x fix patch?
>

komeda is the DPU, the upstream end of the display chain; our DP
controller, which is being upstreamed on the new DRM bridge model, and
the tda998x HDMI transmitter are both downstream of it. komeda therefore
has to be converted first, and that is what this series does.

You are right that the Morello SDP board also needs the tda998x fix.
That fix is independent of this conversion; I will post it as a separate 
tda998x patch.

> > Select DRM_BRIDGE_CONNECTOR for drm_bridge_connector_init() and
> > DRM_DISPLAY_HELPER, as the bridge connector is only visible when the
> > display helper is enabled.
> >
> > Signed-off-by: Luo Liu <[email protected]>
>
> ...
>
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> > @@ -15,6 +15,7 @@
> >  #include <drm/drm_print.h>
> >  #include <drm/drm_vblank.h>
> >  #include <drm/drm_bridge.h>
> > +#include <drm/drm_bridge_connector.h>
> >  #include <drm/drm_panel.h>
> >
> >  #include "komeda_dev.h"
> > @@ -617,6 +618,7 @@ static int komeda_attach_bridge(struct device *dev,
> >                               struct drm_encoder *encoder)  {
> >       struct drm_device *drm = encoder->dev;
> > +     struct drm_connector *connector;
> >       struct drm_bridge *bridge;
> >       int err;
> >
> > @@ -626,12 +628,22 @@ static int komeda_attach_bridge(struct device *dev,
> >               return dev_err_probe(dev, PTR_ERR(bridge), "remote
> bridge not found for pipe: %s\n",
> >
> of_node_full_name(pipe->of_node));
> >
> > -     err = drm_bridge_attach(encoder, bridge, NULL, 0);
> > -     if (err)
> > +     err = drm_bridge_attach(encoder, bridge, NULL,
> > +
> DRM_BRIDGE_ATTACH_NO_CONNECTOR);
> > +     if (err) {
> >               drm_err(drm, "bridge_attach() failed for pipe: %s\n",
> >                       of_node_full_name(pipe->of_node));
> > +             return err;
> > +     }
>
> Please add a patch to switch to dev_err_probe() before this one, in the same
> series. As I see this function is only called by the probe function, through 
> a fairly
> long call chain.
>
> > +       connector = drm_bridge_connector_init(drm, encoder);
> > +       if (IS_ERR(connector)) {
> > +               drm_err(drm, "bridge connector init failed for pipe: %s\n",
> > +                       of_node_full_name(pipe->of_node));
> > +               return PTR_ERR(connector);
> > +       }
>
> Here too, use dev_err_probe().
>
> Otherwise looks good.


Thanks a lot for the review. That is a very good suggestion.

Since this series is about the conversion to the new DRM bridge model,
and to keep the conversion patch aligned with the versions already
reviewed, would it be better to add the dev_err_probe() conversion as a
separate patch at the end of the series instead of before it? I will of
course use dev_err_probe() in the new error paths this series adds.


Best regards,
Luo

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



本邮件及其附件包含CIX公司的保密信息,受法律保护,仅供本邮件指定的收件人查阅。严禁任何未经授权的使用、传播、分发或复制本邮件及其任何内容。此限制适用于指定收件人以外的所有人员,包括未经明确授权处理此类信息的CIX公司员工或代理人。若您误收本邮件,请立即通知发件人,并永久删除邮件及所有附件。互联网传输无法保证及时性、安全性、完整性和无病毒性,CIX公司对任何传输错误或遗漏概不承担责任。

Reply via email to