sna: Safety first; make all flinked bo unreusable

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-09 12:25:43 +00:00
parent f62b9f94f6
commit fcc89d2660
2 changed files with 1 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}