summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2008-02-27 14:37:52 -0500
committerAlex Deucher <alex@samba.(none)>2008-02-27 14:37:52 -0500
commitea944f38dcfd871b27345698afea1cb986ecb049 (patch)
tree374658f98567f47b69b1313f7ebb1fb00041e3ea
parentb865faf95666e2172c3eec143f77fe9c524e4983 (diff)
R300+: update RADEONCP_REFRESH() to reflect new location of scissor regs
-rw-r--r--src/radeon.h17
-rw-r--r--src/radeon_accel.c8
2 files changed, 18 insertions, 7 deletions
diff --git a/src/radeon.h b/src/radeon.h
index aba3c0f2..9c83a4fb 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -998,11 +998,18 @@ do { \
info->needCacheFlush = FALSE; \
} \
RADEON_WAIT_UNTIL_IDLE(); \
- BEGIN_RING(6); \
- OUT_RING_REG(RADEON_RE_TOP_LEFT, info->re_top_left); \
- OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, info->re_width_height); \
- OUT_RING_REG(RADEON_AUX_SC_CNTL, info->aux_sc_cntl); \
- ADVANCE_RING(); \
+ if (info->ChipFamily <= CHIP_FAMILY_RV280) { \
+ BEGIN_RING(6); \
+ OUT_RING_REG(RADEON_RE_TOP_LEFT, info->re_top_left); \
+ OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, info->re_width_height); \
+ OUT_RING_REG(RADEON_AUX_SC_CNTL, info->aux_sc_cntl); \
+ ADVANCE_RING(); \
+ } else { \
+ BEGIN_RING(4); \
+ OUT_RING_REG(R300_SC_SCISSOR0, info->re_top_left); \
+ OUT_RING_REG(R300_SC_SCISSOR1, info->re_width_height); \
+ ADVANCE_RING(); \
+ } \
info->CPInUse = TRUE; \
} \
} while (0)
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 8b2f167f..015d1763 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -390,8 +390,12 @@ void RADEONEngineInit(ScrnInfoPtr pScrn)
info->sc_bottom = RADEON_DEFAULT_SC_BOTTOM_MAX;
info->re_top_left = 0x00000000;
- info->re_width_height = ((0x7ff << RADEON_RE_WIDTH_SHIFT) |
- (0x7ff << RADEON_RE_HEIGHT_SHIFT));
+ if (info->ChipFamily <= CHIP_FAMILY_RV280)
+ info->re_width_height = ((0x7ff << RADEON_RE_WIDTH_SHIFT) |
+ (0x7ff << RADEON_RE_HEIGHT_SHIFT));
+ else
+ info->re_width_height = ((8191 << R300_SCISSOR_X_SHIFT) |
+ (8191 << R300_SCISSOR_Y_SHIFT));
info->aux_sc_cntl = 0x00000000;
#endif