xf86-video-ati: Branch 'atombios-support'
Dave Airlie
airlied at kemper.freedesktop.org
Mon Nov 19 21:57:27 PST 2007
src/radeon_driver.c | 37 +++++++++++++++++++++++++++++--------
src/radeon_reg.h | 4 ++++
2 files changed, 33 insertions(+), 8 deletions(-)
New commits:
commit 4a523da5221d53f2efa49da2326500e9b0b9f14d
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Nov 20 15:31:11 2007 +1000
r600: get r600 to work non-accelerated.
DDC still not working yet
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9bcde2d..205e21e 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 3aedb4c..424ec19 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
More information about the xorg-commit
mailing list