[PATCH] kms_frontbuffer_tracking: Don't poke compressing status for old cpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <krisman@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux