From 6db93720a73f59a9857a3c5ab260fab8b957813e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 2 Jul 2011 23:04:14 +0100 Subject: sna: Don't change tiling modes on replace This was trying to workaround a kernel bug, and instead causes a performance cliff for textures that *need* to be tiled. Signed-off-by: Chris Wilson --- src/sna/sna_io.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index 61d10625..c3904664 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -411,22 +411,15 @@ struct kgem_bo *sna_replace(struct sna *sna, struct kgem *kgem = &sna->kgem; void *dst; - DBG(("%s(%dx%d, bpp=%d, tiling=%d)\n", - __FUNCTION__, width, height, bpp, bo->tiling)); + DBG(("%s(handle=%d, %dx%d, bpp=%d, tiling=%d)\n", + __FUNCTION__, bo->handle, width, height, bpp, bo->tiling)); assert(bo->reusable); if (kgem_bo_is_busy(kgem, bo)) { struct kgem_bo *new_bo; - int tiling = bo->tiling; - - /* As we use fences for GPU BLTs, we often have - * lots of contention upon the limited number of fences. - */ - if (sna->kgem.gen < 40) - tiling = I915_TILING_NONE; new_bo = kgem_create_2d(kgem, - width, height, bpp, tiling, + width, height, bpp, bo->tiling, CREATE_INACTIVE); if (new_bo) { kgem_bo_destroy(kgem, bo); -- cgit v1.2.3