drm/radeon: add an exclusive lock for GPU reset v2
authorJerome Glisse <jglisse@redhat.com>
Mon, 2 Jul 2012 16:45:19 +0000 (12:45 -0400)
committerChristian König <deathsimple@vodafone.de>
Tue, 17 Jul 2012 08:32:02 +0000 (10:32 +0200)
commitdee53e7fb3ee01b83c75a8e8df8c444049d38058
treef9f0a669b4949f9d215759bcbd8f79a08ca1bdfa
parent93bf888c5c730605e3470f5d2381f296eda88d79
drm/radeon: add an exclusive lock for GPU reset v2

GPU reset need to be exclusive, one happening at a time. For this
add a rw semaphore so that any path that trigger GPU activities
have to take the semaphore as a reader thus allowing concurency.

The GPU reset path take the semaphore as a writer ensuring that
no concurrent reset take place.

v2: init rw semaphore

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_cs.c
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/radeon_gem.c