diff options
author | Christian Koenig <christian.koenig@amd.com> | 2012-05-16 23:45:24 +0400 |
---|---|---|
committer | Christian König <deathsimple@vodafone.de> | 2012-06-21 11:38:48 +0400 |
commit | c20dc3698dc7ecf053e2bf77299ae5982c0c2c45 (patch) | |
tree | e150268483bee4137d9c22e3121171b23a53be76 /drivers/gpu/drm/radeon/radeon.h | |
parent | 6823d74003abedd688a3f535aefe6ce0e06444fd (diff) | |
download | linux-c20dc3698dc7ecf053e2bf77299ae5982c0c2c45.tar.xz |
drm/radeon: fix & improve ih ring handling v3
The spinlock was actually there to protect the
rptr, but rptr was read outside of the locked area.
Also we don't really need a spinlock here, an
atomic should to quite fine since we only need to
prevent it from being reentrant.
v2: Keep the spinlock....
v3: Back to an atomic again after finding & fixing the real bug.
Signed-off-by: Christian Koenig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 9d6c1de93591..5ddf895a5926 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -738,11 +738,10 @@ struct r600_ih { struct radeon_bo *ring_obj; volatile uint32_t *ring; unsigned rptr; - unsigned wptr; unsigned ring_size; uint64_t gpu_addr; uint32_t ptr_mask; - spinlock_t lock; + atomic_t lock; bool enabled; }; |