sna: Force the TearFree redisplay when populating a rotated configuration
We have to disable the "shadow idle; skipping" test if the CRTCs are showing stale content following a sna_crtc_attach(). Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=89904 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
a00ed98131
commit
e74ff58144
|
|
@ -1995,9 +1995,9 @@ get_scanout_bo(struct sna *sna, PixmapPtr pixmap)
|
|||
return priv->gpu_bo;
|
||||
}
|
||||
|
||||
static void clear(struct sna *sna,
|
||||
PixmapPtr front, struct kgem_bo *bo,
|
||||
xf86CrtcPtr crtc)
|
||||
static void shadow_clear(struct sna *sna,
|
||||
PixmapPtr front, struct kgem_bo *bo,
|
||||
xf86CrtcPtr crtc)
|
||||
{
|
||||
bool ok = false;
|
||||
if (!wedged(sna))
|
||||
|
|
@ -2009,6 +2009,12 @@ static void clear(struct sna *sna,
|
|||
if (ptr)
|
||||
memset(ptr, 0, bo->pitch * crtc->mode.HDisplay);
|
||||
}
|
||||
sna->mode.shadow_dirty = true;
|
||||
}
|
||||
|
||||
static bool rr_active(xf86CrtcPtr crtc)
|
||||
{
|
||||
return crtc->transformPresent || crtc->rotation != RR_Rotate_0;
|
||||
}
|
||||
|
||||
static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
|
||||
|
|
@ -2082,7 +2088,7 @@ force_shadow:
|
|||
}
|
||||
|
||||
front = sna_crtc->slave_pixmap ?: sna->front;
|
||||
if (__sna_pixmap_get_bo(front) && !crtc->transformPresent) {
|
||||
if (__sna_pixmap_get_bo(front) && !rr_active(crtc)) {
|
||||
BoxRec b;
|
||||
|
||||
b.x1 = crtc->x;
|
||||
|
|
@ -2100,7 +2106,7 @@ force_shadow:
|
|||
b.y2 = scrn->virtualY;
|
||||
if (b.x2 - b.x1 < crtc->mode.HDisplay ||
|
||||
b.y2 - b.y1 < crtc->mode.VDisplay)
|
||||
clear(sna, front, bo, crtc);
|
||||
shadow_clear(sna, front, bo, crtc);
|
||||
|
||||
if (b.y2 > b.y1 && b.x2 > b.x1) {
|
||||
DrawableRec tmp;
|
||||
|
|
@ -2120,11 +2126,11 @@ force_shadow:
|
|||
if (!sna->render.copy_boxes(sna, GXcopy,
|
||||
&front->drawable, __sna_pixmap_get_bo(front), 0, 0,
|
||||
&tmp, bo, -crtc->x, -crtc->y,
|
||||
&b, 1, 0))
|
||||
clear(sna, front, bo, crtc);
|
||||
&b, 1, COPY_LAST))
|
||||
shadow_clear(sna, front, bo, crtc);
|
||||
}
|
||||
} else
|
||||
clear(sna, front, bo, crtc);
|
||||
shadow_clear(sna, front, bo, crtc);
|
||||
|
||||
sna_crtc->shadow_bo_width = crtc->mode.HDisplay;
|
||||
sna_crtc->shadow_bo_height = crtc->mode.VDisplay;
|
||||
|
|
|
|||
Loading…
Reference in New Issue