From 89f2b09b1e5be9842747998ea4fe32a6f1ede4cc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 13 Apr 2012 16:37:43 +0100 Subject: [PATCH] sna: Avoid using TILING_Y for large objects on gen2/3 References: https://bugs.freedesktop.org/show_bug.cgi?id=48636 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 8fcdd141..1c43fb76 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -458,6 +458,16 @@ static inline uint32_t default_tiling(PixmapPtr pixmap) __FUNCTION__)); sna_damage_destroy(&priv->gpu_damage); priv->undamaged = false; + + /* Only on later generations was the render pipeline + * more flexible than the BLT. So on gen2/3, prefer to + * keep large objects accessible through the BLT. + */ + if (sna->kgem.gen < 40 && + (pixmap->drawable.width > sna->render.max_3d_size || + pixmap->drawable.height > sna->render.max_3d_size)) + return I915_TILING_X; + return I915_TILING_Y; }