From 7534e96ffbe208ec2aa41b1b5848d05749b48797 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 17 Jun 2017 20:42:47 +0100 Subject: [PATCH] sna/dri2: Defer the drawable flush Just flag the DRI2 flush to occur on the next callback flush, as per normal, instead of manually emitting the batch. Signed-off-by: Chris Wilson --- src/sna/sna_dri2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 08660c54..2d822369 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -615,6 +615,8 @@ sna_dri2_create_buffer(DrawablePtr draw, size = (uint32_t)draw->height << 16 | draw->width; switch (attachment) { case DRI2BufferFrontLeft: + sna->needs_dri_flush = true; + pixmap = get_drawable_pixmap(draw); buffer = NULL; if (draw->type != DRAWABLE_PIXMAP) @@ -643,12 +645,6 @@ sna_dri2_create_buffer(DrawablePtr draw, assert(private->bo->pitch == buffer->pitch); assert(private->bo->active_scanout); - sna_pixmap_move_to_gpu(pixmap, - MOVE_READ | - __MOVE_FORCE | - __MOVE_DRI); - kgem_bo_submit(&sna->kgem, private->bo); - private->refcnt++; return buffer; }