summaryrefslogtreecommitdiff
path: root/shared/radeon_cp.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-02-21 23:23:09 +0000
committerEric Anholt <anholt@freebsd.org>2003-02-21 23:23:09 +0000
commitcfa778af9c70faea8c13e5cb7f80029eee0d074e (patch)
tree15483e64b6c2b56d3bb0f247df9df2c2602e0404 /shared/radeon_cp.c
parenta64472d18493de575a7636704b45babe7b4b4572 (diff)
Merge from bsd-4-0-0-branch.bsd-4-0-0-20030221-merge
Diffstat (limited to 'shared/radeon_cp.c')
-rw-r--r--shared/radeon_cp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index 6994fe9e..89c9eab1 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -926,11 +926,11 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev,
RADEON_WRITE( RADEON_SCRATCH_UMSK, 0x7 );
/* Writeback doesn't seem to work everywhere, test it first */
- DRM_WRITE32( &dev_priv->scratch[1], 0 );
+ DRM_WRITE32( dev_priv->ring_rptr, RADEON_SCRATCHOFF(1), 0 );
RADEON_WRITE( RADEON_SCRATCH_REG1, 0xdeadbeef );
for ( tmp = 0 ; tmp < dev_priv->usec_timeout ; tmp++ ) {
- if ( DRM_READ32( &dev_priv->scratch[1] ) == 0xdeadbeef )
+ if ( DRM_READ32( dev_priv->ring_rptr, RADEON_SCRATCHOFF(1) ) == 0xdeadbeef )
break;
DRM_UDELAY( 1 );
}
@@ -1217,6 +1217,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
(dev_priv->ring.size / sizeof(u32)) - 1;
dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK;
+ dev_priv->ring.ring_rptr = dev_priv->ring_rptr;
#if __REALLY_HAVE_SG
if ( dev_priv->is_pci ) {
@@ -1542,7 +1543,7 @@ drm_buf_t *radeon_freelist_get( drm_device_t *dev )
drm_buf_t *buf;
int i, t;
int start;
- u32 done_age = DRM_READ32(&dev_priv->scratch[1]);
+ u32 done_age = DRM_READ32(dev_priv->ring_rptr, RADEON_SCRATCHOFF(1));
if ( ++dev_priv->last_buf >= dma->buf_count )
dev_priv->last_buf = 0;