diff options
author | Jerome Glisse <jglisse@redhat.com> | 2012-01-23 11:52:15 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-01-25 09:42:06 +0000 |
commit | 9fc04b503df9a34ec1a691225445c5b7dfd022e7 (patch) | |
tree | b8e95f24e697b0876cf4e28ead5c1b314af178bc /drivers/gpu/drm/radeon/radeon_device.c | |
parent | d54fbd49efe5c75bc7cf963bf065aef3fd22417a (diff) | |
download | linux-9fc04b503df9a34ec1a691225445c5b7dfd022e7.tar.bz2 |
drm/radeon: avoid deadlock if GPU lockup is detected in ib_pool_get
If GPU lockup is detected in ib_pool get we are holding the ib_pool
mutex that will be needed by the GPU reset code. As ib_pool code is
safe to be reentrant from GPU reset code we should not block if we
are trying to get the ib pool lock on the behalf of the same userspace
caller, thus use the radeon_mutex_lock helper.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index a811bc64ad5c..cec51a5b69dd 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -720,7 +720,7 @@ int radeon_device_init(struct radeon_device *rdev, /* mutex initialization are all done here so we * can recall function without having locking issues */ radeon_mutex_init(&rdev->cs_mutex); - mutex_init(&rdev->ib_pool.mutex); + radeon_mutex_init(&rdev->ib_pool.mutex); for (i = 0; i < RADEON_NUM_RINGS; ++i) mutex_init(&rdev->ring[i].mutex); mutex_init(&rdev->dc_hw_i2c_mutex); |