RE: [PATCH 4/4] drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andi,

> Subject: [PATCH 4/4] drm/i915/gt: Use proper sleeping functions for timeouts
> shorter than 20ms
> 
> msleep is very unprecise for timeouts shorter than 20 milliseconds and most
> probably will sleep longer. Use
> uslee_range() instead.

Typo:
%s/uslee_range()/usleep_range()

With typo fix, the patch looks good to me.
Reviewed-by: Nitin Gote <nitin.r.gote@xxxxxxxxx>

> 
> Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/selftest_rc6.c | 3 ++-
> drivers/gpu/drm/i915/gt/selftest_tlb.c | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c
> b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> index 908483ab0bc8..99de5d85a096 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> @@ -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);
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_tlb.c
> b/drivers/gpu/drm/i915/gt/selftest_tlb.c
> index 3941f2d6fa47..69ed946a39e5 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_tlb.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_tlb.c
> @@ -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)) {
> --
> 2.47.2





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux