sna: Ensure we only cache the local CRTC scanout buffer

Double check that we are not about to cache the common, untransformed,
shadow buffer for the per-CRTC transformed buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-05-16 10:14:04 +01:00
parent 3a7d6afd85
commit 34f63f28c8
1 changed files with 5 additions and 3 deletions

View File

@ -8777,9 +8777,11 @@ disable1:
sna_crtc->flip_serial = sna_crtc->mode_serial;
sna_crtc->flip_pending = true;
assert_scanout(&sna->kgem, sna_crtc->bo,
crtc->mode.HDisplay, crtc->mode.VDisplay);
sna_crtc->cache_bo = kgem_bo_reference(sna_crtc->bo);
if (sna_crtc->bo != sna->mode.shadow) {
assert_scanout(&sna->kgem, sna_crtc->bo,
crtc->mode.HDisplay, crtc->mode.VDisplay);
sna_crtc->cache_bo = kgem_bo_reference(sna_crtc->bo);
}
DBG(("%s: recording flip on CRTC:%d handle=%d, active_scanout=%d, serial=%d\n",
__FUNCTION__, __sna_crtc_id(sna_crtc), sna_crtc->flip_bo->handle, sna_crtc->flip_bo->active_scanout, sna_crtc->flip_serial));
} else {