From ec7d71660694157af698741eac3764203bf338ec Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Dec 2017 20:54:07 +0000 Subject: igt/kms_frontbuffer_tracking: Show FBC status during the wait 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 Reviewed-by: Daniel Vetter --- tests/kms_frontbuffer_tracking.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 1601cab4..79e4f586 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) -- cgit v1.2.3