diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-12 16:22:57 -0300 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2015-08-14 15:31:44 -0300 |
commit | f62a683acd1b8eb7626b9b1251e4c4e860f8c2f7 (patch) | |
tree | 86a703a36a39b51ae6d9ff360e59d068775fd104 /tests/kms_frontbuffer_tracking.c | |
parent | b53bcf789b2619d786b25effcc83a461aaf0610b (diff) |
kms_frontbuffer_tracking: use all drawing methods on multidraw_subtest
Instead of having a single pair of methods per subtest. Having this in
pairs is not very useful since we end doing all the drawing methods
per subtest anyway.
This saves a few modesets, which makes eDP slightly faster - about 22s
on my local machine.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/kms_frontbuffer_tracking.c')
-rw-r--r-- | tests/kms_frontbuffer_tracking.c | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 2da541c94..631c9f3ee 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1893,7 +1893,7 @@ static void draw_subtest(const struct test_mode *t) * METHOD * This is just like the draw subtest, but now we keep alternating between two * drawing methods. Each time we run multidraw_subtest we will test all the - * possible pairs containing t->method. + * possible pairs of drawing methods. * * EXPECTED RESULTS * The same as the draw subtest. @@ -1912,7 +1912,7 @@ static void multidraw_subtest(const struct test_mode *t) struct draw_pattern_info *pattern; struct modeset_params *params = pick_params(t); struct fb_region *target; - enum igt_draw_method m, used_method; + enum igt_draw_method m1, m2, used_method; switch (t->plane) { case PLANE_PRI: @@ -1929,33 +1929,38 @@ static void multidraw_subtest(const struct test_mode *t) prepare_subtest(t, pattern); target = pick_target(t, params); - for (m = 0; m < IGT_DRAW_METHOD_COUNT; m++) { - if (m == t->method) - continue; + for (m1 = 0; m1 < IGT_DRAW_METHOD_COUNT; m1++) { + for (m2 = 0; m2 < IGT_DRAW_METHOD_COUNT; m2++) { + if (m1 == m2) + continue; - 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("Methods %s and %s\n", + igt_draw_get_method_name(m1), + igt_draw_get_method_name(m2)); + for (r = 0; r < pattern->n_rects; r++) { + used_method = (r % 2 == 0) ? m1 : m2; - igt_debug("Used method %s\n", - igt_draw_get_method_name(used_method)); + 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[t->format][r]); + draw_rect(pattern, target, used_method, r); + update_wanted_crc(t, + &pattern->crcs[t->format][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; + 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); - } + do_assertions(assertions); + } - fill_fb_region(target, COLOR_PRIM_BG); + fill_fb_region(target, COLOR_PRIM_BG); - update_wanted_crc(t, &blue_crcs[t->format].crc); - do_assertions(ASSERT_NO_ACTION_CHANGE); + update_wanted_crc(t, &blue_crcs[t->format].crc); + do_assertions(ASSERT_NO_ACTION_CHANGE); + } } } @@ -2873,16 +2878,16 @@ int main(int argc, char *argv[]) TEST_MODE_ITER_BEGIN(t) if (t.screen != SCREEN_PRIM || + t.method != IGT_DRAW_BLT || (!opt.show_hidden && t.plane != PLANE_PRI) || (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL)) continue; - igt_subtest_f("%s-%s-%s-%s-multidraw-%s", + igt_subtest_f("%s-%s-%s-%s-multidraw", feature_str(t.feature), pipes_str(t.pipes), plane_str(t.plane), - fbs_str(t.fbs), - igt_draw_get_method_name(t.method)) + fbs_str(t.fbs)) multidraw_subtest(&t); TEST_MODE_ITER_END |