Re: [PATCH v10 11/18] drm/bridge: analogix_dp: Apply drm_bridge_connector helper
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
Date: 2026-03-16 11:39:40
Also in:
dri-devel, imx, linux-rockchip, linux-samsung-soc, lkml
On Mon Mar 16, 2026 at 4:17 AM CET, Damon Ding wrote:
Hi Luca, On 3/14/2026 1:10 AM, Luca Ceresoli wrote:quoted
Hello Damon, On Tue Mar 10, 2026 at 2:24 AM CET, Damon Ding wrote:quoted
Initialize bridge_connector for both Rockchip and Exynos encoder sides. Then, make DRM_BRIDGE_ATTACH_NO_CONNECTOR mandatory for Analogix bridge side, as the private &drm_connector is no longer created. The previous &drm_connector_funcs and &drm_connector_helper_funcs APIs are replaced by the corresponding &drm_bridge_funcs APIs: analogix_dp_atomic_check() -> analogix_dp_bridge_atomic_check() analogix_dp_detect() -> analogix_dp_bridge_detect() analogix_dp_get_modes() -> analogix_dp_bridge_get_modes() analogix_dp_bridge_edid_read() Additionally, the compatibilities of Analogix DP bridge based on whether the next bridge is a 'panel'. If it is, OP_MODES and OP_DETECT are supported; If not (the next bridge is a 'monitor' or a bridge chip), OP_EDID and OP_DETECT are supported. The devm_drm_bridge_add() is placed in analogix_dp_bind() instead of analogix_dp_probe(), because the type of next bridge (the panel, monitor or bridge chip) can only be determined after the probe process has fully completed. Signed-off-by: Damon Ding <redacted> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Heiko Stuebner <heiko@sntech.de> (on rk3588)...quoted
@@ -73,15 +72,12 @@ static int exynos_dp_bridge_attach(struct analogix_dp_plat_data *plat_data, struct drm_bridge *bridge) { struct exynos_dp_device *dp = to_dp(plat_data); - enum drm_bridge_attach_flags flags = 0; int ret; /* Pre-empt DP connector creation if there's a bridge */ if (plat_data->next_bridge) { - if (dp->has_of_bridge) - flags = DRM_BRIDGE_ATTACH_NO_CONNECTOR; - - ret = drm_bridge_attach(&dp->encoder, plat_data->next_bridge, bridge, flags); + ret = drm_bridge_attach(&dp->encoder, plat_data->next_bridge, bridge, + DRM_BRIDGE_ATTACH_NO_CONNECTOR);Should this be 'flags | DRM_BRIDGE_ATTACH_NO_CONNECTOR' to be future-proof?Aha, the exynos_dp_bridge_attach() and even &analogix_dp_plat_data.attach() have been removed in [PATCH v10 16/18] for consistency and simplification. Since the only bridge flag supported right now is DRM_BRIDGE_ATTACH_NO_CONNECTOR, let’s leave this as is for now. ;-)
As you are going to send v11, I'd do that change. It is the right thing do to, it's cheap, and in case patches up to 11/18 but not (yet) up to 16/18 we avoid ending up with unoptimal code until patch 16/18 is applied. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com