summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-11 14:53:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-11 15:00:59 +0100
commit5b7efe375ae951ffcdb2c81e2ad8a2ed86ffbdf2 (patch)
tree3d15381ce1670e12f6c52af35e66fa229c1fae82
parentad8af95dd35921118f45d6cff355c80cf0906ff0 (diff)
i830: Use set_pixmap_bo() instead of open-coding.
The advantage is that this enables in-flight reuse of the old pixmap if possible. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/i830_uxa.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 544eb391..8255fb74 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -741,18 +741,12 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
if (tiling != I915_TILING_NONE)
drm_intel_bo_set_tiling(bo, &tiling, stride);
- dri_bo_unreference(priv->bo);
- priv->bo = bo;
- priv->tiling = tiling;
- priv->stride = stride;
- priv->batch_read_domains = priv->batch_write_domain = 0;
- priv->flush_read_domains = priv->flush_write_domain = 0;
- list_del(&priv->batch);
- list_del(&priv->flush);
pixmap->drawable.pScreen->ModifyPixmapHeader(pixmap,
w, h,
0, 0,
stride, NULL);
+ i830_set_pixmap_bo(pixmap, bo);
+ dri_bo_unreference(bo);
} else {
bo = priv->bo;
stride = i830_pixmap_pitch(pixmap);