aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/radeon_accel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/radeon_accel.c')
-rw-r--r--drivers/video/aty/radeon_accel.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
index aa95f8350242..a469a3d6edcb 100644
--- a/drivers/video/aty/radeon_accel.c
+++ b/drivers/video/aty/radeon_accel.c
@@ -211,9 +211,7 @@ void radeonfb_engine_reset(struct radeonfb_info *rinfo)
211 host_path_cntl = INREG(HOST_PATH_CNTL); 211 host_path_cntl = INREG(HOST_PATH_CNTL);
212 rbbm_soft_reset = INREG(RBBM_SOFT_RESET); 212 rbbm_soft_reset = INREG(RBBM_SOFT_RESET);
213 213
214 if (rinfo->family == CHIP_FAMILY_R300 || 214 if (IS_R300_VARIANT(rinfo)) {
215 rinfo->family == CHIP_FAMILY_R350 ||
216 rinfo->family == CHIP_FAMILY_RV350) {
217 u32 tmp; 215 u32 tmp;
218 216
219 OUTREG(RBBM_SOFT_RESET, (rbbm_soft_reset | 217 OUTREG(RBBM_SOFT_RESET, (rbbm_soft_reset |
@@ -249,9 +247,7 @@ void radeonfb_engine_reset(struct radeonfb_info *rinfo)
249 INREG(HOST_PATH_CNTL); 247 INREG(HOST_PATH_CNTL);
250 OUTREG(HOST_PATH_CNTL, host_path_cntl); 248 OUTREG(HOST_PATH_CNTL, host_path_cntl);
251 249
252 if (rinfo->family != CHIP_FAMILY_R300 && 250 if (!IS_R300_VARIANT(rinfo))
253 rinfo->family != CHIP_FAMILY_R350 &&
254 rinfo->family != CHIP_FAMILY_RV350)
255 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset); 251 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset);
256 252
257 OUTREG(CLOCK_CNTL_INDEX, clock_cntl_index); 253 OUTREG(CLOCK_CNTL_INDEX, clock_cntl_index);
@@ -268,10 +264,18 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
268 radeonfb_engine_reset(rinfo); 264 radeonfb_engine_reset(rinfo);
269 265
270 radeon_fifo_wait (1); 266 radeon_fifo_wait (1);
271 if ((rinfo->family != CHIP_FAMILY_R300) && 267 if (IS_R300_VARIANT(rinfo)) {
272 (rinfo->family != CHIP_FAMILY_R350) && 268 OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) |
273 (rinfo->family != CHIP_FAMILY_RV350)) 269 RB2D_DC_AUTOFLUSH_ENABLE |
270 RB2D_DC_DC_DISABLE_IGNORE_PE);
271 } else {
272 /* This needs to be double checked with ATI. Latest X driver
273 * completely "forgets" to set this register on < r3xx, and
274 * we used to just write 0 there... I'll keep the 0 and update
275 * that when we have sorted things out on X side.
276 */
274 OUTREG(RB2D_DSTCACHE_MODE, 0); 277 OUTREG(RB2D_DSTCACHE_MODE, 0);
278 }
275 279
276 radeon_fifo_wait (3); 280 radeon_fifo_wait (3);
277 /* We re-read MC_FB_LOCATION from card as it can have been 281 /* We re-read MC_FB_LOCATION from card as it can have been