sna: Release the stale GTT mapping after recreating the bo with new tiling

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-01-10 17:13:38 +00:00
parent 8dd913fd3a
commit ca2a07adc4
1 changed files with 7 additions and 1 deletions

View File

@ -371,10 +371,16 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling)
&box, 1)) {
DBG(("%s: copy failed\n", __FUNCTION__));
kgem_bo_destroy(&sna->kgem, bo);
return false;
return NULL;
}
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
if (priv->mapped) {
pixmap->devPrivate.ptr = NULL;
priv->mapped = 0;
}
return priv->gpu_bo = bo;
}