On Sun, May 31, 2026 at 11:16:51PM +0200, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <[email protected]>
> 
> drm_edid_read_ddc() can return a structurally valid EDID from which

When?

> drm_edid_connector_add_modes() still returns zero modes. This triggers
> the error:

Please at least add EDID contents.

> 
>   [drm:msm_dp_bridge_get_modes [msm]] *ERROR* failed to get DP sink
>    modes, rc=0
> 
> even though the link is ready. Since the EDID is only read once, this
> error persists and the display comes up with 640x480 resolution.

Please check with the current next tree, we have reworked HPD handling a
bit. Also, it might be the case that the dongle sends a placeholder
first and then sends a HPD or IRQ_HPD event. Please check if that's the
case.

> 
> Add a retry of drm_edid_read_ddc() inside get_modes() when the initial
> read produces no usable modes. The bad EDID is freed before retrying
> and container_of ensures access to the DDC channel. This directly
> addresses the observed "valid but empty/garbage" EDID case on
> flaky DP plugs and adapters.
> 
> I tested this on a few of my "flaky" type-c to HDMI adapters and hubs,
> getting no "retry failed" messages and the desired resolution. Without
> the patch most plugs would result in 640x480 external display.
> 
> Fixes: [5bea90ad9743d2] "drm/msm/dp: switch to struct drm_edid"

Hard to believe.

> 
> Signed-off-by: Jens Glathe <[email protected]>
> ---
>  drivers/gpu/drm/msm/dp/dp_panel.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 

-- 
With best wishes
Dmitry

Reply via email to