diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2016-04-04 11:14:49 -0300 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2016-06-17 19:01:02 -0300 |
commit | 1295629354ef5b9c8b4265a0d19fa57ac63b621d (patch) | |
tree | e41e67505178e076e5556d9cddf50eaa4a733d6c /tests/kms_frontbuffer_tracking.c | |
parent | 990f4578fce0f2186956489a7dbf228cbe48dcda (diff) |
kms_frontbuffer_tracking: properly handle mixing GTT and WC mmaps
The new Kernel behavior is that whenever a buffer has ever been WC
mmapped, the GTT mmaps will be treated as CPU operations. Because of
this, if we don't issue the dirty_fb IOCTL after doing frontbuffer
rendering with the GTT mmaps, FBC will remain disabled. Luckily, the
only subtest that does this sort of mix is the multidraw subtest.
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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index bd7f6f68..02ccbeb4 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -2077,6 +2077,7 @@ static void multidraw_subtest(const struct test_mode *t) struct modeset_params *params = pick_params(t); struct fb_region *target; enum igt_draw_method m1, m2, used_method; + bool wc_used = false; switch (t->plane) { case PLANE_PRI: @@ -2106,6 +2107,17 @@ static void multidraw_subtest(const struct test_mode *t) igt_draw_get_method_name(used_method)); draw_rect(pattern, target, used_method, r); + + if (used_method == IGT_DRAW_MMAP_WC) + wc_used = true; + + if (used_method == IGT_DRAW_MMAP_GTT && + wc_used) { + struct rect rect = + pattern->get_rect(target, r); + fb_dirty_ioctl(target, &rect); + } + update_wanted_crc(t, &pattern->crcs[t->format][r]); |