aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_cp.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2008-02-06 23:59:24 -0500
committerDave Airlie <airlied@redhat.com>2008-02-07 00:12:07 -0500
commit576cc458a64673ecf3fa7f1bab751e52fd939071 (patch)
tree7f692a60aea8fbb74b293ed60a2d16273abcb000 /drivers/char/drm/radeon_cp.c
parent9d5b3ffc42f7820e8ee07705496955e4c2c38dd9 (diff)
radeon: setup the ring buffer fetcher to be less agressive.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r--drivers/char/drm/radeon_cp.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index e16294c039e4..020323bd1626 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -1190,9 +1190,15 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev,
1190 /* Set ring buffer size */ 1190 /* Set ring buffer size */
1191#ifdef __BIG_ENDIAN 1191#ifdef __BIG_ENDIAN
1192 RADEON_WRITE(RADEON_CP_RB_CNTL, 1192 RADEON_WRITE(RADEON_CP_RB_CNTL,
1193 dev_priv->ring.size_l2qw | RADEON_BUF_SWAP_32BIT); 1193 RADEON_BUF_SWAP_32BIT |
1194 (dev_priv->ring.fetch_size_l2ow << 18) |
1195 (dev_priv->ring.rptr_update_l2qw << 8) |
1196 dev_priv->ring.size_l2qw);
1194#else 1197#else
1195 RADEON_WRITE(RADEON_CP_RB_CNTL, dev_priv->ring.size_l2qw); 1198 RADEON_WRITE(RADEON_CP_RB_CNTL,
1199 (dev_priv->ring.fetch_size_l2ow << 18) |
1200 (dev_priv->ring.rptr_update_l2qw << 8) |
1201 dev_priv->ring.size_l2qw);
1196#endif 1202#endif
1197 1203
1198 /* Start with assuming that writeback doesn't work */ 1204 /* Start with assuming that writeback doesn't work */
@@ -1663,6 +1669,11 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
1663 dev_priv->ring.size = init->ring_size; 1669 dev_priv->ring.size = init->ring_size;
1664 dev_priv->ring.size_l2qw = drm_order(init->ring_size / 8); 1670 dev_priv->ring.size_l2qw = drm_order(init->ring_size / 8);
1665 1671
1672 dev_priv->ring.rptr_update = /* init->rptr_update */ 4096;
1673 dev_priv->ring.rptr_update_l2qw = drm_order( /* init->rptr_update */ 4096 / 8);
1674
1675 dev_priv->ring.fetch_size = /* init->fetch_size */ 32;
1676 dev_priv->ring.fetch_size_l2ow = drm_order( /* init->fetch_size */ 32 / 16);
1666 dev_priv->ring.tail_mask = (dev_priv->ring.size / sizeof(u32)) - 1; 1677 dev_priv->ring.tail_mask = (dev_priv->ring.size / sizeof(u32)) - 1;
1667 1678
1668 dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK; 1679 dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK;