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>
This commit is contained in:
Paulo Zanoni 2015-06-25 10:56:34 -03:00
parent 053f33ad1c
commit eeda401391

View File

@ -1609,6 +1609,23 @@ static void update_wanted_crc(const struct test_mode *t, struct both_crcs *crc)
wanted_crc = 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 * 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); igt_assert(false);
} }
if (op_disables_psr(t, t->method))
assertions |= ASSERT_PSR_DISABLED;
prepare_subtest(t, pattern); prepare_subtest(t, pattern);
target = pick_target(t, params); 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)); igt_debug("Method %s\n", igt_draw_get_method_name(m));
for (r = 0; r < pattern->n_rects; r++) { for (r = 0; r < pattern->n_rects; r++) {
used_method = (r % 2 == 0) ? t->method : m; 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); draw_rect(pattern, target, used_method, r);
update_wanted_crc(t, &pattern->crcs[r]); update_wanted_crc(t, &pattern->crcs[r]);
assertions = used_method != IGT_DRAW_MMAP_GTT ? assertions = used_method != IGT_DRAW_MMAP_GTT ?
ASSERT_LAST_ACTION_CHANGED : ASSERT_LAST_ACTION_CHANGED :
ASSERT_NO_ACTION_CHANGE; ASSERT_NO_ACTION_CHANGE;
if (op_disables_psr(t, used_method))
assertions |= ASSERT_PSR_DISABLED;
do_assertions(assertions); do_assertions(assertions);
} }