diff mbox

[igt] igt/kms_frontbuffer_tracking: Show FBC status at the start of the wait

Message ID 20180116205219.22173-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Jan. 16, 2018, 8:52 p.m. UTC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_frontbuffer_tracking.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Daniel Vetter Jan. 17, 2018, 10:35 a.m. UTC | #1
On Tue, Jan 16, 2018 at 08:52:19PM +0000, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Please remember to send igt patches to the new mailing list in the future.
Adding it.
-Daniel
> ---
>  tests/kms_frontbuffer_tracking.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 1601cab45..f35e40593 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -792,11 +792,12 @@ static void __debugfs_read(const char *param, char *buf, int len)
>  
>  #define debugfs_read(p, arr) __debugfs_read(p, arr, sizeof(arr))
>  
> -static bool fbc_is_enabled(void)
> +static bool fbc_is_enabled(int lvl)
>  {
>  	char buf[128];
>  
>  	debugfs_read("i915_fbc_status", buf);
> +	igt_log(IGT_LOG_DOMAIN, lvl, "fbc_is_enabled()?\n%s", buf);
>  	return strstr(buf, "FBC enabled\n");
>  }
>  
> @@ -927,7 +928,7 @@ static bool fbc_stride_not_supported(void)
>  
>  static bool fbc_wait_until_enabled(void)
>  {
> -	return igt_wait(fbc_is_enabled(), 2000, 1);
> +	return igt_wait(fbc_is_enabled(IGT_LOG_DEBUG), 2000, 1);
>  }
>  
>  static bool psr_wait_until_enabled(void)
> @@ -1710,8 +1711,8 @@ static void do_status_assertions(int flags)
>  		igt_require(!fbc_not_enough_stolen());
>  		igt_require(!fbc_stride_not_supported());
>  		if (!fbc_wait_until_enabled()) {
> -			fbc_print_status();
> -			igt_assert_f(fbc_is_enabled(), "FBC disabled\n");
> +			igt_assert_f(fbc_is_enabled(IGT_LOG_INFO),
> +				     "FBC disabled\n");
>  		}
>  
>  		if (opt.fbc_check_compression)
> -- 
> 2.15.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1601cab45..f35e40593 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -792,11 +792,12 @@  static void __debugfs_read(const char *param, char *buf, int len)
 
 #define debugfs_read(p, arr) __debugfs_read(p, arr, sizeof(arr))
 
-static bool fbc_is_enabled(void)
+static bool fbc_is_enabled(int lvl)
 {
 	char buf[128];
 
 	debugfs_read("i915_fbc_status", buf);
+	igt_log(IGT_LOG_DOMAIN, lvl, "fbc_is_enabled()?\n%s", buf);
 	return strstr(buf, "FBC enabled\n");
 }
 
@@ -927,7 +928,7 @@  static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)
 {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(IGT_LOG_DEBUG), 2000, 1);
 }
 
 static bool psr_wait_until_enabled(void)
@@ -1710,8 +1711,8 @@  static void do_status_assertions(int flags)
 		igt_require(!fbc_not_enough_stolen());
 		igt_require(!fbc_stride_not_supported());
 		if (!fbc_wait_until_enabled()) {
-			fbc_print_status();
-			igt_assert_f(fbc_is_enabled(), "FBC disabled\n");
+			igt_assert_f(fbc_is_enabled(IGT_LOG_INFO),
+				     "FBC disabled\n");
 		}
 
 		if (opt.fbc_check_compression)