drm/radeon: record what is next valid wptr for each ring v4
authorChristian König <deathsimple@vodafone.de>
Fri, 6 Jul 2012 14:22:55 +0000 (16:22 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 17 Jul 2012 08:33:09 +0000 (10:33 +0200)
commit45df68035c4964d42ea3850980708ce8674f75b3
treeb0d75e0068924399a798d4aa5bcc61b2cbc7e2a0
parent04eb2206d8022dc4a1eadb5e9cc5122c84959881
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>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/ni.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/radeon/si.c