sna: Double check that a tiling change request results in a change

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-06-01 08:42:28 +01:00
parent 67185f54ba
commit d1479d8d03
1 changed files with 6 additions and 0 deletions

View File

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