diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-09 12:25:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-09 12:25:43 +0000 |
commit | fcc89d26600a57317007035fa720915e8a2ade81 (patch) | |
tree | 69f2a0ca5bf46d04659b125106d5344732c424db | |
parent | f62b9f94f64f402e731463205635d386386e274e (diff) |
sna: Safety first; make all flinked bo unreusable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 1 | ||||
-rw-r--r-- | src/sna/sna_dri.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 8ef57834..22149cef 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1800,6 +1800,7 @@ uint32_t kgem_bo_flink(struct kgem *kgem, struct kgem_bo *bo) * on the buffer, and *presuming* they do not pass it on to a third * party, we track the lifetime accurately. */ + bo->reusable = false; return flink.name; } diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index d21cfb12..f0fcb94c 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -152,7 +152,6 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna, /* The bo is outside of our control, so presume it is written to */ priv->gpu_bo->needs_flush = true; - priv->gpu_bo->reusable = false; priv->gpu_bo->gpu = true; /* We need to submit any modifications to and reads from this @@ -202,7 +201,6 @@ sna_dri_create_buffer(DrawablePtr drawable, pixmap = get_drawable_pixmap(drawable); pixmap->refcnt++; bo = sna_pixmap_set_dri(sna, pixmap); - bo->reusable = true; bpp = pixmap->drawable.bitsPerPixel; DBG(("%s: attaching to front buffer %dx%d [%p:%d]\n", __FUNCTION__, @@ -953,7 +951,6 @@ static void set_pixmap(struct sna *sna, DRI2BufferPtr buffer, PixmapPtr pixmap) priv->pixmap->refcnt--; priv->pixmap = pixmap; priv->bo = sna_pixmap_set_dri(sna, pixmap); - priv->bo->reusable = true; buffer->name = kgem_bo_flink(&sna->kgem, priv->bo); buffer->pitch = priv->bo->pitch; } |