diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-04 11:12:30 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-04 11:12:30 +0000 |
commit | ad3959324c02de2e73e7d1142d42248f7dbb4518 (patch) | |
tree | 1299fccbe72755b7ed104ff493cb3bdf5605a73f | |
parent | 8d067e961920e19fda7e9990440ac2be1a2e1760 (diff) |
sna: Only destroy the old GPU after successfully replacing it
Along the sna_replace__xor path we destroyed the priv->gpu_bo twice upon
successfully replacing it.
References: https://bugs.freedesktop.org/show_bug.cgi?id=70527
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_io.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index bad6052a..75d9fe10 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -1304,7 +1304,6 @@ bool sna_write_boxes__xor(struct sna *sna, PixmapPtr dst, if (wedged(sna)) return false; - can_blt = kgem_bo_can_blt(kgem, dst_bo) && (box[0].x2 - box[0].x1) * dst->drawable.bitsPerPixel < 8 * (MAXSHORT - 4); extents = box[0]; @@ -1897,10 +1896,8 @@ sna_replace__xor(struct sna *sna, PixmapPtr pixmap, pixmap->drawable.bitsPerPixel, bo->tiling, CREATE_GTT_MAP | CREATE_INACTIVE); - if (new_bo) { - kgem_bo_destroy(&sna->kgem, bo); + if (new_bo) bo = new_bo; - } } if (kgem_bo_can_map(&sna->kgem, bo) && |