Re: [PATCH v4 01/39] drm/msm/dp: remove cached drm_edid from panel
From: Yongxing Mou
Date: Wed May 20 2026 - 06:16:06 EST
On 5/20/2026 5:22 PM, Dmitry Baryshkov wrote:
On Tue, May 19, 2026 at 03:27:00PM +0800, Yongxing Mou wrote:Sorry.Add log and tested. For USB-C AltMode usecase msm_dp_aux_is_link_connected() always return 0.
On 4/10/2026 9:52 PM, Dmitry Baryshkov wrote:
On Fri, Apr 10, 2026 at 05:33:36PM +0800, Yongxing Mou wrote:Ohh, i miss it, will update next version
The cached drm_edid seems unnecessary here. Use the drm_edid pointer
directly in the plug stage instead of caching it. Remove the cached
drm_edid and the corresponding oneliner to simplify the code.
Signed-off-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dp/dp_display.c | 27 +++++++++++-------
drivers/gpu/drm/msm/dp/dp_panel.c | 57 ++++---------------------------------
drivers/gpu/drm/msm/dp/dp_panel.h | 13 +++------
3 files changed, 26 insertions(+), 71 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 5c6a24ec140d..e28cc1bbb5b1 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -268,6 +268,7 @@ static int msm_dp_display_process_hpd_high(struct msm_dp_display_private *dp)
const struct drm_display_info *info = &connector->display_info;
int rc = 0;
u8 dpcd[DP_RECEIVER_CAP_SIZE];
+ const struct drm_edid *drm_edid;
rc = drm_dp_read_dpcd_caps(dp->aux, dpcd);
if (rc)
@@ -275,10 +276,20 @@ static int msm_dp_display_process_hpd_high(struct msm_dp_display_private *dp)
dp->link->lttpr_count = msm_dp_display_lttpr_init(dp, dpcd);
- rc = msm_dp_panel_read_sink_caps(dp->panel, connector);
+ rc = msm_dp_panel_read_link_caps(dp->panel, connector);
if (rc)
goto end;
+ drm_edid = drm_edid_read_ddc(connector, &dp->aux->ddc);
Where is it free?
For USB-C DP, i think it always TRUE, here should already existed before+ drm_edid_connector_update(connector, drm_edid);
+
+ if (!drm_edid) {
+ DRM_ERROR("panel edid read failed\n");
+ /* check edid read fail is due to unplug */
+ if (!msm_dp_aux_is_link_connected(dp->aux))
Does this work for USB-C AltMode usecase?
this patch..
I'd expect the answer without the 'i think' part.
+ return -ETIMEDOUT;
+ }
+
msm_dp_link_process_request(dp->link);
if (!dp->msm_dp_display.is_edp)