diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-19 17:50:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-19 17:50:56 +0000 |
commit | 7d147c7462ba183f5316e7e8dafeca62add6f97c (patch) | |
tree | f7886497f522a31f8c586335768ec506ea7057be | |
parent | 95391b7312147760d8da01fce68b8398aa8e4e2f (diff) |
sna: Correct tile sizes for Y-tiling on i915g
128-byte Y-tiling wasn't introduced until the 945.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index f20a7bb1..f107f145 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -731,11 +731,16 @@ static uint32_t kgem_untiled_pitch(struct kgem *kgem, void kgem_get_tile_size(struct kgem *kgem, int tiling, int *tile_width, int *tile_height, int *tile_size) { - if (kgem->gen < 30) { + if (kgem->gen <= 30) { if (tiling) { *tile_width = 512; - *tile_height = 16; - *tile_size = 2048; + if (kgem->gen < 30) { + *tile_height = 16; + *tile_size = 2048; + } else { + *tile_height = 8; + *tile_size = 4096; + } } else { *tile_width = 1; *tile_height = 1; @@ -754,7 +759,7 @@ void kgem_get_tile_size(struct kgem *kgem, int tiling, *tile_size = 4096; break; case I915_TILING_Y: - *tile_width = kgem->gen <= 30 ? 512 : 128; + *tile_width = 128; *tile_height = 32; *tile_size = 4096; break; @@ -776,10 +781,10 @@ static uint32_t kgem_surface_size(struct kgem *kgem, assert(width <= MAXSHORT); assert(height <= MAXSHORT); - if (kgem->gen < 30) { + if (kgem->gen <= 30) { if (tiling) { tile_width = 512; - tile_height = 16; + tile_height = kgem->gen < 30 ? 16 : 8; } else { tile_width = scanout ? 64 : kgem->min_alignment; tile_height = 2; @@ -795,7 +800,7 @@ static uint32_t kgem_surface_size(struct kgem *kgem, tile_height = 8; break; case I915_TILING_Y: - tile_width = kgem->gen <= 30 ? 512 : 128; + tile_width = 128; tile_height = 32; break; } @@ -837,8 +842,8 @@ static uint32_t kgem_aligned_height(struct kgem *kgem, { uint32_t tile_height; - if (kgem->gen < 30) { - tile_height = tiling ? 16 : 2; + if (kgem->gen <= 30) { + tile_height = tiling ? kgem->gen < 30 ? 16 : 8 : 1; } else switch (tiling) { default: case I915_TILING_NONE: |