From d1479d8d03f2a1f2c2f0f3f89c5341c65e27d2d5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 1 Jun 2015 08:42:28 +0100 Subject: [PATCH] sna: Double check that a tiling change request results in a change Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9a5079f8..8f0326b8 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -683,6 +683,12 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling) return NULL; } + if (bo->tiling == priv->gpu_bo->tiling) { + DBG(("%s: tiling request failed\n", __FUNCTION__)); + kgem_bo_destroy(&sna->kgem, bo); + return NULL; + } + box.x1 = box.y1 = 0; box.x2 = pixmap->drawable.width; box.y2 = pixmap->drawable.height;