Re: [PATCH v6 03/10] drm/msm/dp: Read DPCD and sink count in bridge detect()

From: Dmitry Baryshkov

Date: Mon May 25 2026 - 09:40:36 EST


On 25/05/2026 15:32, Konrad Dybcio wrote:
On 5/24/26 12:33 PM, Dmitry Baryshkov wrote:
From: Jessica Zhang <jessica.zhang@xxxxxxxxxxxxxxxx>

Instead of relying on the link_ready flag to specify if DP is connected,
read the DPCD bits and get the sink count to accurately detect if DP is
connected.

Signed-off-by: Jessica Zhang <jessica.zhang@xxxxxxxxxxxxxxxx>
Tested-by: Val Packett <val@xxxxxxxxxxxx> # x1e80100-dell-latitude-7455
Tested-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx> # Hamoa IOT EVK, QCS8300 Ride
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dp/dp_display.c | 63 +++++++++++++++++++++++++++++++++++++
drivers/gpu/drm/msm/dp/dp_drm.c | 20 ------------
drivers/gpu/drm/msm/dp/dp_drm.h | 2 ++
3 files changed, 65 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 1dd168acbbc3..97c4752005c0 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1152,6 +1152,69 @@ static int msm_dp_hpd_event_thread_start(struct msm_dp_display_private *msm_dp_p
return 0;
}
+/**
+ * msm_dp_bridge_detect - callback to determine if connector is connected
+ *
+ * @bridge: Pointer to drm bridge structure
+ * @connector: Pointer to drm connector structure
+ *
+ * Returns: where there is a display connected to the DPTX (returning

whether?

yep


Otherwise, if keeping msm_dp_aux_enable_xfers(true) is intentional
in bailout cases:

In the non-error bailouts, yes. I might want to change that later, but for now it's expected this way.


Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad


--
With best wishes
Dmitry