aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-07-06 10:22:55 -0400
committerChristian König <deathsimple@vodafone.de>2012-07-17 04:33:09 -0400
commit45df68035c4964d42ea3850980708ce8674f75b3 (patch)
treeb0d75e0068924399a798d4aa5bcc61b2cbc7e2a0 /drivers/gpu/drm/radeon/evergreen.c
parent04eb2206d8022dc4a1eadb5e9cc5122c84959881 (diff)
drm/radeon: record what is next valid wptr for each ring v4
Before emitting any indirect buffer, emit the offset of the next valid ring content if any. This allow code that want to resume ring to resume ring right after ib that caused GPU lockup. v2: use scratch registers instead of storing it into memory v3: skip over the surface sync for ni and si as well v4: use SET_CONFIG_REG instead of PACKET0 Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index f39b900d46f9..4b8e5c5fcf84 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1368,7 +1368,15 @@ void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
1368 /* set to DX10/11 mode */ 1368 /* set to DX10/11 mode */
1369 radeon_ring_write(ring, PACKET3(PACKET3_MODE_CONTROL, 0)); 1369 radeon_ring_write(ring, PACKET3(PACKET3_MODE_CONTROL, 0));
1370 radeon_ring_write(ring, 1); 1370 radeon_ring_write(ring, 1);
1371 /* FIXME: implement */ 1371
1372 if (ring->rptr_save_reg) {
1373 uint32_t next_rptr = ring->wptr + 3 + 4;
1374 radeon_ring_write(ring, PACKET3(PACKET3_SET_CONFIG_REG, 1));
1375 radeon_ring_write(ring, ((ring->rptr_save_reg -
1376 PACKET3_SET_CONFIG_REG_START) >> 2));
1377 radeon_ring_write(ring, next_rptr);
1378 }
1379
1372 radeon_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2)); 1380 radeon_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
1373 radeon_ring_write(ring, 1381 radeon_ring_write(ring,
1374#ifdef __BIG_ENDIAN 1382#ifdef __BIG_ENDIAN