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 <andi.shyti@linux.intel.com>
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250314021225.11813-5-andi.shyti@linux.intel.com
This commit is contained in:
Andi Shyti 2025-03-14 03:12:24 +01:00
parent 5bebf804ef
commit 5ba97b5925
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,8 @@ int live_rc6_manual(void *arg)
/* Force RC6 off for starters */
__intel_rc6_disable(rc6);
msleep(1); /* wakeup is not immediate, takes about 100us on icl */
/* wakeup is not immediate, takes about 100us on icl */
usleep_range(1000, 2000);
res[0] = rc6_residency(rc6);

View File

@ -143,7 +143,7 @@ pte_tlbinv(struct intel_context *ce,
if (ce->engine->class == OTHER_CLASS)
msleep(200);
else
msleep(10);
usleep_range(10000, 20000);
if (va == vb) {
if (!i915_request_completed(rq)) {