summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-02-07 17:13:11 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-02-07 17:13:26 +0100
commitd2964b5c4da338e4f82fd34f204a97583ef689bf (patch)
tree47e0bc130f945614570feee02cdbb06437b7f4a3 /tests
parentc4b871e63ed6b194f113e326dcfe259c0b264bf1 (diff)
kms_frontbuffer_tracking: Skip tests when stride is too high.
On a 4k hdmi display the stride might be too high for fbc to be enabled, in this case skip the test entirely. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_frontbuffer_tracking.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index a23dcca1..5f713e93 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -902,6 +902,14 @@ static bool fbc_not_enough_stolen(void)
return strstr(buf, "FBC disabled: not enough stolen memory\n");
}
+static bool fbc_stride_not_supported(void)
+{
+ char buf[128];
+
+ igt_debugfs_read("i915_fbc_status", buf);
+ return strstr(buf, "FBC disabled: framebuffer stride not supported\n");
+}
+
static bool fbc_wait_until_enabled(void)
{
return igt_wait(fbc_is_enabled(), 2000, 1);
@@ -1678,6 +1686,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()); \
if (!fbc_wait_until_enabled()) { \
fbc_print_status(); \
igt_assert_f(false, "FBC disabled\n"); \