All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix error handling on waiting for completion
@ 2021-10-26 11:07 Stylon Wang
  2021-10-26 13:29 ` Kazlauskas, Nicholas
  2021-10-26 15:51 ` Michel Dänzer
  0 siblings, 2 replies; 10+ messages in thread
From: Stylon Wang @ 2021-10-26 11:07 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry.Wentland, Rodrigo.Siqueira, mdaenzer, contact,
	nicholas.kazlauskas, Stylon Wang

[Why]
In GNOME Settings->Display the switching from mirror mode to single display
occasionally causes wait_for_completion_interruptible_timeout() to return
-ERESTARTSYS and fails atomic check.

[How]
Replace the call with wait_for_completion_timeout() since the waiting for
hw_done and flip_done completion doesn't need to worry about interruption
from signal.

Signed-off-by: Stylon Wang <stylon.wang@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 4cd64529b180..b8f4ff323de1 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9844,10 +9844,10 @@ static int do_aquire_global_lock(struct drm_device *dev,
 		 * Make sure all pending HW programming completed and
 		 * page flips done
 		 */
-		ret = wait_for_completion_interruptible_timeout(&commit->hw_done, 10*HZ);
+		ret = wait_for_completion_timeout(&commit->hw_done, 10*HZ);
 
 		if (ret > 0)
-			ret = wait_for_completion_interruptible_timeout(
+			ret = wait_for_completion_timeout(
 					&commit->flip_done, 10*HZ);
 
 		if (ret == 0)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-03 14:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 11:07 [PATCH] drm/amd/display: Fix error handling on waiting for completion Stylon Wang
2021-10-26 13:29 ` Kazlauskas, Nicholas
2021-10-26 15:51 ` Michel Dänzer
2021-10-26 16:03   ` Kazlauskas, Nicholas
2021-10-26 16:08     ` Simon Ser
2021-10-26 16:11       ` Michel Dänzer
2021-10-27  7:20     ` Christian König
2021-11-01 15:00   ` Wang, Chao-kai (Stylon)
2021-11-03 14:54     ` Michel Dänzer
2021-11-03 14:54       ` Michel Dänzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.