summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-06-25 10:56:34 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2015-06-25 14:54:24 -0300
commiteeda401391de3ab434dcdd1d1b441a24660a0fd3 (patch)
treeb3473480aa1f108e30bee4051dbec2b0373f678b /tests
parent053f33ad1c3e8604b2c33a6ca87539a2ec684742 (diff)
kms_frontbuffer_tracking: GTT mmap writes disable PSR
And they keep it disabled until something else enables it. So let's consider this on the draw subtests. With this, some PSR tests that were failing will now start passing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_frontbuffer_tracking.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 9fe95bb9..3785a5af 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1609,6 +1609,23 @@ static void update_wanted_crc(const struct test_mode *t, struct both_crcs *crc)
wanted_crc = crc;
}
+static bool op_disables_psr(const struct test_mode *t,
+ enum igt_draw_method method)
+{
+ if (method != IGT_DRAW_MMAP_GTT && method != IGT_DRAW_MMAP_WC)
+ return false;
+ if (t->screen == SCREEN_PRIM)
+ return true;
+ /* On FBS_MULTI, even if the target is not the PSR screen (SCREEN_PRIM),
+ * all primary planes share the same frontbuffer, so a write to the
+ * second screen primary plane - or offscreen plane - will touch the
+ * framebuffer that's also used by the primary screen. */
+ if (t->fbs == FBS_MULTI && t->plane == PLANE_PRI)
+ return true;
+
+ return false;
+}
+
/*
* draw - draw a set of rectangles on the screen using the provided method
*
@@ -1661,6 +1678,9 @@ static void draw_subtest(const struct test_mode *t)
igt_assert(false);
}
+ if (op_disables_psr(t, t->method))
+ assertions |= ASSERT_PSR_DISABLED;
+
prepare_subtest(t, pattern);
target = pick_target(t, params);
@@ -1722,15 +1742,20 @@ static void multidraw_subtest(const struct test_mode *t)
igt_debug("Method %s\n", igt_draw_get_method_name(m));
for (r = 0; r < pattern->n_rects; r++) {
-
used_method = (r % 2 == 0) ? t->method : m;
+ igt_debug("Used method %s\n",
+ igt_draw_get_method_name(used_method));
+
draw_rect(pattern, target, used_method, r);
update_wanted_crc(t, &pattern->crcs[r]);
assertions = used_method != IGT_DRAW_MMAP_GTT ?
ASSERT_LAST_ACTION_CHANGED :
ASSERT_NO_ACTION_CHANGE;
+ if (op_disables_psr(t, used_method))
+ assertions |= ASSERT_PSR_DISABLED;
+
do_assertions(assertions);
}