summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2016-12-22 18:42:08 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2017-01-04 16:07:52 -0200
commit2804afc606f8bec2b4552e0776e44cea25abb31d (patch)
tree8f980462f7c7e2f4c92b968b0ab00a4b913aa14c
parent37be8f6d44eea71f9947a1e4d41d8ba1e66b7cfe (diff)
kms_frontbuffer_tracking: fix compression checking
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@intel.com>
-rw-r--r--tests/kms_frontbuffer_tracking.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 504809cd..b91f08b0 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()); \