summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cs.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-08-27 22:45:18 +0200
committerAlex Deucher <alexander.deucher@amd.com>2014-08-27 23:41:56 +0200
commit9bb39ff43e15e85bc1bd9bbbdc5b9cef7a670fd5 (patch)
tree371366b3bd997316c7e6a5508e0cf0b8f96bcb5d /drivers/gpu/drm/radeon/radeon_cs.c
parentdrm/radeon: force fence completion only on problematic rings (v2) (diff)
downloadlinux-9bb39ff43e15e85bc1bd9bbbdc5b9cef7a670fd5.tar.xz
linux-9bb39ff43e15e85bc1bd9bbbdc5b9cef7a670fd5.zip
drm/radeon: take exclusive_lock in read mode during ring tests, v5
This is needed for the next commit, because the lockup detection will need the read lock to run. v4 (chk): split out forced fence completion, remove unrelated changes, add and handle in_reset flag v5 (agd5f): rebase fix Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cs.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index db739bd64f16..bd328cb6fa61 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -653,6 +653,13 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
up_read(&rdev->exclusive_lock);
return -EBUSY;
}
+ if (rdev->in_reset) {
+ up_read(&rdev->exclusive_lock);
+ r = radeon_gpu_reset(rdev);
+ if (!r)
+ r = -EAGAIN;
+ return r;
+ }
/* initialize parser */
memset(&parser, 0, sizeof(struct radeon_cs_parser));
parser.filp = filp;