public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: replace use of msleep(<20) with usleep_range for better accuracy
@ 2025-03-26  7:00 James Flowers
  2025-03-28 22:46 ` Shuah Khan
  2025-03-31 12:34 ` Christian König
  0 siblings, 2 replies; 6+ messages in thread
From: James Flowers @ 2025-03-26  7:00 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
	christian.koenig, airlied, simona, aurabindo.pillai, alex.hung,
	skhan
  Cc: James Flowers, amd-gfx, dri-devel, linux-kernel-mentees,
	linux-kernel

msleep < 20ms will often sleep for ~20ms (according to Documentation/timers/timers-howto.rst).

Signed-off-by: James Flowers <bold.zone2373@fastmail.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 2cd35392e2da..2d225735602b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -682,7 +682,7 @@ static bool execute_synaptics_rc_command(struct drm_dp_aux *aux,
 		if (rc_cmd == cmd)
 			// active is 0
 			break;
-		msleep(10);
+		usleep_range(10000, 10200);
 	}
 
 	// read rc result
-- 
2.49.0


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

end of thread, other threads:[~2025-04-01  4:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-26  7:00 [PATCH] drm/amd/display: replace use of msleep(<20) with usleep_range for better accuracy James Flowers
2025-03-28 22:46 ` Shuah Khan
2025-03-29  6:54   ` James
2025-03-31 12:34 ` Christian König
2025-03-31 18:20   ` Harry Wentland
2025-04-01  4:23     ` James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox