drm/amd/display: Fix Apple dongle cannot be successfully detected
Subsystems (3)
PATCH v2 1/1 drm/amd/display: Fix Apple dongle cannot be successfully detected
[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.
[How]
When receiving HPD IRQ, delay 300ms at the beginning of handle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param)struct drm_device *dev = connector->dev;enum dc_connection_type new_connection_type = dc_connection_none; +/* Some monitors/dongles need around 200ms to be ready for communication +* after those devices drive HPD signal high. +*/ +msleep (300 ); +/* In case of failure or MST no need to update connector status or notify the OS * since (for MST case) MST does this in it's own context. */
Signature · 6 lines
2.21.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis
-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected
[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI). By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.
[How]
When receiving HPD IRQ, delay 300ms at the beginning of handle_hpd_irq().
Then run the original procedure.
With this patch applied, the problem cannot be reproduced.
With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly. Test result is PASS after system resumes from suspend.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param)struct drm_device *dev = connector->dev;enum dc_connection_type new_connection_type = dc_connection_none; +/* Some monitors/dongles need around 200ms to be ready for communication +* after those devices drive HPD signal high. +*/ +msleep (300 ); +/* In case of failure or MST no need to update connector status or notify the OS * since (for MST case) MST does this in it's own context. */
--
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB406250AEB8A10A080050D952AA4E0-rweVpJHSKTr3rx73VqdDCgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Quoted 26 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI). By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq().
Then run the original procedure.
With this patch applied, the problem cannot be reproduced.
With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly. Test result is PASS after system resumes from suspend.
Quoted 1 line
Signed-off-by Louis Li <[email protected]>
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas Kazlauskas
Quoted 21 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-1@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param)struct drm_device *dev = connector->dev;enum dc_connection_type new_connection_type = dc_connection_none; +/* Some monitors/dongles need around 200ms to be ready for communication +* after those devices drive HPD signal high. +*/ +msleep (300 ); +/* In case of failure or MST no need to update connector status or notify the OS * since (for MST case) MST does this in it's own context. */ --
Quoted 2 lines
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 3c30b486-7062-ade2-0dbd-7288fbf595c1-5C7GfCeVMHo@public.gmane.org
Quoted 27 lines · Nicholas
Quoted 26 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI). By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq().
Then run the original procedure.
With this patch applied, the problem cannot be reproduced.
With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly. Test result is PASS after system resumes from suspend.
Quoted 8 lines
Quoted 1 line
Signed-off-by Louis Li <[email protected]>This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas Kazlauskas
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Quoted 21 lines
Quoted 21 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context.
*/
Quoted 8 lines
Quoted 3 lines
Signature · 1 line
2.21.0_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 3ee8d870-c461-c68f-4a36-f2bf17e9e81f-5C7GfCeVMHo@public.gmane.org
Quoted 44 lines · Nicholas
Quoted 35 lines · Nicholas
Quoted 32 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.Quoted 1 line
Signed-off-by Louis Li <[email protected]>Quoted 7 lines
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas Kazlauskas
Quoted 8 lines
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Yes, it is IRQ context. Safe to call sleep(). Moreover, in current driver, even udelay() is called in wait_for_training_aux_rd_interval() in the flow of handle_hpd_irq().
For 2nd question, of course not all connectors have this behavior. Based on real cases we ever dealt, some dongles like this, or some monitors driven by TCON, have same behavior. And no chance to read out anything to decide if delay is needed. This change does help to have our driver gain better compatibility. Truly this should be problem of dongles/monitors. We are not the only one to workaround such a problem. This change does not hurt other connects, and some other dongles are tested ok, e.g. HP/Huwai dongles, etc.
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context. */
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
Signature · 1 line
2.21.0_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 58 lines · Louis Li
Quoted 44 lines · Nicholas
Quoted 35 lines · Nicholas
Quoted 32 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.Quoted 1 line
Signed-off-by Louis Li <[email protected]>Quoted 7 lines
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas KazlauskasQuoted 8 lines
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Yes, it is IRQ context. Safe to call
sleep(). Moreover, in current driver, evenudelay()is called inwait_for_training_aux_rd_interval()in the flow ofhandle_hpd_irq().
Quoted 9 lines
For 2nd question, of course not all connectors have this behavior. Based on real cases we ever dealt, some dongles like this, or some monitors driven by TCON, have same behavior. And no chance to read out anything to decide if delay is needed. This change does help to have our driver gain better compatibility. Truly this should be problem of dongles/monitors. We are not the only one to workaround such a problem. This change does not hurt other connects, and some other dongles are tested ok, e.g. HP/Huwai dongles, etc.
I still don't like this change. It might impact other use cases, such as SST-to-MST switching on MST displays.
Have you checked how Windows deals with this dongle and how the Windows team solved this? Have you checked how other drivers (such as i915) deal with this dongle?
Have you checked whether you can pass DP compliance with this change?
Harry
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context. */
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 2d828fee-b8c7-ec8c-f454-2574fd68ed45-5C7GfCeVMHo@public.gmane.org
Quoted 74 lines · Harry Wentland
Quoted 58 lines · Louis Li
Quoted 44 lines · Nicholas
Quoted 35 lines · Nicholas
Quoted 32 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.Quoted 1 line
Signed-off-by Louis Li <[email protected]>Quoted 7 lines
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas KazlauskasQuoted 8 lines
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Yes, it is IRQ context. Safe to call
sleep(). Moreover, in current driver, evenudelay()is called inwait_for_training_aux_rd_interval()in the flow ofhandle_hpd_irq().Quoted 9 lines
For 2nd question, of course not all connectors have this behavior. Based on real cases we ever dealt, some dongles like this, or some monitors driven by TCON, have same behavior. And no chance to read out anything to decide if delay is needed. This change does help to have our driver gain better compatibility. Truly this should be problem of dongles/monitors. We are not the only one to workaround such a problem. This change does not hurt other connects, and some other dongles are tested ok, e.g. HP/Huwai dongles, etc.
I still don't like this change. It might impact other use cases, such as SST-to-MST switching on MST displays.
Quoted 8 lines
Have you checked how Windows deals with this dongle and how the Windows team solved this? Have you checked how other drivers (such as i915) deal with this dongle?
Have you checked whether you can pass DP compliance with this change?
Harry
Good points. MST and DP compliance are not verified yet.
For Windows cases, same solution was implemented. As I know, it goes to point release (PR) instead of main line. Company N. has similar solution to workaround such a problem. For i915, the solution seems to be different.
Will this change be accepted if it can pass MST and compilance?
Louis
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context. */
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 84 lines · Louis Li
Quoted 74 lines · Harry Wentland
Quoted 58 lines · Louis Li
Quoted 44 lines · Nicholas
Quoted 35 lines · Nicholas
Quoted 32 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.Quoted 1 line
Signed-off-by Louis Li <[email protected]>Quoted 7 lines
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas KazlauskasQuoted 8 lines
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Yes, it is IRQ context. Safe to call
sleep(). Moreover, in current driver, evenudelay()is called inwait_for_training_aux_rd_interval()in the flow ofhandle_hpd_irq().Quoted 9 lines
For 2nd question, of course not all connectors have this behavior. Based on real cases we ever dealt, some dongles like this, or some monitors driven by TCON, have same behavior. And no chance to read out anything to decide if delay is needed. This change does help to have our driver gain better compatibility. Truly this should be problem of dongles/monitors. We are not the only one to workaround such a problem. This change does not hurt other connects, and some other dongles are tested ok, e.g. HP/Huwai dongles, etc.
I still don't like this change. It might impact other use cases, such as SST-to-MST switching on MST displays.
Quoted 8 lines
Have you checked how Windows deals with this dongle and how the Windows team solved this? Have you checked how other drivers (such as i915) deal with this dongle?
Have you checked whether you can pass DP compliance with this change?
Harry
Quoted 8 lines
Good points. MST and DP compliance are not verified yet.
For Windows cases, same solution was implemented. As I know, it goes to point release (PR) instead of main line. Company N. has similar solution to workaround such a problem. For i915, the solution seems to be different.
Will this change be accepted if it can pass MST and compilance?
Same as for Windows I'm not convinced that this change should go into mainline. If the customer needs a workaround we can always provide it on a customer branch.
Harry
Quoted 34 lines
Louis
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
Quoted 11 lines
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context. */Signature · 1 line
2.21.0_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 95bdabb4-e216-559e-1a93-fb492903a7a0-5C7GfCeVMHo@public.gmane.org
Quoted 93 lines · Harry Wentland
Quoted 90 lines · Louis Li
Quoted 74 lines · Harry Wentland
Quoted 58 lines · Louis Li
Quoted 44 lines · Nicholas
Quoted 35 lines · Nicholas
Quoted 32 lines · Ching-shih (Louis)
Hi reviewers,
What is the review result for this patch? Customer is pushing on this change to merge. TKS for your attention.
BR,
Louis-----Original Message-----
From: Louis Li <[email protected]>
Sent: Thursday, November 14, 2019 11:42 AM
To: [email protected]
Cc: Kazlauskas, Nicholas <[email protected]>; Wentland, Harry <[email protected]>; Li, Ching-shih (Louis) <[email protected]>
Subject: [PATCH v2] drm/amd/display: Fix Apple dongle cannot be successfully detected[Why]
External monitor cannot be displayed consistently, if connecting via this Apple dongle (A1621, USB Type-C to HDMI).
By experiments, it is confirmed that the dongle needs 200ms at least to be ready for communication, after it sets HPD signal high.[How]
When receiving HPD IRQ, delay 300ms at the beginning ofhandle_hpd_irq(). Then run the original procedure.
With this patch applied, the problem cannot be reproduced. With other dongles, test results are PASS.
Test result is PASS to plug in HDMI cable while playing video, and the video is being playing smoothly.
Test result is PASS after system resumes from suspend.Quoted 1 line
Signed-off-by Louis Li <[email protected]>Quoted 7 lines
This is still a NAK from me since the logic hasn't changed from the first patch.
Sleeps don't belong in IRQ handlers.
Regards,
Nicholas KazlauskasQuoted 8 lines
Actually, this lives in the low IRQ context which means that it's already been queued off to a work thread so it's safe to sleep.
I'm not sure we want a general 300ms sleep (even by experiment you said that it only needed 200ms) for all connectors.
Nicholas Kazlauskas
Yes, it is IRQ context. Safe to call
sleep(). Moreover, in current driver, evenudelay()is called inwait_for_training_aux_rd_interval()in the flow ofhandle_hpd_irq().Quoted 9 lines
For 2nd question, of course not all connectors have this behavior. Based on real cases we ever dealt, some dongles like this, or some monitors driven by TCON, have same behavior. And no chance to read out anything to decide if delay is needed. This change does help to have our driver gain better compatibility. Truly this should be problem of dongles/monitors. We are not the only one to workaround such a problem. This change does not hurt other connects, and some other dongles are tested ok, e.g. HP/Huwai dongles, etc.
I still don't like this change. It might impact other use cases, such as SST-to-MST switching on MST displays.
Quoted 8 lines
Have you checked how Windows deals with this dongle and how the Windows team solved this? Have you checked how other drivers (such as i915) deal with this dongle?
Have you checked whether you can pass DP compliance with this change?
Harry
Good points. MST and DP compliance are not verified yet.
For Windows cases, same solution was implemented. As I know, it goes to point release (PR) instead of main line. Company N. has similar solution to workaround such a problem. For i915, the solution seems to be different.
Quoted 9 lines
Quoted 2 lines
Will this change be accepted if it can pass MST and compilance?
Same as for Windows I'm not convinced that this change should go into mainline. If the customer needs a workaround we can always provide it on a customer branch.
Harry
Understand. Forward this comment to customer. Not sure what response will be.
Quoted 26 lines
Quoted 26 lines
Louis
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +++++1 file changed, 5 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param) struct drm_device *dev = connector->dev; enum dc_connection_type new_connection_type = dc_connection_none; + /* Some monitors/dongles need around 200ms to be ready forcommunication
+ * after those devices drive HPD signal high.
+ */
+ msleep(300);
+
/* In case of failure or MST no need to update connector status or notify the OS
* since (for MST case) MST does this in it's own context. */
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
2.21.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx