From 50621bc91538ebeca9fdc82bae829bce45c4298a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 25 Oct 2015 15:41:10 +0000 Subject: [PATCH] sna: Always progess the shadow buffer after redisplay A complication arises when switching back on a TearFree output with DPMS on as the shadow buffer remains intact yet is imediately shown. This causes the subsequent redisplay to skip the update, but ends up permenently skipping all future updates as it continues to render directly onto the scanout. References: https://bugs.freedesktop.org/show_bug.cgi?id=92018 Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index a617218..9395987 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -8449,7 +8449,7 @@ disable1: assert(crtc != NULL); DBG(("%s: crtc %d [%d, pipe=%d] active? %d, transformed? %d\n", - __FUNCTION__, i, __sna_crtc_id(crtc), crtc->bo ? crtc->bo->handle : 0, crtc->transform)); + __FUNCTION__, i, __sna_crtc_id(crtc), __sna_crtc_pipe(crtc), crtc->bo ? crtc->bo->handle : 0, crtc->transform)); if (crtc->bo == NULL || crtc->transform) continue; @@ -8500,6 +8500,8 @@ fixup_shadow: if (crtc->bo == flip_bo) { assert(crtc->bo->refcnt >= crtc->bo->active_scanout); + DBG(("%s: flip handle=%d is already on the CRTC \n", + __FUNCTION__, flip_bo->handle)); continue; } @@ -8582,11 +8584,9 @@ fixup_flip: sna->mode.flip_active, sna->mode.shadow ? sna->mode.shadow->handle : 0)); - if (sna->mode.flip_active) { - assert(old == sna->mode.shadow); - assert(old->refcnt >= 1); - set_shadow(sna, region); - } + assert(old == sna->mode.shadow); + assert(old->refcnt >= 1); + set_shadow(sna, region); } else kgem_submit(&sna->kgem); -- 2.6.1