summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-11-20 15:31:11 +1000
committerDave Airlie <airlied@redhat.com>2007-11-20 15:31:11 +1000
commit4a523da5221d53f2efa49da2326500e9b0b9f14d (patch)
treec2950b5808605b9fa97e33ba0145882aca3e18af
parent80023441ba46882bc810ff3790c7148059f155f5 (diff)
r600: get r600 to work non-accelerated.
DDC still not working yet
-rw-r--r--src/radeon_driver.c37
-rw-r--r--src/radeon_reg.h4
2 files changed, 33 insertions, 8 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9bcde2df..205e21e2 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1272,7 +1272,17 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
CARD32 mem_size;
CARD32 aper_size;
+ if (info->ChipFamily >= CHIP_FAMILY_R600) {
+ mem_size = INREG(RADEON_CONFIG_MEMSIZE);
+ aper_size = INREG(RADEON_CONFIG_APER_SIZE);
+ info->mc_fb_location = 0xcfffc000;
+ info->fbLocation = (info->mc_fb_location & 0xffff) << 16;
+ info->mc_agp_location = 0xffffffc0;
+ return;
+ }
+
if (IS_AVIVO_VARIANT) {
+
if (info->ChipFamily == CHIP_FAMILY_RV515) {
info->mc_fb_location = INMC(pScrn, RV515_MC_FB_LOCATION);
info->mc_agp_location = INMC(pScrn, RV515_MC_AGP_LOCATION);
@@ -1489,13 +1499,18 @@ static Bool RADEONPreInitVRAM(ScrnInfoPtr pScrn)
OUTREG(RADEON_CONFIG_MEMSIZE, pScrn->videoRam * 1024);
} else {
- /* Read VRAM size from card */
- pScrn->videoRam = INREG(RADEON_CONFIG_MEMSIZE) / 1024;
-
- /* Some production boards of m6 will return 0 if it's 8 MB */
- if (pScrn->videoRam == 0) {
- pScrn->videoRam = 8192;
- OUTREG(RADEON_CONFIG_MEMSIZE, 0x800000);
+
+ if (info->ChipFamily >= CHIP_FAMILY_R600)
+ pScrn->videoRam = INREG(R600_CONFIG_MEMSIZE) / 1024;
+ else {
+ /* Read VRAM size from card */
+ pScrn->videoRam = INREG(RADEON_CONFIG_MEMSIZE) / 1024;
+
+ /* Some production boards of m6 will return 0 if it's 8 MB */
+ if (pScrn->videoRam == 0) {
+ pScrn->videoRam = 8192;
+ OUTREG(RADEON_CONFIG_MEMSIZE, 0x800000);
+ }
}
}
@@ -1643,7 +1658,7 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
if (info->ChipFamily >= CHIP_FAMILY_R600) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "R600 support is mostly incomplete and very experimental\n"); return FALSE;
+ "R600 support is mostly incomplete and very experimental\n");
}
if ((info->ChipFamily >= CHIP_FAMILY_RV515) && (info->ChipFamily < CHIP_FAMILY_R600)) {
@@ -2194,6 +2209,9 @@ static void RADEONPreInitColorTiling(ScrnInfoPtr pScrn)
if (!info->allowColorTiling)
return;
+ if (info->ChipFamily >= CHIP_FAMILY_R600)
+ info->allowColorTiling = FALSE;
+
#ifdef XF86DRI
if (info->directRenderingEnabled &&
info->pKernelDRMVersion->version_minor < 14) {
@@ -3718,6 +3736,9 @@ void RADEONRestoreMemMapRegisters(ScrnInfoPtr pScrn,
unsigned char *RADEONMMIO = info->MMIO;
int timeout;
+ if (info->ChipFamily >= CHIP_FAMILY_R600)
+ return;
+
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"RADEONRestoreMemMapRegisters() : \n");
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index 3aedb4c9..424ec198 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -3689,4 +3689,8 @@
# define AVIVO_I2C_EN (1 << 0)
# define AVIVO_I2C_RESET (1 << 8)
+#define R600_BUS_CNTL 0x5420
+#define R600_CONFIG_CNTL 0x5424
+#define R600_CONFIG_MEMSIZE 0x5428
+#define R600_CONFIG_APER_SIZE 0x5430
#endif