diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-06-22 12:24:28 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-06-22 12:24:28 -0400 |
commit | 9bb31158466e6168116d841d12c8b4303f11c4a6 (patch) | |
tree | f97c8bd3b9959c82fbc6abf6d5100f922f77be86 /src/radeon_kms.c | |
parent | 122b471f734aa07427b01d4bec35ff1ac28290b5 (diff) |
evergreen: fix num_banks for 2D tiling config
The field is encoded.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index aa4b1e33..e163e994 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -522,7 +522,19 @@ static Bool r600_get_tile_config(ScrnInfoPtr pScrn) return FALSE; } - info->num_banks = (info->tile_config & 0xf0) >> 4; + switch((info->tile_config & 0xf0) >> 4) { + case 0: + info->num_banks = 4; + break; + case 1: + info->num_banks = 8; + break; + case 2: + info->num_banks = 16; + break; + default: + return FALSE; + } switch ((info->tile_config & 0xf00) >> 8) { case 0: |