xf86-video-intel: src/sna/sna_accel.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jun 1 09:10:27 PDT 2015
src/sna/sna_accel.c | 1 +
src/sna/sna_dri2.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 189ad44c94f500f05264d1666b18a96c82cb25ee
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jun 1 17:08:24 2015 +0100
sna/dri2: Only attempt to change tiling when required
If we have no fence, we then try to discard the tiling. However, the
change_tiling routine assumes that it is only called when a change is
actually required. Make it so for dri2.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8f0326b..09f78c8 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -659,6 +659,7 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling)
__FUNCTION__, priv->gpu_bo->tiling, tiling,
pixmap->drawable.width, pixmap->drawable.height));
assert(priv->gpu_damage == NULL || priv->gpu_bo);
+ assert(priv->gpu_bo->tiling != tiling);
if (priv->pinned) {
DBG(("%s: can't convert pinned bo\n", __FUNCTION__));
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index cc01ba6..1675c98 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -469,7 +469,8 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
assert(priv->gpu_bo->flush == false);
if (!sna->kgem.can_fence) {
- if (!sna_pixmap_change_tiling(pixmap, I915_TILING_NONE)) {
+ if (priv->gpu_bo->tiling &&
+ !sna_pixmap_change_tiling(pixmap, I915_TILING_NONE)) {
DBG(("%s: failed to discard tiling (%d) for DRI2 protocol\n", __FUNCTION__, priv->gpu_bo->tiling));
return NULL;
}
More information about the xorg-commit
mailing list