diff mbox series

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

Message ID 1609740098-32603-1-git-send-email-xiaogang.chen@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm: distinguish return value of drm_dp_check_and_send_link_address. | expand

Commit Message

Chen, Xiaogang Jan. 4, 2021, 6:01 a.m. UTC
From: Xiaogang Chen <xiaogang.chen@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@amd.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen, Xiaogang Jan. 12, 2021, 6:36 a.m. UTC | #1
[AMD Official Use Only - Internal Distribution Only]

Any comment?

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

From: Xiaogang Chen <xiaogang.chen@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@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
Simon Ser Jan. 12, 2021, 9:21 a.m. UTC | #2
On Tuesday, January 12th, 2021 at 7:36 AM, Chen, Xiaogang <Xiaogang.Chen@amd.com> wrote:

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

To the best of my knowledge, this sounds correct.

Please wrap your commit message into 80-character lines so that it's easier
to read. Regardless, this is:

Acked-by: Simon Ser <contact@emersion.fr>
Simon Ser Jan. 12, 2021, 2:45 p.m. UTC | #3
Pushed to drm-misc-next with a re-formatted commit message, thanks for
your contribution!
diff mbox series

Patch

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);
 }