Re: [PATCH igt] igt/kms_frontbuffer_tracking: Wait for PSR to be disabled

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

 



On Tue, Feb 20, 2018 at 02:33:08PM +0000, Chris Wilson wrote:
> PSR may not exit instantaneously, so while asserting that PSR is
> disabled after an action, we may have to wait a short while. Currently
> that wait is waiting for PSR to enabled and expecting to timeout; this
> fails when we start the assertion with PSR already enabled. Fix the wait
> to wait until PSR is disabled rather than timeout.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

I guess that's the reply to my question about the earlier
kms_frontbuffer_tracking patch?

Makes a bunch more sense to me.

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> ---
>  tests/kms_frontbuffer_tracking.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 6c4071de..57ae047b 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -1002,6 +1002,11 @@ static bool psr_wait_until_enabled(void)
>  	return igt_wait(psr_is_enabled(), 5000, 1);
>  }
>  
> +static bool psr_wait_until_disabled(void)
> +{
> +	return igt_wait(!psr_is_enabled(), 5000, 1);
> +}
> +
>  static bool drrs_wait_until_rr_switch_to_low(void)
>  {
>  	return igt_wait(is_drrs_low(), 5000, 1);
> @@ -1845,10 +1850,13 @@ static void do_status_assertions(int flags)
>  	if (flags & ASSERT_PSR_ENABLED) {
>  		if (!psr_wait_until_enabled()) {
>  			psr_print_status();
> -			igt_assert_f(psr_is_enabled(), "PSR disabled\n");
> +			igt_assert_f(psr_is_enabled(), "PSR still disabled\n");
>  		}
>  	} else if (flags & ASSERT_PSR_DISABLED) {
> -		igt_assert(!psr_wait_until_enabled());
> +		if (!psr_wait_until_disabled()) {
> +			psr_print_status();
> +			igt_assert_f(!psr_is_enabled(), "PSR still enabled\n");
> +		}
>  	}
>  }
>  
> -- 
> 2.16.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux