From d0f8bffbbc26818eccdd305ef142387dc4975bba Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 16 Feb 2011 15:09:20 -0500 Subject: 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 --- src/radeon_kms.c | 34 ++++++++++++++++++++++++++++++++-- 1 file 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: -- cgit v1.2.3