diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-10 17:13:38 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-10 17:13:38 +0000 |
commit | ca2a07adc45273dc1abeb4b3ba7f88461aaf9c00 (patch) | |
tree | 9883407a55f588539a941043d46eff316f62dc0c /src | |
parent | 8dd913fd3a093b54fc024fea2b31a3db2518db8d (diff) |
sna: Release the stale GTT mapping after recreating the bo with new tiling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 6200dd32..fc13dfdb 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -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; } |