summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-02-23 10:22:19 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-02-23 10:22:19 -0500
commit918d511f6f26d2fdeb63d6e32cd348707b4a2140 (patch)
tree26bebf507b811670ad8cd6f34e7bc6f04569eb3e /src/radeon_driver.c
parent1f783117f79f95f1744681ccc7d80dc0e7b53057 (diff)
RS600: fix up MC setup
Please test if you have an RS600
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 87d5e9b8..031d987b 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -578,7 +578,7 @@ unsigned RADEONINMC(ScrnInfoPtr pScrn, int addr)
OUTREG(RS690_MC_INDEX, (addr & RS690_MC_INDEX_MASK));
data = INREG(RS690_MC_DATA);
} else if (info->ChipFamily == CHIP_FAMILY_RS600) {
- OUTREG(RS600_MC_INDEX, (addr & RS600_MC_INDEX_MASK));
+ OUTREG(RS600_MC_INDEX, ((addr & RS600_MC_ADDR_MASK) | RS600_MC_IND_CITF_ARB0));
data = INREG(RS600_MC_DATA);
} else if (IS_AVIVO_VARIANT) {
OUTREG(AVIVO_MC_INDEX, (addr & 0xff) | 0x7f0000);
@@ -591,7 +591,7 @@ unsigned RADEONINMC(ScrnInfoPtr pScrn, int addr)
OUTREG(R300_MC_IND_INDEX, addr & 0x3f);
(void)INREG(R300_MC_IND_INDEX);
data = INREG(R300_MC_IND_DATA);
-
+
OUTREG(R300_MC_IND_INDEX, 0);
(void)INREG(R300_MC_IND_INDEX);
}
@@ -612,10 +612,10 @@ void RADEONOUTMC(ScrnInfoPtr pScrn, int addr, uint32_t data)
OUTREG(RS690_MC_DATA, data);
OUTREG(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK);
} else if (info->ChipFamily == CHIP_FAMILY_RS600) {
- OUTREG(RS600_MC_INDEX, ((addr & RS600_MC_INDEX_MASK) |
- RS600_MC_INDEX_WR_EN));
+ OUTREG(RS600_MC_INDEX, ((addr & RS600_MC_ADDR_MASK) |
+ RS600_MC_IND_CITF_ARB0 |
+ RS600_MC_IND_WR_EN));
OUTREG(RS600_MC_DATA, data);
- OUTREG(RS600_MC_INDEX, RS600_MC_INDEX_WR_ACK);
} else if (IS_AVIVO_VARIANT) {
OUTREG(AVIVO_MC_INDEX, (addr & 0xff) | 0xff0000);
(void)INREG(AVIVO_MC_INDEX);
@@ -648,7 +648,7 @@ static Bool avivo_get_mc_idle(ScrnInfoPtr pScrn)
else
return FALSE;
} else if (info->ChipFamily == CHIP_FAMILY_RS600) {
- if (INMC(pScrn, RS600_MC_STATUS) & RS600_MC_STATUS_IDLE)
+ if (INMC(pScrn, RS600_MC_STATUS) & RS600_MC_IDLE)
return TRUE;
else
return FALSE;
@@ -696,8 +696,8 @@ static void radeon_write_mc_fb_agp_location(ScrnInfoPtr pScrn, int mask, uint32_
} else if (info->ChipFamily == CHIP_FAMILY_RS600) {
if (mask & LOC_FB)
OUTMC(pScrn, RS600_MC_FB_LOCATION, fb_loc);
- /* if (mask & LOC_AGP)
- OUTMC(pScrn, RS600_MC_AGP_LOCATION, agp_loc);*/
+ if (mask & LOC_AGP)
+ OUTMC(pScrn, RS600_MC_AGP_LOCATION, agp_loc);
} else if ((info->ChipFamily == CHIP_FAMILY_RS690) ||
(info->ChipFamily == CHIP_FAMILY_RS740)) {
if (mask & LOC_FB)
@@ -748,7 +748,7 @@ static void radeon_read_mc_fb_agp_location(ScrnInfoPtr pScrn, int mask, uint32_t
if (mask & LOC_FB)
*fb_loc = INMC(pScrn, RS600_MC_FB_LOCATION);
if (mask & LOC_AGP) {
- *agp_loc = 0;//INMC(pScrn, RS600_MC_AGP_LOCATION);
+ *agp_loc = INMC(pScrn, RS600_MC_AGP_LOCATION);
*agp_loc_hi = 0;
}
} else if ((info->ChipFamily == CHIP_FAMILY_RS690) ||
@@ -1881,6 +1881,10 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
if (info->cardType == CARD_PCIE && info->IsIGP)
info->cardType = CARD_PCI;
+ /* not sure about gart table requirements */
+ if ((info->ChipFamily == CHIP_FAMILY_RS600) && info->IsIGP)
+ info->cardType = CARD_PCIE;
+
if ((s = xf86GetOptValString(info->Options, OPTION_BUS_TYPE))) {
if (strcmp(s, "AGP") == 0) {
info->cardType = CARD_AGP;