[Intel-gfx] [PATCH igt] igt/kms_frontbuffer_tracking: Show FBC status during the wait

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 23 08:42:53 UTC 2018


Currently, we have a sporadic failure in the multidraw tests where it
sometimes fails to start FBC in a timely fashion (and at other times
works fine). Try to get a little more information as wait it is waiting
for by showing the fbc status at each stage.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 tests/kms_frontbuffer_tracking.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1601cab45..79e4f5862 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -792,22 +792,15 @@ 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");
 }
 
-static void fbc_print_status(void)
-{
-	char buf[128];
-
-	debugfs_read("i915_fbc_status", buf);
-	igt_info("FBC status:\n%s\n", buf);
-}
-
 static bool psr_is_enabled(void)
 {
 	char buf[256];
@@ -927,7 +920,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 +1703,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_WARN),
+				     "FBC disabled\n");
 		}
 
 		if (opt.fbc_check_compression)
-- 
2.15.1



More information about the Intel-gfx mailing list