summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-11-28 05:10:57 +1000
committerDave Airlie <airlied@linux.ie>2007-11-28 05:12:36 +1000
commitfebdcc2dccd42acbcd68ae630b7811cae5c58e8a (patch)
treec5ebf4c692cd977df12087d996df77d5b78ef5b2
parentbb8545146959b748994be055d5b3de66ec66c8b2 (diff)
legacy: fix fb/agp read/writes
-rw-r--r--src/radeon_driver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index cb772838..2e49d81b 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -817,8 +817,10 @@ void radeon_write_mc_fb_agp_location(ScrnInfoPtr pScrn, int mask, CARD32 fb_loc,
OUTMC(pScrn, R520_MC_AGP_LOCATION, agp_loc);
(void)INMC(pScrn, R520_MC_FB_LOCATION);
} else {
- OUTREG(RADEON_MC_FB_LOCATION, fb_loc);
- OUTREG(RADEON_MC_AGP_LOCATION, agp_loc);
+ if (mask & LOC_FB)
+ OUTREG(RADEON_MC_FB_LOCATION, fb_loc);
+ if (mask & LOC_AGP)
+ OUTREG(RADEON_MC_AGP_LOCATION, agp_loc);
}
}
@@ -849,8 +851,10 @@ void radeon_read_mc_fb_agp_location(ScrnInfoPtr pScrn, int mask, CARD32 *fb_loc,
*agp_loc_hi = 0;
}
} else {
- *fb_loc = INREG(RADEON_MC_FB_LOCATION);
- *agp_loc = INREG(RADEON_MC_AGP_LOCATION);
+ if (mask & LOC_FB)
+ *fb_loc = INREG(RADEON_MC_FB_LOCATION);
+ if (mask & LOC_AGP)
+ *agp_loc = INREG(RADEON_MC_AGP_LOCATION);
}
}