diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-06 12:44:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-06 13:06:14 +0100 |
commit | f6573fe7577e00a1d2706dbc39179ab658c021d2 (patch) | |
tree | 0855bf67542ff3f9e3ba9df39ce23eb769b728c3 | |
parent | d6afd66461ebcdc2e8dcd94b3f46f374d8acf469 (diff) |
sna: Compute aligned tiled heights for gen2 correctly
We were underestimating the height of X-tiled surfaces (and less
harmfully overestimating the height of Y-tiled surfaces.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 805677a6..4ae50bf7 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -452,11 +452,14 @@ static uint32_t kgem_surface_size(struct kgem *kgem, return tile_width; } -static uint32_t kgem_aligned_height(uint32_t height, uint32_t tiling) +static uint32_t kgem_aligned_height(struct kgem *kgem, + uint32_t height, uint32_t tiling) { uint32_t tile_height; - switch (tiling) { + if (kgem->gen < 30) { + tile_height = tiling ? 16 : 2; + } else switch (tiling) { default: case I915_TILING_NONE: tile_height = 2; @@ -1311,7 +1314,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem, goto skip_active_search; for (i = 0; i <= I915_TILING_Y; i++) - tiled_height[i] = kgem_aligned_height(height, i); + tiled_height[i] = kgem_aligned_height(kgem, height, i); search = 0; /* Best active match first */ |