@@ -2079,6 +2079,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:
@@ -2108,6 +2109,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]);
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> --- tests/kms_frontbuffer_tracking.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)