From 5e688bcc62bd4ab43ef31af6ea86fb4c241b1a2a Mon Sep 17 00:00:00 2001 From: Gabriel Krisman Bertazi Date: Fri, 14 Apr 2017 01:16:50 -0300 Subject: [PATCH] kms_frontbuffer_tracking: Don't poke compressing status for old cpus Commit 2804afc606f8 ("kms_frontbuffer_tracking: fix compression checking") removes the check whether the kernel supports reporting the compression status before asserting on it. This breaks the test for no good reason on old CPUs (SNB and earlier) where the kernel can't report the compression status. Instead, we can check if the cpu doesn't support reporting and adopt the same behavior as if --no-fbc-compression-check was used. Signed-off-by: Gabriel Krisman Bertazi --- tests/kms_frontbuffer_tracking.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 90a939863847..f5c3943f54a4 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1698,6 +1698,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags) } while (0) #define do_status_assertions(flags_) do { \ + int id = intel_get_drm_devid(drm.fd); \ if (!opt.check_status) { \ /* Make sure we settle before continuing. */ \ sleep(1); \ @@ -1713,7 +1714,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags) igt_assert_f(false, "FBC disabled\n"); \ } \ \ - if (opt.fbc_check_compression) \ + if (opt.fbc_check_compression && AT_LEAST_GEN(id, 7)) \ igt_assert(fbc_wait_for_compression()); \ } else if (flags_ & ASSERT_FBC_DISABLED) { \ igt_assert(!fbc_wait_until_enabled()); \ -- 2.11.0