summaryrefslogtreecommitdiff
path: root/tests/kms_frontbuffer_tracking.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-12-21 20:54:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-01-24 15:09:30 +0000
commitec7d71660694157af698741eac3764203bf338ec (patch)
treead8bbb204b231e1d6d2685416240d0021350d2ff /tests/kms_frontbuffer_tracking.c
parent63f7ef01908c9925bbacbbbac76fdc0ba15967c5 (diff)
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 <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/kms_frontbuffer_tracking.c')
-rw-r--r--tests/kms_frontbuffer_tracking.c17
1 files changed, 5 insertions, 12 deletions
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)