Skip to contentSkip to conversation

kms_frontbuffer_tracking: Don't poke compressing status for old cpus

PATCH New Gabriel Krisman Bertazi 1 participant 1 message Apr 14, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +2 -1
index 90a939863847..f5c3943f54a4 100644
@@ -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());			\
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx