Skip to content

Commit 5ba97b5

Browse files
author
Andi Shyti
committed
drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms
msleep is very imprecise for timeouts shorter than 20 milliseconds and most probably will sleep longer. Use uslee_range() instead. Signed-off-by: Andi Shyti <[email protected]> Reviewed-by: Sebastian Brzezinka <[email protected]> Reviewed-by: Krzysztof Karas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5bebf80 commit 5ba97b5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/gpu/drm/i915/gt/selftest_rc6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ int live_rc6_manual(void *arg)
6060

6161
/* Force RC6 off for starters */
6262
__intel_rc6_disable(rc6);
63-
msleep(1); /* wakeup is not immediate, takes about 100us on icl */
63+
/* wakeup is not immediate, takes about 100us on icl */
64+
usleep_range(1000, 2000);
6465

6566
res[0] = rc6_residency(rc6);
6667

drivers/gpu/drm/i915/gt/selftest_tlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pte_tlbinv(struct intel_context *ce,
143143
if (ce->engine->class == OTHER_CLASS)
144144
msleep(200);
145145
else
146-
msleep(10);
146+
usleep_range(10000, 20000);
147147

148148
if (va == vb) {
149149
if (!i915_request_completed(rq)) {

0 commit comments

Comments
 (0)