From 847b143537780d2d997cc006cb4c63eaea56bb87 Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Tue, 6 Mar 2007 22:45:22 +0000 Subject: [PATCH] Corrected the writes to R300_RB3D_DSTCACHE_CTLSTAT for before/after 3D according to Vladimir's comment. --- shared-core/r300_cmdbuf.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/shared-core/r300_cmdbuf.c b/shared-core/r300_cmdbuf.c index 0c04b5f..2390c3f 100644 --- a/shared-core/r300_cmdbuf.c +++ b/shared-core/r300_cmdbuf.c @@ -686,13 +686,17 @@ static __inline__ int r300_emit_packet3(drm_radeon_private_t *dev_priv, /** * Emit the sequence to pacify R300. */ -static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv) +static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv, int do3d) { RING_LOCALS; BEGIN_RING(6); + /* Set to 0A before 3D operations, set to 02 afterwards. */ OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); - OUT_RING(0xa); + if (do3d) + OUT_RING(R300_RB3D_DSTCACHE_0A); + else + OUT_RING(R300_RB3D_DSTCACHE_02); OUT_RING(CP_PACKET0(0x4f18, 0)); OUT_RING(0x3); OUT_RING(CP_PACKET3(RADEON_CP_NOP, 0)); @@ -792,7 +796,7 @@ int r300_do_cp_cmdbuf(drm_device_t *dev, /* See the comment above r300_emit_begin3d for why this call must be here, * and what the cleanup gotos are for. */ - r300_pacify(dev_priv); + r300_pacify(dev_priv, 1); if (cmdbuf->nbox <= R300_SIMULTANEOUS_CLIPRECTS) { ret = r300_emit_cliprects(dev_priv, cmdbuf, 0); @@ -854,7 +858,7 @@ int r300_do_cp_cmdbuf(drm_device_t *dev, Note that issuing this command does not hurt anything except, possibly, performance */ - r300_pacify(dev_priv); + r300_pacify(dev_priv, 0); break; case R300_CMD_CP_DELAY: @@ -930,7 +934,7 @@ int r300_do_cp_cmdbuf(drm_device_t *dev, DRM_DEBUG("END\n"); cleanup: - r300_pacify(dev_priv); + r300_pacify(dev_priv, 0); /* We emit the vertex buffer age here, outside the pacifier "brackets" * for two reasons: -- 1.5.0.2