diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-30 12:38:39 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-30 12:38:39 +0100 |
commit | 0532b3cc3c98c255a64692094b9e258201422f85 (patch) | |
tree | 894004e9a739932aa63331e2f596b30200fb28cc /src | |
parent | aad53e37a7e6c842ae688df74a06024315e07ba2 (diff) |
sna: Unmap cow bo when recreating the source bo
When we destroy the original source and copy it to a new bo, we also
need to make sure that any mappings of the original bo in the clones are
undone.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 6f56a9ed..9113d94e 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1673,6 +1673,10 @@ sna_pixmap_undo_cow(struct sna *sna, struct sna_pixmap *priv, unsigned flags) assert(clone->gpu_bo == cow->bo); kgem_bo_destroy(&sna->kgem, clone->gpu_bo); clone->gpu_bo = kgem_bo_reference(bo); + if (clone->mapped) { + clone->pixmap->devPrivate.ptr = NULL; + clone->mapped = false; + } } cow->bo = bo; kgem_bo_destroy(&sna->kgem, bo); |