summaryrefslogtreecommitdiff
authorAlex Deucher <alexdeucher@gmail.com>2009-03-15 16:08:04 (GMT)
committer Alex Deucher <alexdeucher@gmail.com>2009-03-15 16:08:04 (GMT)
commita55ced5ee20c07e743c7c0978803fd10589c1531 (patch) (side-by-side diff)
tree8073c26004523a5bb41d79a8af297eb286aa4abd
parenta065eeb9b301ab452cc8fbd3cac1fd9a3841c4e1 (diff)
downloadxf86-video-ati-a55ced5ee20c07e743c7c0978803fd10589c1531.zip
xf86-video-ati-a55ced5ee20c07e743c7c0978803fd10589c1531.tar.gz
Fix fallout from r6xx/r7xx EXA merge in IB handling
Noticed Christiaan van Dijk. Should fix bug 20510
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/radeon_accel.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index dffbc57..a9a4848 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -688,8 +688,6 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
drmBufPtr buffer = info->cp->indirectBuffer;
int start = info->cp->indirectStart;
drm_radeon_indirect_t indirect;
- RING_LOCALS;
- RADEONCP_REFRESH(pScrn, info);
if (!buffer) return;
if (start == buffer->used && !discard) return;
@@ -700,10 +698,14 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
}
if (info->ChipFamily >= CHIP_FAMILY_R600) {
- while (buffer->used & 0x3c){
- BEGIN_RING(1);
- OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */
- ADVANCE_RING();
+ if (buffer->used & 0x3c) {
+ RING_LOCALS;
+
+ while (buffer->used & 0x3c) {
+ BEGIN_RING(1);
+ OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */
+ ADVANCE_RING();
+ }
}
}
@@ -735,12 +737,11 @@ void RADEONCPReleaseIndirect(ScrnInfoPtr pScrn)
drmBufPtr buffer = info->cp->indirectBuffer;
int start = info->cp->indirectStart;
drm_radeon_indirect_t indirect;
- RING_LOCALS;
- RADEONCP_REFRESH(pScrn, info);
-
if (info->ChipFamily >= CHIP_FAMILY_R600) {
- if (buffer) {
+ if (buffer && (buffer->used & 0x3c)) {
+ RING_LOCALS;
+
while (buffer->used & 0x3c) {
BEGIN_RING(1);
OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */