[PATCH 1/2] drm: distinguish return value of drm_dp_check_and_send_link_address.

Chen, Xiaogang Xiaogang.Chen at amd.com
Tue Jan 12 06:36:52 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

Any comment?

-----Original Message-----
From: Xiaogang.Chen <xiaogang.chen at amd.com> 
Sent: Monday, January 4, 2021 12:02 AM
To: amd-gfx at lists.freedesktop.org; Wentland, Harry <Harry.Wentland at amd.com>; dri-devel at lists.freedesktop.org; airlied at linux.ie
Cc: Chen, Xiaogang <Xiaogang.Chen at amd.com>
Subject: [PATCH 1/2] drm: distinguish return value of drm_dp_check_and_send_link_address.

From: Xiaogang Chen <xiaogang.chen at amd.com>

drm_dp_check_and_send_link_address discovers MST device topology.
It can return both positive and negative values. When it returns positive values there is no error found. If it returns negative values there is error found, such as get NAK , timeout, etc. Following drm_kms_helper_hotplug_event should be called when drm_dp_check_and_send_link_address returns positive value.

Signed-off-by: Xiaogang Chen <xiaogang.chen at amd.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 17dbed0..3ef5206 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -2650,7 +2650,7 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)
 	drm_dp_mst_topology_put_mstb(mstb);
 
 	mutex_unlock(&mgr->probe_lock);
-	if (ret)
+	if (ret > 0)
 		drm_kms_helper_hotplug_event(dev);
 }
 
--
2.7.4


More information about the dri-devel mailing list