From da0889bfacff106fb3ecb7049a7a21f78b4b301b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Dec 2017 09:41:26 +0000 Subject: igt/kms_frontbuffer_tracking: Access via GGTT is not guaranteed to be tracked As the system may use a partial vma for a GGTT mmap, access via the GGTT mmap is not guaranteed to be tracked by FBC's fence. The rule expressed has been that any access to the frontbuffer should be followed by a fb-dirty ioctl, so always apply and expect the driver to ellide no-ops. Signed-off-by: Chris Wilson Reviewed-by: Arkadiusz Hiler --- tests/kms_frontbuffer_tracking.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index c6586c41..a6f5f377 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1130,8 +1130,7 @@ static void draw_rect(struct draw_pattern_info *pattern, struct fb_region *fb, fb->x + rect.x, fb->y + rect.y, rect.w, rect.h, rect.color); - if (method == IGT_DRAW_MMAP_WC) - fb_dirty_ioctl(fb, &rect); + fb_dirty_ioctl(fb, &rect); } static void draw_rect_igt_fb(struct draw_pattern_info *pattern, @@ -2135,16 +2134,10 @@ static void multidraw_subtest(const struct test_mode *t) draw_rect(pattern, target, used_method, r); - if (used_method == IGT_DRAW_MMAP_WC) + if (used_method == IGT_DRAW_MMAP_WC || + used_method == IGT_DRAW_MMAP_GTT) 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]); -- cgit v1.2.3