[igt-dev] [PATCH i-g-t 2/2] tests/kms_frontbuffer_tracking: Fix skips when PSR is not available.

Souza, Jose jose.souza at intel.com
Thu Jan 31 20:58:39 UTC 2019


On Thu, 2019-01-31 at 15:18 +0100, Maarten Lankhorst wrote:
> Use psr.can_test to determine we can disable PSR, and not skip
> because
> PSR is unavailable.
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> Cc: José Roberto de Souza <jose.souza at intel.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  lib/igt_psr.c                    | 2 +-
>  tests/kms_frontbuffer_tracking.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 5eb6d2c6ace5..6ad2c522f9a4 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -106,7 +106,7 @@ static bool psr_set(int debugfs_fd, int mode)
>  
>  	ret = has_psr_debugfs(debugfs_fd);
>  	if (ret == -ENODEV) {
> -		igt_skip_on_f(mode >= PSR_MODE_1, "PSR not
> available\n");
> +		igt_skip("PSR not available\n");
>  		return false;
>  	}
>  
> diff --git a/tests/kms_frontbuffer_tracking.c
> b/tests/kms_frontbuffer_tracking.c
> index 609f7b41a527..4d15ce1cf1d6 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -1134,7 +1134,7 @@ static bool disable_features(const struct
> test_mode *t)
>  
>  	fbc_disable();
>  	drrs_disable();
> -	return psr_disable(drm.debugfs);

Although the return true of this functions will cause a unecessary
igt_display_commit() this changes looks good. In other patch we could
just drop the return and remove the commit in prepare_subtest_data().

Reviewed-by: José Roberto de Souza <jose.souza at intel.com>

> +	return psr.can_test ? psr_disable(drm.debugfs) : false;
>  }
>  
>  static void *busy_thread_func(void *data)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20190131/c9c75752/attachment.sig>


More information about the igt-dev mailing list