Commit d9bf46e4 authored by Chris Wilson's avatar Chris Wilson 🤔
Browse files

sna: Discard the per-crtc TearFree back buffer on resize



When we mix TearFree and per-crtc pixmaps (e.g. for RandR transformations),
we stash the old buffer on the CRTC for double buffering. However, this
buffer needs to be reallocated when we change output resolutions, as the
CRTC size may change.
Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 4953aa13
......@@ -2586,6 +2586,11 @@ static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
}
sna_crtc->rotation = RR_Rotate_0;
if (sna_crtc->cache_bo) {
kgem_bo_destroy(&sna->kgem, sna_crtc->cache_bo);
sna_crtc->cache_bo = NULL;
}
if (use_shadow(sna, crtc)) {
PixmapPtr front;
unsigned long tiled_limit;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment