.../drm/bridge/analogix/analogix_dp_core.c | 384 ++++++++++-------- .../drm/bridge/analogix/analogix_dp_core.h | 5 +- drivers/gpu/drm/exynos/exynos_dp.c | 48 +-- .../gpu/drm/rockchip/analogix_dp-rockchip.c | 49 +-- include/drm/bridge/analogix_dp.h | 7 +- 5 files changed, 248 insertions(+), 245 deletions(-)
PATCH 1 is a small format optimization for struct analogid_dp_device. PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. PATCH 3-6 are preparations for apply drm_bridge_connector helper. PATCH 7 is to apply the drm_bridge_connector helper. PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. PATCH 11-12 are preparations for apply panel_bridge helper. PATCH 13 is to apply the panel_bridge helper. Damon Ding (13): drm/bridge: analogix_dp: Formalize the struct analogix_dp_device drm/bridge: analogix_dp: Move &drm_bridge_funcs.mode_set to &drm_bridge_funcs.atomic_enable drm/bridge: analogix_dp: Add &analogix_dp_plat_data.next_bridge drm/exynos: exynos_dp: Remove &exynos_dp_device.ptn_bridge drm/bridge: exynos_dp: Remove unused &exynos_dp_device.connector drm/bridge: analogix_dp: Remove redundant &analogix_dp_plat_data.skip_connector drm/bridge: analogix_dp: Apply drm_bridge_connector helper drm/bridge: analogix_dp: Add new API analogix_dp_finish_probe() drm/rockchip: analogix_dp: Apply analogix_dp_finish_probe() drm/exynos: exynos_dp: Apply analogix_dp_finish_probe() drm/bridge: analogix_dp: Remove panel disabling and enabling in analogix_dp_set_bridge() drm/bridge: analogix_dp: Remove bridge disabing and panel unpreparing in analogix_dp_unbind() drm/bridge: analogix_dp: Apply panel_bridge helper .../drm/bridge/analogix/analogix_dp_core.c | 384 ++++++++++-------- .../drm/bridge/analogix/analogix_dp_core.h | 5 +- drivers/gpu/drm/exynos/exynos_dp.c | 48 +-- .../gpu/drm/rockchip/analogix_dp-rockchip.c | 49 +-- include/drm/bridge/analogix_dp.h | 7 +- 5 files changed, 248 insertions(+), 245 deletions(-) --- Changes in v2: - Update Exynos DP driver synchronously. - Move the panel/bridge parsing to the Analogix side. Changes in v3: - Rebase for the existing devm_drm_bridge_alloc() applying commit. - Fix the typographical error of panel/bridge check in exynos_dp_bind(). - Squash all commits related to skip_connector deletion in both Exynos and Analogix code into one. - Apply panel_bridge helper to make the codes more concise. - Fix the handing of bridge in analogix_dp_bridge_get_modes(). - Remove unnecessary parameter struct drm_connector* for callback &analogix_dp_plat_data.attach(). - In order to decouple the connector driver and the bridge driver, move the bridge connector initilization to the Rockchip and Exynos sides. Changes in v4: - Rebase for the applied &drm_bridge_funcs.detect() modification commit. - Rename analogix_dp_find_panel_or_bridge() to analogix_dp_finish_probe(). - Drop the drmm_encoder_init() modification commit. - Rename the &analogix_dp_plat_data.bridge to &analogix_dp_plat_data.next_bridge. -- 2.34.1
On 14.08.2025 12:47, Damon Ding wrote: > PATCH 1 is a small format optimization for struct analogid_dp_device. > PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. > PATCH 3-6 are preparations for apply drm_bridge_connector helper. > PATCH 7 is to apply the drm_bridge_connector helper. > PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. > PATCH 11-12 are preparations for apply panel_bridge helper. > PATCH 13 is to apply the panel_bridge helper. This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, so it causes build break: drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to `drm_bridge_connector_init' make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 After adding this dependency, the Exynos DP driver stops working. On Samsung Snow Chromebook I observed following issue: [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach following panel or bridge (-16) [ 4.543428] exynos-drm exynos-drm: failed to bind 145b0000.dp-controller (ops exynos_dp_ops): -16 [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver exynos-dp failed with error -16 I will investigate details later in the evening. > Damon Ding (13): > drm/bridge: analogix_dp: Formalize the struct analogix_dp_device > drm/bridge: analogix_dp: Move &drm_bridge_funcs.mode_set to > &drm_bridge_funcs.atomic_enable > drm/bridge: analogix_dp: Add &analogix_dp_plat_data.next_bridge > drm/exynos: exynos_dp: Remove &exynos_dp_device.ptn_bridge > drm/bridge: exynos_dp: Remove unused &exynos_dp_device.connector > drm/bridge: analogix_dp: Remove redundant > &analogix_dp_plat_data.skip_connector > drm/bridge: analogix_dp: Apply drm_bridge_connector helper > drm/bridge: analogix_dp: Add new API analogix_dp_finish_probe() > drm/rockchip: analogix_dp: Apply analogix_dp_finish_probe() > drm/exynos: exynos_dp: Apply analogix_dp_finish_probe() > drm/bridge: analogix_dp: Remove panel disabling and enabling in > analogix_dp_set_bridge() > drm/bridge: analogix_dp: Remove bridge disabing and panel unpreparing > in analogix_dp_unbind() > drm/bridge: analogix_dp: Apply panel_bridge helper > > .../drm/bridge/analogix/analogix_dp_core.c | 384 ++++++++++-------- > .../drm/bridge/analogix/analogix_dp_core.h | 5 +- > drivers/gpu/drm/exynos/exynos_dp.c | 48 +-- > .../gpu/drm/rockchip/analogix_dp-rockchip.c | 49 +-- > include/drm/bridge/analogix_dp.h | 7 +- > 5 files changed, 248 insertions(+), 245 deletions(-) > > --- > > Changes in v2: > - Update Exynos DP driver synchronously. > - Move the panel/bridge parsing to the Analogix side. > > Changes in v3: > - Rebase for the existing devm_drm_bridge_alloc() applying commit. > - Fix the typographical error of panel/bridge check in exynos_dp_bind(). > - Squash all commits related to skip_connector deletion in both Exynos and > Analogix code into one. > - Apply panel_bridge helper to make the codes more concise. > - Fix the handing of bridge in analogix_dp_bridge_get_modes(). > - Remove unnecessary parameter struct drm_connector* for callback > &analogix_dp_plat_data.attach(). > - In order to decouple the connector driver and the bridge driver, move > the bridge connector initilization to the Rockchip and Exynos sides. > > Changes in v4: > - Rebase for the applied &drm_bridge_funcs.detect() modification commit. > - Rename analogix_dp_find_panel_or_bridge() to analogix_dp_finish_probe(). > - Drop the drmm_encoder_init() modification commit. > - Rename the &analogix_dp_plat_data.bridge to > &analogix_dp_plat_data.next_bridge. > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 2025/8/14 22:33, Marek Szyprowski wrote: > On 14.08.2025 12:47, Damon Ding wrote: >> PATCH 1 is a small format optimization for struct analogid_dp_device. >> PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. >> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >> PATCH 7 is to apply the drm_bridge_connector helper. >> PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. >> PATCH 11-12 are preparations for apply panel_bridge helper. >> PATCH 13 is to apply the panel_bridge helper. > > This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, > so it causes build break: > > drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to > `drm_bridge_connector_init' > make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 > > After adding this dependency, the Exynos DP driver stops working. On > Samsung Snow Chromebook I observed following issue: > > [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach > following panel or bridge (-16) > [ 4.543428] exynos-drm exynos-drm: failed to bind > 145b0000.dp-controller (ops exynos_dp_ops): -16 > [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 > [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver > exynos-dp failed with error -16 > > I will investigate details later in the evening. > Thanks for your review and test. :-) I found the Rockchip side also lacks 'select DRM_BRIDGE_CONNECTOR' in ROCKCHIP_ANALOGIX_DP's Kconfig. I will add the DRM_BRIDGE_CONNECTOR selection for both of them in the next version. >> Damon Ding (13): >> drm/bridge: analogix_dp: Formalize the struct analogix_dp_device >> drm/bridge: analogix_dp: Move &drm_bridge_funcs.mode_set to >> &drm_bridge_funcs.atomic_enable >> drm/bridge: analogix_dp: Add &analogix_dp_plat_data.next_bridge >> drm/exynos: exynos_dp: Remove &exynos_dp_device.ptn_bridge >> drm/bridge: exynos_dp: Remove unused &exynos_dp_device.connector >> drm/bridge: analogix_dp: Remove redundant >> &analogix_dp_plat_data.skip_connector >> drm/bridge: analogix_dp: Apply drm_bridge_connector helper >> drm/bridge: analogix_dp: Add new API analogix_dp_finish_probe() >> drm/rockchip: analogix_dp: Apply analogix_dp_finish_probe() >> drm/exynos: exynos_dp: Apply analogix_dp_finish_probe() >> drm/bridge: analogix_dp: Remove panel disabling and enabling in >> analogix_dp_set_bridge() >> drm/bridge: analogix_dp: Remove bridge disabing and panel unpreparing >> in analogix_dp_unbind() >> drm/bridge: analogix_dp: Apply panel_bridge helper >> >> .../drm/bridge/analogix/analogix_dp_core.c | 384 ++++++++++-------- >> .../drm/bridge/analogix/analogix_dp_core.h | 5 +- >> drivers/gpu/drm/exynos/exynos_dp.c | 48 +-- >> .../gpu/drm/rockchip/analogix_dp-rockchip.c | 49 +-- >> include/drm/bridge/analogix_dp.h | 7 +- >> 5 files changed, 248 insertions(+), 245 deletions(-) >> >> --- >> >> Changes in v2: >> - Update Exynos DP driver synchronously. >> - Move the panel/bridge parsing to the Analogix side. >> >> Changes in v3: >> - Rebase for the existing devm_drm_bridge_alloc() applying commit. >> - Fix the typographical error of panel/bridge check in exynos_dp_bind(). >> - Squash all commits related to skip_connector deletion in both Exynos and >> Analogix code into one. >> - Apply panel_bridge helper to make the codes more concise. >> - Fix the handing of bridge in analogix_dp_bridge_get_modes(). >> - Remove unnecessary parameter struct drm_connector* for callback >> &analogix_dp_plat_data.attach(). >> - In order to decouple the connector driver and the bridge driver, move >> the bridge connector initilization to the Rockchip and Exynos sides. >> >> Changes in v4: >> - Rebase for the applied &drm_bridge_funcs.detect() modification commit. >> - Rename analogix_dp_find_panel_or_bridge() to analogix_dp_finish_probe(). >> - Drop the drmm_encoder_init() modification commit. >> - Rename the &analogix_dp_plat_data.bridge to >> &analogix_dp_plat_data.next_bridge. >> > Best regards Best regards, Damon
On 14.08.2025 16:33, Marek Szyprowski wrote: > On 14.08.2025 12:47, Damon Ding wrote: >> PATCH 1 is a small format optimization for struct analogid_dp_device. >> PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. >> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >> PATCH 7 is to apply the drm_bridge_connector helper. >> PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. >> PATCH 11-12 are preparations for apply panel_bridge helper. >> PATCH 13 is to apply the panel_bridge helper. > > This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, > so it causes build break: > > drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to > `drm_bridge_connector_init' > make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 > > After adding this dependency, the Exynos DP driver stops working. On > Samsung Snow Chromebook I observed following issue: > > [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach > following panel or bridge (-16) > [ 4.543428] exynos-drm exynos-drm: failed to bind > 145b0000.dp-controller (ops exynos_dp_ops): -16 > [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 > [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver > exynos-dp failed with error -16 > > I will investigate details later in the evening. The failure is caused by trying to add plat_data->next_bridge twice (from exynos_dp's .attach callback, and from analogix' ->bind callback). Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 2025/8/15 5:16, Marek Szyprowski wrote: > > On 14.08.2025 16:33, Marek Szyprowski wrote: >> On 14.08.2025 12:47, Damon Ding wrote: >>> PATCH 1 is a small format optimization for struct analogid_dp_device. >>> PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. >>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>> PATCH 7 is to apply the drm_bridge_connector helper. >>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. >>> PATCH 11-12 are preparations for apply panel_bridge helper. >>> PATCH 13 is to apply the panel_bridge helper. >> >> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, >> so it causes build break: >> >> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >> `drm_bridge_connector_init' >> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >> >> After adding this dependency, the Exynos DP driver stops working. On >> Samsung Snow Chromebook I observed following issue: >> >> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >> following panel or bridge (-16) >> [ 4.543428] exynos-drm exynos-drm: failed to bind >> 145b0000.dp-controller (ops exynos_dp_ops): -16 >> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >> exynos-dp failed with error -16 >> >> I will investigate details later in the evening. > > The failure is caused by trying to add plat_data->next_bridge twice > (from exynos_dp's .attach callback, and from analogix' ->bind callback). > > > Best regards I see. The bridge attachment for the next bridge was not well thought out. It may be better to move panel_bridge addition a little forward and remove next_bridge attachment on the Analogix side. Then, the Rockchip side and Exynos side can do their own next_bridge attachment in &analogix_dp_plat_data.attach() as they want. Could you please help test the following modifications(they have been tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 0529bfb02884..8a9ce1f31678 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1573,6 +1573,15 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) return ret; } + if (dp->plat_data->panel) { + dp->plat_data->next_bridge = devm_drm_panel_bridge_add(dp->dev, + dp->plat_data->panel); + if (IS_ERR(dp->plat_data->next_bridge)) { + ret = PTR_ERR(bridge); + goto err_unregister_aux; + } + } + bridge->ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_MODES; @@ -1588,22 +1597,6 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) goto err_unregister_aux; } - if (dp->plat_data->panel) { - dp->plat_data->next_bridge = devm_drm_panel_bridge_add(dp->dev, - dp->plat_data->panel); - if (IS_ERR(dp->plat_data->next_bridge)) { - ret = PTR_ERR(bridge); - goto err_unregister_aux; - } - } - - ret = drm_bridge_attach(dp->encoder, dp->plat_data->next_bridge, bridge, - DRM_BRIDGE_ATTACH_NO_CONNECTOR); - if (ret) { - dev_err(dp->dev, "failed to attach following panel or bridge (%d)\n", ret); - goto err_unregister_aux; - } - return 0; err_unregister_aux: diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index 80ba700d2964..d0422f940249 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -104,7 +104,7 @@ static int exynos_dp_bridge_attach(struct analogix_dp_plat_data *plat_data, /* Pre-empt DP connector creation if there's a bridge */ if (plat_data->next_bridge) { ret = drm_bridge_attach(&dp->encoder, plat_data->next_bridge, bridge, - 0); + DRM_BRIDGE_ATTACH_NO_CONNECTOR); if (ret) return ret; } diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 0862b09a8be2..dfd32a79b94f 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -164,6 +164,24 @@ static int rockchip_dp_powerdown(struct analogix_dp_plat_data *plat_data) return 0; } +static int rockchip_dp_attach(struct analogix_dp_plat_data *plat_data, + struct drm_bridge *bridge) +{ + struct rockchip_dp_device *dp = pdata_encoder_to_dp(plat_data); + int ret; + + if (plat_data->next_bridge) { + ret = drm_bridge_attach(&dp->encoder.encoder, plat_data->next_bridge, bridge, + DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (ret) { + dev_err(dp->dev, "failed to attach following panel or bridge (%d)\n", ret); + return ret; + } + } + + return 0; +} + static int rockchip_dp_get_modes(struct analogix_dp_plat_data *plat_data, struct drm_connector *connector) { @@ -478,6 +496,7 @@ static int rockchip_dp_probe(struct platform_device *pdev) dp->plat_data.dev_type = dp->data->chip_type; dp->plat_data.power_on = rockchip_dp_poweron; dp->plat_data.power_off = rockchip_dp_powerdown; + dp->plat_data.attach = rockchip_dp_attach; dp->plat_data.get_modes = rockchip_dp_get_modes; dp->plat_data.ops = &rockchip_dp_component_ops; Best regards, Damon
On 15.08.2025 04:59, Damon Ding wrote: > On 2025/8/15 5:16, Marek Szyprowski wrote: >> On 14.08.2025 16:33, Marek Szyprowski wrote: >>> On 14.08.2025 12:47, Damon Ding wrote: >>>> PATCH 1 is a small format optimization for struct analogid_dp_device. >>>> PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. >>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. >>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>> PATCH 13 is to apply the panel_bridge helper. >>> >>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, >>> so it causes build break: >>> >>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>> `drm_bridge_connector_init' >>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>> >>> After adding this dependency, the Exynos DP driver stops working. On >>> Samsung Snow Chromebook I observed following issue: >>> >>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>> following panel or bridge (-16) >>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>> exynos-dp failed with error -16 >>> >>> I will investigate details later in the evening. >> >> The failure is caused by trying to add plat_data->next_bridge twice >> (from exynos_dp's .attach callback, and from analogix' ->bind callback). >> >> >> Best regards > > I see. The bridge attachment for the next bridge was not well thought > out. It may be better to move panel_bridge addition a little forward > and remove next_bridge attachment on the Analogix side. Then, the > Rockchip side and Exynos side can do their own next_bridge attachment > in &analogix_dp_plat_data.attach() as they want. > > Could you please help test the following modifications(they have been > tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) Assuming that I properly applied the malformed diff, it doesn't solve all the issues. There are no errors reported though, but the display chain doesn't work and no valid mode is reported: # dmesg | grep drm [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on minor 0 [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA mapping operations [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops fimd_component_ops) [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops mixer_component_ops) [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller (ops exynos_dp_ops) [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops hdmi_component_ops) [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on minor 1 [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or sizes [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or sizes # ./modetest -c -Mexynos Connectors: id encoder status name size (mm) modes encoders 69 0 disconnected LVDS-1 0x0 0 68 props: 1 EDID: flags: immutable blob blobs: value: 2 DPMS: flags: enum enums: On=0 Standby=1 Suspend=2 Off=3 value: 0 5 link-status: flags: enum enums: Good=0 Bad=1 value: 0 6 non-desktop: flags: immutable range values: 0 1 value: 0 4 TILE: flags: immutable blob blobs: value: 71 0 disconnected HDMI-A-1 0x0 0 70 props: 1 EDID: flags: immutable blob blobs: value: 2 DPMS: flags: enum enums: On=0 Standby=1 Suspend=2 Off=3 value: 0 5 link-status: flags: enum enums: Good=0 Bad=1 value: 0 6 non-desktop: flags: immutable range values: 0 1 value: 0 4 TILE: flags: immutable blob blobs: value: I will investigate details later this week. > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 0529bfb02884..8a9ce1f31678 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1573,6 +1573,15 @@ int analogix_dp_bind(struct analogix_dp_device > *dp, struct drm_device *drm_dev) > return ret; > } > > + if (dp->plat_data->panel) { > + dp->plat_data->next_bridge = > devm_drm_panel_bridge_add(dp->dev, > + dp->plat_data->panel); > + if (IS_ERR(dp->plat_data->next_bridge)) { > + ret = PTR_ERR(bridge); > + goto err_unregister_aux; > + } > + } > + > bridge->ops = DRM_BRIDGE_OP_DETECT | > DRM_BRIDGE_OP_EDID | > DRM_BRIDGE_OP_MODES; > @@ -1588,22 +1597,6 @@ int analogix_dp_bind(struct analogix_dp_device > *dp, struct drm_device *drm_dev) > goto err_unregister_aux; > } > > - if (dp->plat_data->panel) { > - dp->plat_data->next_bridge = > devm_drm_panel_bridge_add(dp->dev, > - dp->plat_data->panel); > - if (IS_ERR(dp->plat_data->next_bridge)) { > - ret = PTR_ERR(bridge); > - goto err_unregister_aux; > - } > - } > - > - ret = drm_bridge_attach(dp->encoder, > dp->plat_data->next_bridge, bridge, > - DRM_BRIDGE_ATTACH_NO_CONNECTOR); > - if (ret) { > - dev_err(dp->dev, "failed to attach following panel or > bridge (%d)\n", ret); > - goto err_unregister_aux; > - } > - > return 0; > > err_unregister_aux: > diff --git a/drivers/gpu/drm/exynos/exynos_dp.c > b/drivers/gpu/drm/exynos/exynos_dp.c > index 80ba700d2964..d0422f940249 100644 > --- a/drivers/gpu/drm/exynos/exynos_dp.c > +++ b/drivers/gpu/drm/exynos/exynos_dp.c > @@ -104,7 +104,7 @@ static int exynos_dp_bridge_attach(struct > analogix_dp_plat_data *plat_data, > /* Pre-empt DP connector creation if there's a bridge */ > if (plat_data->next_bridge) { > ret = drm_bridge_attach(&dp->encoder, > plat_data->next_bridge, bridge, > - 0); > + DRM_BRIDGE_ATTACH_NO_CONNECTOR); > if (ret) > return ret; > } > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index 0862b09a8be2..dfd32a79b94f 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -164,6 +164,24 @@ static int rockchip_dp_powerdown(struct > analogix_dp_plat_data *plat_data) > return 0; > } > > +static int rockchip_dp_attach(struct analogix_dp_plat_data *plat_data, > + struct drm_bridge *bridge) > +{ > + struct rockchip_dp_device *dp = pdata_encoder_to_dp(plat_data); > + int ret; > + > + if (plat_data->next_bridge) { > + ret = drm_bridge_attach(&dp->encoder.encoder, > plat_data->next_bridge, bridge, > + DRM_BRIDGE_ATTACH_NO_CONNECTOR); > + if (ret) { > + dev_err(dp->dev, "failed to attach following > panel or bridge (%d)\n", ret); > + return ret; > + } > + } > + > + return 0; > +} > + > static int rockchip_dp_get_modes(struct analogix_dp_plat_data > *plat_data, > struct drm_connector *connector) > { > @@ -478,6 +496,7 @@ static int rockchip_dp_probe(struct > platform_device *pdev) > dp->plat_data.dev_type = dp->data->chip_type; > dp->plat_data.power_on = rockchip_dp_poweron; > dp->plat_data.power_off = rockchip_dp_powerdown; > + dp->plat_data.attach = rockchip_dp_attach; > dp->plat_data.get_modes = rockchip_dp_get_modes; > dp->plat_data.ops = &rockchip_dp_component_ops; > > > Best regards, > Damon > > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 8/20/2025 5:20 AM, Marek Szyprowski wrote: > On 15.08.2025 04:59, Damon Ding wrote: >> On 2025/8/15 5:16, Marek Szyprowski wrote: >>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>> PATCH 1 is a small format optimization for struct analogid_dp_device. >>>>> PATCH 2 is to perform mode setting in &drm_bridge_funcs.atomic_enable. >>>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix side. >>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>> PATCH 13 is to apply the panel_bridge helper. >>>> >>>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's Kconfig, >>>> so it causes build break: >>>> >>>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>>> `drm_bridge_connector_init' >>>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>>> >>>> After adding this dependency, the Exynos DP driver stops working. On >>>> Samsung Snow Chromebook I observed following issue: >>>> >>>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>>> following panel or bridge (-16) >>>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>>> exynos-dp failed with error -16 >>>> >>>> I will investigate details later in the evening. >>> >>> The failure is caused by trying to add plat_data->next_bridge twice >>> (from exynos_dp's .attach callback, and from analogix' ->bind callback). >>> >>> >>> Best regards >> >> I see. The bridge attachment for the next bridge was not well thought >> out. It may be better to move panel_bridge addition a little forward >> and remove next_bridge attachment on the Analogix side. Then, the >> Rockchip side and Exynos side can do their own next_bridge attachment >> in &analogix_dp_plat_data.attach() as they want. >> >> Could you please help test the following modifications(they have been >> tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) > > Assuming that I properly applied the malformed diff, it doesn't solve > all the issues. There are no errors reported though, but the display > chain doesn't work and no valid mode is reported: > > # dmesg | grep drm > [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on minor 0 > [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA > mapping operations > [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops > fimd_component_ops) > [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops > mixer_component_ops) > [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller (ops > exynos_dp_ops) > [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops > hdmi_component_ops) > [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on minor 1 > [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or sizes > [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or sizes > > # ./modetest -c -Mexynos > Connectors: > id encoder status name size (mm) modes > encoders > 69 0 disconnected LVDS-1 0x0 0 68 > props: > 1 EDID: > flags: immutable blob > blobs: > > value: > 2 DPMS: > flags: enum > enums: On=0 Standby=1 Suspend=2 Off=3 > value: 0 > 5 link-status: > flags: enum > enums: Good=0 Bad=1 > value: 0 > 6 non-desktop: > flags: immutable range > values: 0 1 > value: 0 > 4 TILE: > flags: immutable blob > blobs: > > value: > 71 0 disconnected HDMI-A-1 0x0 0 70 > props: > 1 EDID: > flags: immutable blob > blobs: > > value: > 2 DPMS: > flags: enum > enums: On=0 Standby=1 Suspend=2 Off=3 > value: 0 > 5 link-status: > flags: enum > enums: Good=0 Bad=1 > value: 0 > 6 non-desktop: > flags: immutable range > values: 0 1 > value: 0 > 4 TILE: > flags: immutable blob > blobs: > > value: > > > I will investigate details later this week. > Could you please provide the related DTS file for the test? I will also try to find out the reason for this unexpected issue. ;-) > >> >> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> index 0529bfb02884..8a9ce1f31678 100644 >> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> @@ -1573,6 +1573,15 @@ int analogix_dp_bind(struct analogix_dp_device >> *dp, struct drm_device *drm_dev) >> return ret; >> } >> >> + if (dp->plat_data->panel) { >> + dp->plat_data->next_bridge = >> devm_drm_panel_bridge_add(dp->dev, >> + dp->plat_data->panel); >> + if (IS_ERR(dp->plat_data->next_bridge)) { >> + ret = PTR_ERR(bridge); >> + goto err_unregister_aux; >> + } >> + } >> + >> bridge->ops = DRM_BRIDGE_OP_DETECT | >> DRM_BRIDGE_OP_EDID | >> DRM_BRIDGE_OP_MODES; >> @@ -1588,22 +1597,6 @@ int analogix_dp_bind(struct analogix_dp_device >> *dp, struct drm_device *drm_dev) >> goto err_unregister_aux; >> } >> >> - if (dp->plat_data->panel) { >> - dp->plat_data->next_bridge = >> devm_drm_panel_bridge_add(dp->dev, >> - dp->plat_data->panel); >> - if (IS_ERR(dp->plat_data->next_bridge)) { >> - ret = PTR_ERR(bridge); >> - goto err_unregister_aux; >> - } >> - } >> - >> - ret = drm_bridge_attach(dp->encoder, >> dp->plat_data->next_bridge, bridge, >> - DRM_BRIDGE_ATTACH_NO_CONNECTOR); >> - if (ret) { >> - dev_err(dp->dev, "failed to attach following panel or >> bridge (%d)\n", ret); >> - goto err_unregister_aux; >> - } >> - >> return 0; >> >> err_unregister_aux: >> diff --git a/drivers/gpu/drm/exynos/exynos_dp.c >> b/drivers/gpu/drm/exynos/exynos_dp.c >> index 80ba700d2964..d0422f940249 100644 >> --- a/drivers/gpu/drm/exynos/exynos_dp.c >> +++ b/drivers/gpu/drm/exynos/exynos_dp.c >> @@ -104,7 +104,7 @@ static int exynos_dp_bridge_attach(struct >> analogix_dp_plat_data *plat_data, >> /* Pre-empt DP connector creation if there's a bridge */ >> if (plat_data->next_bridge) { >> ret = drm_bridge_attach(&dp->encoder, >> plat_data->next_bridge, bridge, >> - 0); >> + DRM_BRIDGE_ATTACH_NO_CONNECTOR); >> if (ret) >> return ret; >> } >> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c >> b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c >> index 0862b09a8be2..dfd32a79b94f 100644 >> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c >> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c >> @@ -164,6 +164,24 @@ static int rockchip_dp_powerdown(struct >> analogix_dp_plat_data *plat_data) >> return 0; >> } >> >> +static int rockchip_dp_attach(struct analogix_dp_plat_data *plat_data, >> + struct drm_bridge *bridge) >> +{ >> + struct rockchip_dp_device *dp = pdata_encoder_to_dp(plat_data); >> + int ret; >> + >> + if (plat_data->next_bridge) { >> + ret = drm_bridge_attach(&dp->encoder.encoder, >> plat_data->next_bridge, bridge, >> + DRM_BRIDGE_ATTACH_NO_CONNECTOR); >> + if (ret) { >> + dev_err(dp->dev, "failed to attach following >> panel or bridge (%d)\n", ret); >> + return ret; >> + } >> + } >> + >> + return 0; >> +} >> + >> static int rockchip_dp_get_modes(struct analogix_dp_plat_data >> *plat_data, >> struct drm_connector *connector) >> { >> @@ -478,6 +496,7 @@ static int rockchip_dp_probe(struct >> platform_device *pdev) >> dp->plat_data.dev_type = dp->data->chip_type; >> dp->plat_data.power_on = rockchip_dp_poweron; >> dp->plat_data.power_off = rockchip_dp_powerdown; >> + dp->plat_data.attach = rockchip_dp_attach; >> dp->plat_data.get_modes = rockchip_dp_get_modes; >> dp->plat_data.ops = &rockchip_dp_component_ops; >> >> Best regards, Damon
On 29.08.2025 10:08, Damon Ding wrote: > On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >> On 15.08.2025 04:59, Damon Ding wrote: >>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>> PATCH 1 is a small format optimization for struct >>>>>> analogid_dp_device. >>>>>> PATCH 2 is to perform mode setting in >>>>>> &drm_bridge_funcs.atomic_enable. >>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>> side. >>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>> >>>>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's >>>>> Kconfig, >>>>> so it causes build break: >>>>> >>>>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>>>> `drm_bridge_connector_init' >>>>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>>>> >>>>> After adding this dependency, the Exynos DP driver stops working. On >>>>> Samsung Snow Chromebook I observed following issue: >>>>> >>>>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>>>> following panel or bridge (-16) >>>>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>>>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>>>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>>>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>>>> exynos-dp failed with error -16 >>>>> >>>>> I will investigate details later in the evening. >>>> >>>> The failure is caused by trying to add plat_data->next_bridge twice >>>> (from exynos_dp's .attach callback, and from analogix' ->bind >>>> callback). >>>> >>>> >>>> Best regards >>> >>> I see. The bridge attachment for the next bridge was not well thought >>> out. It may be better to move panel_bridge addition a little forward >>> and remove next_bridge attachment on the Analogix side. Then, the >>> Rockchip side and Exynos side can do their own next_bridge attachment >>> in &analogix_dp_plat_data.attach() as they want. >>> >>> Could you please help test the following modifications(they have been >>> tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) >> >> Assuming that I properly applied the malformed diff, it doesn't solve >> all the issues. There are no errors reported though, but the display >> chain doesn't work and no valid mode is reported: >> >> # dmesg | grep drm >> [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on >> minor 0 >> [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA >> mapping operations >> [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops >> fimd_component_ops) >> [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops >> mixer_component_ops) >> [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller (ops >> exynos_dp_ops) >> [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops >> hdmi_component_ops) >> [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on minor 1 >> [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or >> sizes >> [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or >> sizes >> >> # ./modetest -c -Mexynos >> Connectors: >> id encoder status name size (mm) modes >> encoders >> 69 0 disconnected LVDS-1 0x0 0 >> 68 >> props: >> 1 EDID: >> flags: immutable blob >> blobs: >> >> value: >> 2 DPMS: >> flags: enum >> enums: On=0 Standby=1 Suspend=2 Off=3 >> value: 0 >> 5 link-status: >> flags: enum >> enums: Good=0 Bad=1 >> value: 0 >> 6 non-desktop: >> flags: immutable range >> values: 0 1 >> value: 0 >> 4 TILE: >> flags: immutable blob >> blobs: >> >> value: >> 71 0 disconnected HDMI-A-1 0x0 0 >> 70 >> props: >> 1 EDID: >> flags: immutable blob >> blobs: >> >> value: >> 2 DPMS: >> flags: enum >> enums: On=0 Standby=1 Suspend=2 Off=3 >> value: 0 >> 5 link-status: >> flags: enum >> enums: Good=0 Bad=1 >> value: 0 >> 6 non-desktop: >> flags: immutable range >> values: 0 1 >> value: 0 >> 4 TILE: >> flags: immutable blob >> blobs: >> >> value: >> >> >> I will investigate details later this week. >> > > Could you please provide the related DTS file for the test? I will > also try to find out the reason for this unexpected issue. ;-) Unfortunately I didn't find enough time to debug this further. The above log is from Samsung Snow Chromebook, arch/arm/boot/dts/samsung/exynos5250-snow.dts > ... Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 8/29/2025 4:23 PM, Marek Szyprowski wrote: > On 29.08.2025 10:08, Damon Ding wrote: >> On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >>> On 15.08.2025 04:59, Damon Ding wrote: >>>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>>> PATCH 1 is a small format optimization for struct >>>>>>> analogid_dp_device. >>>>>>> PATCH 2 is to perform mode setting in >>>>>>> &drm_bridge_funcs.atomic_enable. >>>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>>> side. >>>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>>> >>>>>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's >>>>>> Kconfig, >>>>>> so it causes build break: >>>>>> >>>>>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>>>>> `drm_bridge_connector_init' >>>>>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>>>>> >>>>>> After adding this dependency, the Exynos DP driver stops working. On >>>>>> Samsung Snow Chromebook I observed following issue: >>>>>> >>>>>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>>>>> following panel or bridge (-16) >>>>>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>>>>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>>>>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>>>>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>>>>> exynos-dp failed with error -16 >>>>>> >>>>>> I will investigate details later in the evening. >>>>> >>>>> The failure is caused by trying to add plat_data->next_bridge twice >>>>> (from exynos_dp's .attach callback, and from analogix' ->bind >>>>> callback). >>>>> >>>>> >>>>> Best regards >>>> >>>> I see. The bridge attachment for the next bridge was not well thought >>>> out. It may be better to move panel_bridge addition a little forward >>>> and remove next_bridge attachment on the Analogix side. Then, the >>>> Rockchip side and Exynos side can do their own next_bridge attachment >>>> in &analogix_dp_plat_data.attach() as they want. >>>> >>>> Could you please help test the following modifications(they have been >>>> tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) >>> >>> Assuming that I properly applied the malformed diff, it doesn't solve >>> all the issues. There are no errors reported though, but the display >>> chain doesn't work and no valid mode is reported: >>> >>> # dmesg | grep drm >>> [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on >>> minor 0 >>> [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA >>> mapping operations >>> [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops >>> fimd_component_ops) >>> [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops >>> mixer_component_ops) >>> [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller (ops >>> exynos_dp_ops) >>> [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops >>> hdmi_component_ops) >>> [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on minor 1 >>> [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>> sizes >>> [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>> sizes >>> >>> # ./modetest -c -Mexynos >>> Connectors: >>> id encoder status name size (mm) modes >>> encoders >>> 69 0 disconnected LVDS-1 0x0 0 >>> 68 >>> props: >>> 1 EDID: >>> flags: immutable blob >>> blobs: >>> >>> value: >>> 2 DPMS: >>> flags: enum >>> enums: On=0 Standby=1 Suspend=2 Off=3 >>> value: 0 >>> 5 link-status: >>> flags: enum >>> enums: Good=0 Bad=1 >>> value: 0 >>> 6 non-desktop: >>> flags: immutable range >>> values: 0 1 >>> value: 0 >>> 4 TILE: >>> flags: immutable blob >>> blobs: >>> >>> value: >>> 71 0 disconnected HDMI-A-1 0x0 0 >>> 70 >>> props: >>> 1 EDID: >>> flags: immutable blob >>> blobs: >>> >>> value: >>> 2 DPMS: >>> flags: enum >>> enums: On=0 Standby=1 Suspend=2 Off=3 >>> value: 0 >>> 5 link-status: >>> flags: enum >>> enums: Good=0 Bad=1 >>> value: 0 >>> 6 non-desktop: >>> flags: immutable range >>> values: 0 1 >>> value: 0 >>> 4 TILE: >>> flags: immutable blob >>> blobs: >>> >>> value: >>> >>> >>> I will investigate details later this week. >>> >> >> Could you please provide the related DTS file for the test? I will >> also try to find out the reason for this unexpected issue. ;-) > > Unfortunately I didn't find enough time to debug this further. The above > log is from Samsung Snow Chromebook, > arch/arm/boot/dts/samsung/exynos5250-snow.dts > > I compare the differences in the following display path before and after this patch series: exynos_dp -> nxp-ptn3460 -> panel "auo,b116xw03" The issue is likely caused by the &drm_connector_funcs.detect() related logic. Before this patch series, the nxp-ptn3460 connector is always connector_status_connected because there is not available &drm_connector_funcs.detect(). After it, the DRM_BRIDGE_OP_DETECT flag make the connection status depend on analogix_dp_bridge_detect(). Could you please add the following patches additionally and try again? (Not the final solution, just validation) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a93ff8f0a468..355911c47354 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) } } - bridge->ops = DRM_BRIDGE_OP_DETECT | - DRM_BRIDGE_OP_EDID | + bridge->ops = DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_MODES; + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) + bridge->ops |= DRM_BRIDGE_OP_DETECT; + bridge->of_node = dp->dev->of_node; bridge->type = DRM_MODE_CONNECTOR_eDP; ret = devm_drm_bridge_add(dp->dev, &dp->bridge); Best regards, Damon
On 01.09.2025 05:41, Damon Ding wrote: > On 8/29/2025 4:23 PM, Marek Szyprowski wrote: >> On 29.08.2025 10:08, Damon Ding wrote: >>> On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >>>> On 15.08.2025 04:59, Damon Ding wrote: >>>>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>>>> PATCH 1 is a small format optimization for struct >>>>>>>> analogid_dp_device. >>>>>>>> PATCH 2 is to perform mode setting in >>>>>>>> &drm_bridge_funcs.atomic_enable. >>>>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>>>> side. >>>>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>>>> >>>>>>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's >>>>>>> Kconfig, >>>>>>> so it causes build break: >>>>>>> >>>>>>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>>>>>> `drm_bridge_connector_init' >>>>>>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>>>>>> >>>>>>> After adding this dependency, the Exynos DP driver stops >>>>>>> working. On >>>>>>> Samsung Snow Chromebook I observed following issue: >>>>>>> >>>>>>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>>>>>> following panel or bridge (-16) >>>>>>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>>>>>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>>>>>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>>>>>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>>>>>> exynos-dp failed with error -16 >>>>>>> >>>>>>> I will investigate details later in the evening. >>>>>> >>>>>> The failure is caused by trying to add plat_data->next_bridge twice >>>>>> (from exynos_dp's .attach callback, and from analogix' ->bind >>>>>> callback). >>>>>> >>>>>> >>>>>> Best regards >>>>> >>>>> I see. The bridge attachment for the next bridge was not well thought >>>>> out. It may be better to move panel_bridge addition a little forward >>>>> and remove next_bridge attachment on the Analogix side. Then, the >>>>> Rockchip side and Exynos side can do their own next_bridge attachment >>>>> in &analogix_dp_plat_data.attach() as they want. >>>>> >>>>> Could you please help test the following modifications(they have been >>>>> tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) >>>> >>>> Assuming that I properly applied the malformed diff, it doesn't solve >>>> all the issues. There are no errors reported though, but the display >>>> chain doesn't work and no valid mode is reported: >>>> >>>> # dmesg | grep drm >>>> [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on >>>> minor 0 >>>> [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA >>>> mapping operations >>>> [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops >>>> fimd_component_ops) >>>> [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops >>>> mixer_component_ops) >>>> [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller >>>> (ops >>>> exynos_dp_ops) >>>> [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops >>>> hdmi_component_ops) >>>> [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on >>>> minor 1 >>>> [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>>> sizes >>>> [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>>> sizes >>>> >>>> # ./modetest -c -Mexynos >>>> Connectors: >>>> id encoder status name size (mm) modes >>>> encoders >>>> 69 0 disconnected LVDS-1 0x0 0 >>>> 68 >>>> props: >>>> 1 EDID: >>>> flags: immutable blob >>>> blobs: >>>> >>>> value: >>>> 2 DPMS: >>>> flags: enum >>>> enums: On=0 Standby=1 Suspend=2 Off=3 >>>> value: 0 >>>> 5 link-status: >>>> flags: enum >>>> enums: Good=0 Bad=1 >>>> value: 0 >>>> 6 non-desktop: >>>> flags: immutable range >>>> values: 0 1 >>>> value: 0 >>>> 4 TILE: >>>> flags: immutable blob >>>> blobs: >>>> >>>> value: >>>> 71 0 disconnected HDMI-A-1 0x0 0 >>>> 70 >>>> props: >>>> 1 EDID: >>>> flags: immutable blob >>>> blobs: >>>> >>>> value: >>>> 2 DPMS: >>>> flags: enum >>>> enums: On=0 Standby=1 Suspend=2 Off=3 >>>> value: 0 >>>> 5 link-status: >>>> flags: enum >>>> enums: Good=0 Bad=1 >>>> value: 0 >>>> 6 non-desktop: >>>> flags: immutable range >>>> values: 0 1 >>>> value: 0 >>>> 4 TILE: >>>> flags: immutable blob >>>> blobs: >>>> >>>> value: >>>> >>>> >>>> I will investigate details later this week. >>>> >>> >>> Could you please provide the related DTS file for the test? I will >>> also try to find out the reason for this unexpected issue. ;-) >> >> Unfortunately I didn't find enough time to debug this further. The above >> log is from Samsung Snow Chromebook, >> arch/arm/boot/dts/samsung/exynos5250-snow.dts >> >> > > I compare the differences in the following display path before and > after this patch series: > > exynos_dp -> nxp-ptn3460 -> panel "auo,b116xw03" > > The issue is likely caused by the &drm_connector_funcs.detect() > related logic. Before this patch series, the nxp-ptn3460 connector is > always connector_status_connected because there is not available > &drm_connector_funcs.detect(). After it, the DRM_BRIDGE_OP_DETECT flag > make the connection status depend on analogix_dp_bridge_detect(). > > Could you please add the following patches additionally and try again? > (Not the final solution, just validation) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index a93ff8f0a468..355911c47354 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device > *dp, struct drm_device *drm_dev) > } > } > > - bridge->ops = DRM_BRIDGE_OP_DETECT | > - DRM_BRIDGE_OP_EDID | > + bridge->ops = DRM_BRIDGE_OP_EDID | > DRM_BRIDGE_OP_MODES; > + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) > + bridge->ops |= DRM_BRIDGE_OP_DETECT; > + > bridge->of_node = dp->dev->of_node; > bridge->type = DRM_MODE_CONNECTOR_eDP; > ret = devm_drm_bridge_add(dp->dev, &dp->bridge); It is better. Now the display panel is detected and reported to userspace, but it looks that something is not properly initialized, because there is garbage instead of the proper picture. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 9/1/2025 6:25 PM, Marek Szyprowski wrote: > On 01.09.2025 05:41, Damon Ding wrote: >> On 8/29/2025 4:23 PM, Marek Szyprowski wrote: >>> On 29.08.2025 10:08, Damon Ding wrote: >>>> On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >>>>> On 15.08.2025 04:59, Damon Ding wrote: >>>>>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>>>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>>>>> PATCH 1 is a small format optimization for struct >>>>>>>>> analogid_dp_device. >>>>>>>>> PATCH 2 is to perform mode setting in >>>>>>>>> &drm_bridge_funcs.atomic_enable. >>>>>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector helper. >>>>>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>>>>> side. >>>>>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>>>>> >>>>>>>> This series lacks 'select DRM_BRIDGE_CONNECTOR' in ExynosDP's >>>>>>>> Kconfig, >>>>>>>> so it causes build break: >>>>>>>> >>>>>>>> drivers/gpu/drm/exynos/exynos_dp.c:177: undefined reference to >>>>>>>> `drm_bridge_connector_init' >>>>>>>> make[2]: *** [scripts/Makefile.vmlinux:91: vmlinux] Error 1 >>>>>>>> >>>>>>>> After adding this dependency, the Exynos DP driver stops >>>>>>>> working. On >>>>>>>> Samsung Snow Chromebook I observed following issue: >>>>>>>> >>>>>>>> [ 4.534220] exynos-dp 145b0000.dp-controller: failed to attach >>>>>>>> following panel or bridge (-16) >>>>>>>> [ 4.543428] exynos-drm exynos-drm: failed to bind >>>>>>>> 145b0000.dp-controller (ops exynos_dp_ops): -16 >>>>>>>> [ 4.551775] exynos-drm exynos-drm: adev bind failed: -16 >>>>>>>> [ 4.556559] exynos-dp 145b0000.dp-controller: probe with driver >>>>>>>> exynos-dp failed with error -16 >>>>>>>> >>>>>>>> I will investigate details later in the evening. >>>>>>> >>>>>>> The failure is caused by trying to add plat_data->next_bridge twice >>>>>>> (from exynos_dp's .attach callback, and from analogix' ->bind >>>>>>> callback). >>>>>>> >>>>>>> >>>>>>> Best regards >>>>>> >>>>>> I see. The bridge attachment for the next bridge was not well thought >>>>>> out. It may be better to move panel_bridge addition a little forward >>>>>> and remove next_bridge attachment on the Analogix side. Then, the >>>>>> Rockchip side and Exynos side can do their own next_bridge attachment >>>>>> in &analogix_dp_plat_data.attach() as they want. >>>>>> >>>>>> Could you please help test the following modifications(they have been >>>>>> tested on my RK3588S EVB1 Board) on the Samsung Snow Chromebook? ;-) >>>>> >>>>> Assuming that I properly applied the malformed diff, it doesn't solve >>>>> all the issues. There are no errors reported though, but the display >>>>> chain doesn't work and no valid mode is reported: >>>>> >>>>> # dmesg | grep drm >>>>> [ 3.384992] [drm] Initialized panfrost 1.4.0 for 11800000.gpu on >>>>> minor 0 >>>>> [ 4.487739] [drm] Exynos DRM: using 14400000.fimd device for DMA >>>>> mapping operations >>>>> [ 4.494202] exynos-drm exynos-drm: bound 14400000.fimd (ops >>>>> fimd_component_ops) >>>>> [ 4.502374] exynos-drm exynos-drm: bound 14450000.mixer (ops >>>>> mixer_component_ops) >>>>> [ 4.511930] exynos-drm exynos-drm: bound 145b0000.dp-controller >>>>> (ops >>>>> exynos_dp_ops) >>>>> [ 4.518411] exynos-drm exynos-drm: bound 14530000.hdmi (ops >>>>> hdmi_component_ops) >>>>> [ 4.529628] [drm] Initialized exynos 1.1.0 for exynos-drm on >>>>> minor 1 >>>>> [ 4.657434] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>>>> sizes >>>>> [ 4.925023] exynos-drm exynos-drm: [drm] Cannot find any crtc or >>>>> sizes >>>>> >>>>> # ./modetest -c -Mexynos >>>>> Connectors: >>>>> id encoder status name size (mm) modes >>>>> encoders >>>>> 69 0 disconnected LVDS-1 0x0 0 >>>>> 68 >>>>> props: >>>>> 1 EDID: >>>>> flags: immutable blob >>>>> blobs: >>>>> >>>>> value: >>>>> 2 DPMS: >>>>> flags: enum >>>>> enums: On=0 Standby=1 Suspend=2 Off=3 >>>>> value: 0 >>>>> 5 link-status: >>>>> flags: enum >>>>> enums: Good=0 Bad=1 >>>>> value: 0 >>>>> 6 non-desktop: >>>>> flags: immutable range >>>>> values: 0 1 >>>>> value: 0 >>>>> 4 TILE: >>>>> flags: immutable blob >>>>> blobs: >>>>> >>>>> value: >>>>> 71 0 disconnected HDMI-A-1 0x0 0 >>>>> 70 >>>>> props: >>>>> 1 EDID: >>>>> flags: immutable blob >>>>> blobs: >>>>> >>>>> value: >>>>> 2 DPMS: >>>>> flags: enum >>>>> enums: On=0 Standby=1 Suspend=2 Off=3 >>>>> value: 0 >>>>> 5 link-status: >>>>> flags: enum >>>>> enums: Good=0 Bad=1 >>>>> value: 0 >>>>> 6 non-desktop: >>>>> flags: immutable range >>>>> values: 0 1 >>>>> value: 0 >>>>> 4 TILE: >>>>> flags: immutable blob >>>>> blobs: >>>>> >>>>> value: >>>>> >>>>> >>>>> I will investigate details later this week. >>>>> >>>> >>>> Could you please provide the related DTS file for the test? I will >>>> also try to find out the reason for this unexpected issue. ;-) >>> >>> Unfortunately I didn't find enough time to debug this further. The above >>> log is from Samsung Snow Chromebook, >>> arch/arm/boot/dts/samsung/exynos5250-snow.dts >>> >>> >> >> I compare the differences in the following display path before and >> after this patch series: >> >> exynos_dp -> nxp-ptn3460 -> panel "auo,b116xw03" >> >> The issue is likely caused by the &drm_connector_funcs.detect() >> related logic. Before this patch series, the nxp-ptn3460 connector is >> always connector_status_connected because there is not available >> &drm_connector_funcs.detect(). After it, the DRM_BRIDGE_OP_DETECT flag >> make the connection status depend on analogix_dp_bridge_detect(). >> >> Could you please add the following patches additionally and try again? >> (Not the final solution, just validation) >> >> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> index a93ff8f0a468..355911c47354 100644 >> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >> @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device >> *dp, struct drm_device *drm_dev) >> } >> } >> >> - bridge->ops = DRM_BRIDGE_OP_DETECT | >> - DRM_BRIDGE_OP_EDID | >> + bridge->ops = DRM_BRIDGE_OP_EDID | >> DRM_BRIDGE_OP_MODES; >> + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) >> + bridge->ops |= DRM_BRIDGE_OP_DETECT; >> + >> bridge->of_node = dp->dev->of_node; >> bridge->type = DRM_MODE_CONNECTOR_eDP; >> ret = devm_drm_bridge_add(dp->dev, &dp->bridge); > > It is better. Now the display panel is detected and reported to > userspace, but it looks that something is not properly initialized, > because there is garbage instead of the proper picture. > I simulated the display path mentioned above on my RK3588S EVB1 Board. To my slight surprise, it displayed normally with the reported connector type DRM_MODE_CONNECTOR_LVDS. ;-) The modifications included: 1.Synchronized the Analogix DP ralated DT configurations with Samsung Snow Chromebook. 2.Skipped the I2C transfers and GPIO operations in nxp-ptn3460 driver. 3.Set the EDID to that of eDP Panel LP079QX1-SP0V forcibly. Additionally, I added debug logs to verify whether the functions in ptn3460_bridge_funcs were actually called. Did you encounter any unexpected logs during your investigation? I'd like to perform additional tests on this issue. :-) Best regards, Damon diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588s-evb1-v10.dts index 0df3e80f2dd9..51ce63fce6ee 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-evb1-v10.dts @@ -26,6 +26,18 @@ chosen { stdout-path = "serial2:1500000n8"; }; + panel: panel { + compatible = "auo,b116xw03"; + power-supply = <&vcc3v3_lcd_edp>; + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&bridge_out>; + }; + }; + }; + adc-keys { compatible = "adc-keys"; io-channels = <&saradc 1>; @@ -242,21 +254,6 @@ &combphy2_psu { &edp0 { force-hpd; status = "okay"; - - aux-bus { - panel { - compatible = "edp-panel"; - backlight = <&backlight>; - power-supply = <&vcc3v3_lcd_edp>; - no-hpd; - - port { - panel_in_edp: endpoint { - remote-endpoint = <&edp_out_panel>; - }; - }; - }; - }; }; &edp0_in { @@ -266,8 +263,8 @@ edp0_in_vp2: endpoint { }; &edp0_out { - edp_out_panel: endpoint { - remote-endpoint = <&panel_in_edp>; + dp_out: endpoint { + remote-endpoint = <&bridge_in>; }; }; @@ -290,6 +287,33 @@ es8388: audio-codec@11 { PVDD-supply = <&vcc_3v3_s0>; #sound-dai-cells = <0>; }; + + ptn3460: lvds-bridge@20 { + compatible = "nxp,ptn3460"; + reg = <0x20>; + edid-emulation = <5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + bridge_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + + port@1 { + reg = <1>; + + bridge_in: endpoint { + remote-endpoint = <&dp_out>; + }; + }; + }; + }; }; &i2c8 { diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a93ff8f0a468..355911c47354 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) } } - bridge->ops = DRM_BRIDGE_OP_DETECT | - DRM_BRIDGE_OP_EDID | + bridge->ops = DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_MODES; + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) + bridge->ops |= DRM_BRIDGE_OP_DETECT; + bridge->of_node = dp->dev->of_node; bridge->type = DRM_MODE_CONNECTOR_eDP; ret = devm_drm_bridge_add(dp->dev, &dp->bridge); diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index 7acb11f16dc1..cafbdcda2d29 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -52,6 +52,7 @@ static int ptn3460_read_bytes(struct ptn3460_bridge *ptn_bridge, char addr, { int ret; + return 0; ret = i2c_master_send(ptn_bridge->client, &addr, 1); if (ret < 0) { DRM_ERROR("Failed to send i2c command, ret=%d\n", ret); @@ -90,6 +91,7 @@ static int ptn3460_select_edid(struct ptn3460_bridge *ptn_bridge) int ret; char val; + return 0; /* Load the selected edid into SRAM (accessed at PTN3460_EDID_ADDR) */ ret = ptn3460_write_byte(ptn_bridge, PTN3460_EDID_SRAM_LOAD_ADDR, ptn_bridge->edid_emulation); @@ -152,6 +154,21 @@ static void ptn3460_disable(struct drm_bridge *bridge) gpiod_set_value(ptn_bridge->gpio_pd_n, 0); } +static const u8 edid_data[] = { + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x16, 0x83, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x17, 0x01, 0x00, + 0xA5, 0x10, 0x0C, 0x78, 0x06, 0xEF, 0x05, 0xA3, 0x54, 0x4C, + 0x99, 0x26, 0x0F, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0xEA, 0x4E, 0x00, 0x4C, 0x60, 0x00, + 0x14, 0x80, 0x0C, 0x10, 0x84, 0x00, 0x78, 0xA0, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFE, 0x00, 0x4C, 0x50, 0x30, 0x37, 0x39, + 0x51, 0x58, 0x31, 0x2D, 0x53, 0x50, 0x30, 0x56, 0x00, 0x00, + 0x00, 0xFC, 0x00, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x20, 0x4C, + 0x43, 0x44, 0x0A, 0x20, 0x20, 0x20, 0x00, 0x3F +}; static const struct drm_edid *ptn3460_edid_read(struct drm_bridge *bridge, struct drm_connector *connector) @@ -178,7 +195,8 @@ static const struct drm_edid *ptn3460_edid_read(struct drm_bridge *bridge, goto out; } - drm_edid = drm_edid_alloc(edid, EDID_LENGTH); + kfree(edid); + drm_edid = drm_edid_alloc(edid_data, EDID_LENGTH); out: if (power_off) @@ -273,7 +291,7 @@ static int ptn3460_probe(struct i2c_client *client) ptn_bridge->panel_bridge = panel_bridge; ptn_bridge->client = client; - ptn_bridge->gpio_pd_n = devm_gpiod_get(&client->dev, "powerdown", + ptn_bridge->gpio_pd_n = devm_gpiod_get_optional(&client->dev, "powerdown", GPIOD_OUT_HIGH); if (IS_ERR(ptn_bridge->gpio_pd_n)) { ret = PTR_ERR(ptn_bridge->gpio_pd_n); @@ -285,7 +303,7 @@ static int ptn3460_probe(struct i2c_client *client) * Request the reset pin low to avoid the bridge being * initialized prematurely */ - ptn_bridge->gpio_rst_n = devm_gpiod_get(&client->dev, "reset", + ptn_bridge->gpio_rst_n = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ptn_bridge->gpio_rst_n)) { ret = PTR_ERR(ptn_bridge->gpio_rst_n); diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index 80ba700d2964..d0422f940249 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -104,7 +104,7 @@ static int exynos_dp_bridge_attach(struct analogix_dp_plat_data *plat_data, /* Pre-empt DP connector creation if there's a bridge */ if (plat_data->next_bridge) { ret = drm_bridge_attach(&dp->encoder, plat_data->next_bridge, bridge, - 0); + DRM_BRIDGE_ATTACH_NO_CONNECTOR); if (ret) return ret; }
On 04.09.2025 05:19, Damon Ding wrote: > On 9/1/2025 6:25 PM, Marek Szyprowski wrote: >> On 01.09.2025 05:41, Damon Ding wrote: >>> On 8/29/2025 4:23 PM, Marek Szyprowski wrote: >>>> On 29.08.2025 10:08, Damon Ding wrote: >>>>> On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >>>>>> On 15.08.2025 04:59, Damon Ding wrote: >>>>>>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>>>>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>>>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>>>>>> PATCH 1 is a small format optimization for struct >>>>>>>>>> analogid_dp_device. >>>>>>>>>> PATCH 2 is to perform mode setting in >>>>>>>>>> &drm_bridge_funcs.atomic_enable. >>>>>>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector >>>>>>>>>> helper. >>>>>>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>>>>>> side. >>>>>>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>>>>>> ... >>>>>> >>>>> >>>>> Could you please provide the related DTS file for the test? I will >>>>> also try to find out the reason for this unexpected issue. ;-) >>>> >>>> Unfortunately I didn't find enough time to debug this further. The >>>> above >>>> log is from Samsung Snow Chromebook, >>>> arch/arm/boot/dts/samsung/exynos5250-snow.dts >>>> >>>> >>> >>> I compare the differences in the following display path before and >>> after this patch series: >>> >>> exynos_dp -> nxp-ptn3460 -> panel "auo,b116xw03" >>> >>> The issue is likely caused by the &drm_connector_funcs.detect() >>> related logic. Before this patch series, the nxp-ptn3460 connector is >>> always connector_status_connected because there is not available >>> &drm_connector_funcs.detect(). After it, the DRM_BRIDGE_OP_DETECT flag >>> make the connection status depend on analogix_dp_bridge_detect(). >>> >>> Could you please add the following patches additionally and try again? >>> (Not the final solution, just validation) >>> >>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>> index a93ff8f0a468..355911c47354 100644 >>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>> @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device >>> *dp, struct drm_device *drm_dev) >>> } >>> } >>> >>> - bridge->ops = DRM_BRIDGE_OP_DETECT | >>> - DRM_BRIDGE_OP_EDID | >>> + bridge->ops = DRM_BRIDGE_OP_EDID | >>> DRM_BRIDGE_OP_MODES; >>> + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) >>> + bridge->ops |= DRM_BRIDGE_OP_DETECT; >>> + >>> bridge->of_node = dp->dev->of_node; >>> bridge->type = DRM_MODE_CONNECTOR_eDP; >>> ret = devm_drm_bridge_add(dp->dev, &dp->bridge); >> >> It is better. Now the display panel is detected and reported to >> userspace, but it looks that something is not properly initialized, >> because there is garbage instead of the proper picture. >> > > I simulated the display path mentioned above on my RK3588S EVB1 Board. > To my slight surprise, it displayed normally with the reported > connector type DRM_MODE_CONNECTOR_LVDS. ;-) > > The modifications included: > 1.Synchronized the Analogix DP ralated DT configurations with Samsung > Snow Chromebook. > 2.Skipped the I2C transfers and GPIO operations in nxp-ptn3460 driver. > 3.Set the EDID to that of eDP Panel LP079QX1-SP0V forcibly. > > Additionally, I added debug logs to verify whether the functions in > ptn3460_bridge_funcs were actually called. > > Did you encounter any unexpected logs during your investigation? I'd > like to perform additional tests on this issue. :-) Okay, I've finally went to the office and tested manually all 3 Chromebook boards witch use exynos-dp based display hardware. Previously I only did the remote tests and observed result on a webcam, which was not directed directly at the tested displays, so I only saw the glare from the display panel. The results are as follows: 1. Snow (arch/arm/boot/dts/samsung/exynos5250-snow.dts) - exynos-dp -> nxp-ptn3460 1366x768 lvds panel - works fine with the above mentioned change. 2. Peach-Pit (arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts) - exynos-dp -> parade,ps8625 -> auo,b116xw03 1366x768 lvds panel - displays garbage, this was the only board I previously was able to see partially on the webcam. 3. Peach-Pi (arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts) - exynos-dp -> auo,b133htn01 1920x1080 edp panel - also displays garbage. Then I found why both Peach boards displays garbage on boot - the framebuffer emulation is initialized for 1024x786 resolution, which is not handled by those panels. This is a bit strange, because the connector implemented by the panel reports proper native mode to drm and userspace. 'modetest -c' shows the right resolution. Also when I run 'modetest -s' with the panel's native resolution then the test pattern is correctly displayed on all three boards. Then I've played a bit with the analogix code and it looks that this 1024x768 mode is some kind default mode which comes from analogix_dp_bridge_edid_read() function, which has been introduced by this patchset. When I removed DRM_BRIDGE_OP_EDID flag from bridge->ops, then I got it finally working again properly on all three boards. I hope this helps fixing this issue. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Hi Marek, On 9/4/2025 9:27 PM, Marek Szyprowski wrote: > On 04.09.2025 05:19, Damon Ding wrote: >> On 9/1/2025 6:25 PM, Marek Szyprowski wrote: >>> On 01.09.2025 05:41, Damon Ding wrote: >>>> On 8/29/2025 4:23 PM, Marek Szyprowski wrote: >>>>> On 29.08.2025 10:08, Damon Ding wrote: >>>>>> On 8/20/2025 5:20 AM, Marek Szyprowski wrote: >>>>>>> On 15.08.2025 04:59, Damon Ding wrote: >>>>>>>> On 2025/8/15 5:16, Marek Szyprowski wrote: >>>>>>>>> On 14.08.2025 16:33, Marek Szyprowski wrote: >>>>>>>>>> On 14.08.2025 12:47, Damon Ding wrote: >>>>>>>>>>> PATCH 1 is a small format optimization for struct >>>>>>>>>>> analogid_dp_device. >>>>>>>>>>> PATCH 2 is to perform mode setting in >>>>>>>>>>> &drm_bridge_funcs.atomic_enable. >>>>>>>>>>> PATCH 3-6 are preparations for apply drm_bridge_connector >>>>>>>>>>> helper. >>>>>>>>>>> PATCH 7 is to apply the drm_bridge_connector helper. >>>>>>>>>>> PATCH 8-10 are to move the panel/bridge parsing to the Analogix >>>>>>>>>>> side. >>>>>>>>>>> PATCH 11-12 are preparations for apply panel_bridge helper. >>>>>>>>>>> PATCH 13 is to apply the panel_bridge helper. >>>>>>>>>> ... >>>>>>> >>>>>> >>>>>> Could you please provide the related DTS file for the test? I will >>>>>> also try to find out the reason for this unexpected issue. ;-) >>>>> >>>>> Unfortunately I didn't find enough time to debug this further. The >>>>> above >>>>> log is from Samsung Snow Chromebook, >>>>> arch/arm/boot/dts/samsung/exynos5250-snow.dts >>>>> >>>>> >>>> >>>> I compare the differences in the following display path before and >>>> after this patch series: >>>> >>>> exynos_dp -> nxp-ptn3460 -> panel "auo,b116xw03" >>>> >>>> The issue is likely caused by the &drm_connector_funcs.detect() >>>> related logic. Before this patch series, the nxp-ptn3460 connector is >>>> always connector_status_connected because there is not available >>>> &drm_connector_funcs.detect(). After it, the DRM_BRIDGE_OP_DETECT flag >>>> make the connection status depend on analogix_dp_bridge_detect(). >>>> >>>> Could you please add the following patches additionally and try again? >>>> (Not the final solution, just validation) >>>> >>>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>>> index a93ff8f0a468..355911c47354 100644 >>>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c >>>> @@ -1491,9 +1491,11 @@ int analogix_dp_bind(struct analogix_dp_device >>>> *dp, struct drm_device *drm_dev) >>>> } >>>> } >>>> >>>> - bridge->ops = DRM_BRIDGE_OP_DETECT | >>>> - DRM_BRIDGE_OP_EDID | >>>> + bridge->ops = DRM_BRIDGE_OP_EDID | >>>> DRM_BRIDGE_OP_MODES; >>>> + if (drm_bridge_is_panel(dp->plat_data->next_bridge)) >>>> + bridge->ops |= DRM_BRIDGE_OP_DETECT; >>>> + >>>> bridge->of_node = dp->dev->of_node; >>>> bridge->type = DRM_MODE_CONNECTOR_eDP; >>>> ret = devm_drm_bridge_add(dp->dev, &dp->bridge); >>> >>> It is better. Now the display panel is detected and reported to >>> userspace, but it looks that something is not properly initialized, >>> because there is garbage instead of the proper picture. >>> >> >> I simulated the display path mentioned above on my RK3588S EVB1 Board. >> To my slight surprise, it displayed normally with the reported >> connector type DRM_MODE_CONNECTOR_LVDS. ;-) >> >> The modifications included: >> 1.Synchronized the Analogix DP ralated DT configurations with Samsung >> Snow Chromebook. >> 2.Skipped the I2C transfers and GPIO operations in nxp-ptn3460 driver. >> 3.Set the EDID to that of eDP Panel LP079QX1-SP0V forcibly. >> >> Additionally, I added debug logs to verify whether the functions in >> ptn3460_bridge_funcs were actually called. >> >> Did you encounter any unexpected logs during your investigation? I'd >> like to perform additional tests on this issue. :-) > > > Okay, I've finally went to the office and tested manually all 3 > Chromebook boards witch use exynos-dp based display hardware. Previously > I only did the remote tests and observed result on a webcam, which was > not directed directly at the tested displays, so I only saw the glare > from the display panel. > > The results are as follows: > > 1. Snow (arch/arm/boot/dts/samsung/exynos5250-snow.dts) - exynos-dp -> > nxp-ptn3460 1366x768 lvds panel - works fine with the above mentioned > change. > > 2. Peach-Pit (arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts) - > exynos-dp -> parade,ps8625 -> auo,b116xw03 1366x768 lvds panel - > displays garbage, this was the only board I previously was able to see > partially on the webcam. > > 3. Peach-Pi (arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts) - > exynos-dp -> auo,b133htn01 1920x1080 edp panel - also displays garbage. > > Then I found why both Peach boards displays garbage on boot - the > framebuffer emulation is initialized for 1024x786 resolution, which is > not handled by those panels. This is a bit strange, because the > connector implemented by the panel reports proper native mode to drm and > userspace. 'modetest -c' shows the right resolution. Also when I run > 'modetest -s' with the panel's native resolution then the test pattern > is correctly displayed on all three boards. > > > Then I've played a bit with the analogix code and it looks that this > 1024x768 mode is some kind default mode which comes from > analogix_dp_bridge_edid_read() function, which has been introduced by > this patchset. When I removed DRM_BRIDGE_OP_EDID flag from bridge->ops, > then I got it finally working again properly on all three boards. I hope > this helps fixing this issue. > Thank you for your help with the investigation. :-) Based on your helpful findings and Dmitry's earlier suggestions[0], it is better to distinguish the &drm_bridge->ops of Analogix bridge based on whether the downstream device is a panel, a bridge or neither. 1. If there is a panel after, the &drm_bridge->ops should be set to DRM_BRIDGE_OP_MODES | DRM_BRIDGE_OP_DETECT. Since the &drm_bridge->ops of panel_bridge is DRM_BRIDGE_OP_MODES and the panel-edp driver reads EDID in &drm_panel_funcs.get_modes(), the DRM_BRIDGE_OP_EDID should be removed to ensure proper invocation for the &drm_bridge_funcs.get_modes() of panel_bridge. 2. If there is a bridge after, the &drm_bridge->ops should be set to NULL. The OP_EDID and OP_MODES supports depends on the next bridge rather than the Analogix bridge. According to your investigation, nxp-ptn3460 supports &drm_bridge_funcs.edid_read() while parade-ps8625 do not. Additionally, since some bridges does not support &drm_bridge_funcs.detect(), which regards as connector_status_connected by default according to drm_helper_probe_detect()(drivers/gpu/drm_probe_helper.c), the connection status should also depends on the next bridge rather than the Analogix bridge. 3. If there is neither a panel nor a bridge, the &drm_bridge->ops should be set to DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_DETECT. In this case, the Analogix DP driver may work in the DP mode, so the OP_EDID and OP_DETECT supports should be helpful. Best regards, Damon [0]https://lore.kernel.org/all/incxmqneeurgli5h6p3hn3bgztxrzyk5eq2h5nq4lgzalohslq@mvehvr4cgyim/
© 2016 - 2025 Red Hat, Inc.