[Intel-gfx] [PATCH igt 6/6] kms_frontbuffer_tracking: fix compression checking
Paulo Zanoni
paulo.r.zanoni at intel.com
Thu Dec 22 20:42:08 UTC 2016
Ever since Kernel's "drm/i915: don't report compression when fbc is
disabled" we've been wrongly assuming that the Kernel doesn't support
compression information due to the fact that it doesn't print that
specific line when FBC is not active. Fix this by just assuming that
the Kernel supports it, allowing us to kill some more code.
With this change, running a brand new kms_frontbuffer_tracking on
super old Kernels will result in failures, but I suppose that's fine
for IGT.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
tests/kms_frontbuffer_tracking.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index b85f56b..a3d6f1c 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -166,14 +166,12 @@ struct {
struct {
bool can_test;
- bool supports_compressing;
bool supports_last_action;
struct timespec last_action;
} fbc = {
.can_test = false,
.supports_last_action = false,
- .supports_compressing = false,
};
struct {
@@ -896,18 +894,6 @@ static bool fbc_wait_for_compression(void)
return igt_wait(fbc_is_compressing(), 2000, 1);
}
-static void fbc_setup_compressing(void)
-{
- char buf[128];
-
- igt_debugfs_read("i915_fbc_status", buf);
-
- if (strstr(buf, "\nCompressing:"))
- fbc.supports_compressing = true;
- else
- igt_info("FBC compression information not supported\n");
-}
-
static bool fbc_not_enough_stolen(void)
{
char buf[128];
@@ -1527,7 +1513,6 @@ static void setup_fbc(void)
fbc.can_test = true;
fbc_setup_last_action();
- fbc_setup_compressing();
}
static void teardown_fbc(void)
@@ -1696,8 +1681,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
igt_assert_f(false, "FBC disabled\n"); \
} \
\
- if (fbc.supports_compressing && \
- opt.fbc_check_compression) \
+ if (opt.fbc_check_compression) \
igt_assert(fbc_wait_for_compression()); \
} else if (flags_ & ASSERT_FBC_DISABLED) { \
igt_assert(!fbc_wait_until_enabled()); \
--
2.7.4
More information about the Intel-gfx
mailing list