summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-18 11:39:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-04-18 12:08:05 +0100
commitfd81408b978c9b57c046ee43d2d32e1370e83a7d (patch)
tree1dca3f6ffe0789d0ab8839346c69cf62e60c4453
parent11599e52b842b5db76798879b0fbb57762fe6002 (diff)
sna: Increase the render target alignment to 4 pixels on gen4+ as well
Repoerted-and-tested-by: Toralf Förster <toralf.foerster@gmx.de Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48865 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 3d722d03..72b6ad77 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -838,13 +838,8 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
} else switch (tiling) {
default:
case I915_TILING_NONE:
- if (kgem->gen < 40) {
- tile_width = scanout ? 64 : 4 * bpp >> 3;
- tile_height = 4;
- } else {
- tile_width = scanout ? 64 : 2 * bpp >> 3;
- tile_height = 2;
- }
+ tile_width = scanout ? 64 : 4 * bpp >> 3;
+ tile_height = 2;
break;
case I915_TILING_X:
tile_width = 512;
@@ -898,7 +893,7 @@ static uint32_t kgem_aligned_height(struct kgem *kgem,
} else switch (tiling) {
default:
case I915_TILING_NONE:
- tile_height = kgem->gen < 40 ? 4 : 2;
+ tile_height = 2;
break;
case I915_TILING_X:
tile_height = 8;
@@ -2881,7 +2876,7 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem,
stride = ALIGN(width, 2) * bpp >> 3;
stride = ALIGN(stride, 4);
- size = ALIGN(height, kgem->gen < 40 ? 4 : 2) * stride;
+ size = ALIGN(height, 2) * stride;
assert(size >= PAGE_SIZE);