summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-02-16 15:09:20 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-02-16 15:20:22 -0500
commitd0f8bffbbc26818eccdd305ef142387dc4975bba (patch)
tree24d201ea87d99257f0304707f2517964e5d342c0
parent0471d8412acd82e281a35fc4c6bb2d53b1ff5802 (diff)
kms: add tiling support for evergreen/NI
- requires 2.6.37 or newer - 1D only at the moment - disabled by default Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/radeon_kms.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 269a850..158dc57 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -472,8 +472,38 @@ static Bool r600_get_tile_config(ScrnInfoPtr pScrn)
info->tile_config = tmp;
info->r7xx_bank_op = 0;
if (info->ChipFamily >= CHIP_FAMILY_CEDAR) {
- /* for now */
- return FALSE;
+ if (info->dri->pKernelDRMVersion->version_minor >= 7) {
+ switch (info->tile_config & 0xf) {
+ case 0:
+ info->num_channels = 1;
+ break;
+ case 1:
+ info->num_channels = 2;
+ break;
+ case 2:
+ info->num_channels = 4;
+ break;
+ case 3:
+ info->num_channels = 8;
+ break;
+ default:
+ return FALSE;
+ }
+
+ info->num_banks = (info->tile_config & 0xf0) >> 4;
+
+ switch ((info->tile_config & 0xf00) >> 8) {
+ case 0:
+ info->group_bytes = 256;
+ break;
+ case 1:
+ info->group_bytes = 512;
+ break;
+ default:
+ return FALSE;
+ }
+ } else
+ return FALSE;
} else {
switch((info->tile_config & 0xe) >> 1) {
case 0: