[Intel-gfx] [PATCH igt] tests/kms_frontbuffer_tracking: Skip if CRTC not selected

Gabriel Krisman Bertazi krisman at collabora.co.uk
Thu Apr 13 05:03:43 UTC 2017


After Linux commit f7e9b004b8a3 ("drm/i915/fbc: inline
intel_fbc_can_choose()"), no_fbc_reason will be updated to a new error
message if we don't have a plane in the new state, which should make the
test skip, but the test code doesn't catch that message and tries to
execute the test, triggering a test failure.

Signed-off-by: Gabriel Krisman Bertazi <krisman at collabora.co.uk>
---
 tests/kms_frontbuffer_tracking.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index e75ea5497c4f..90a939863847 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -921,6 +921,14 @@ static bool fbc_stride_not_supported(void)
 	return strstr(buf, "FBC disabled: framebuffer stride not supported\n");
 }
 
+static bool fbc_crtc_not_chosen(void)
+{
+	char buf[128];
+
+	debugfs_read("i915_fbc_status", buf);
+	return strstr(buf, "FBC disabled: no suitable CRTC for FBC\n");
+}
+
 static bool fbc_wait_until_enabled(void)
 {
 	return igt_wait(fbc_is_enabled(), 2000, 1);
@@ -1699,6 +1707,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
 	if (flags_ & ASSERT_FBC_ENABLED) {				\
 		igt_require(!fbc_not_enough_stolen());			\
 		igt_require(!fbc_stride_not_supported());		\
+		igt_require(!fbc_crtc_not_chosen());			\
 		if (!fbc_wait_until_enabled()) {			\
 			fbc_print_status();				\
 			igt_assert_f(false, "FBC disabled\n");		\
-- 
2.11.0



More information about the Intel-gfx mailing list