aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-09-01 09:13:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-10-21 11:35:12 -0400
commit0c418f10104d4aa1d6b83698790898dc9ef1c12d (patch)
tree0fe6d3a53c2a9c8d66636124c29b0085b1c00be1 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentb7e4dad3e1fc5d3909737fb72e57aedeb0072c7f (diff)
drm/amdgpu: remove the exclusive lock
Finally getting rid of it. Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 7297ca3a0ba7..d81ab785368a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -181,7 +181,6 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
181 bool kernel = false; 181 bool kernel = false;
182 int r; 182 int r;
183 183
184 down_read(&adev->exclusive_lock);
185 /* create a gem object to contain this object in */ 184 /* create a gem object to contain this object in */
186 if (args->in.domains & (AMDGPU_GEM_DOMAIN_GDS | 185 if (args->in.domains & (AMDGPU_GEM_DOMAIN_GDS |
187 AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA)) { 186 AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA)) {
@@ -214,11 +213,9 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
214 213
215 memset(args, 0, sizeof(*args)); 214 memset(args, 0, sizeof(*args));
216 args->out.handle = handle; 215 args->out.handle = handle;
217 up_read(&adev->exclusive_lock);
218 return 0; 216 return 0;
219 217
220error_unlock: 218error_unlock:
221 up_read(&adev->exclusive_lock);
222 r = amdgpu_gem_handle_lockup(adev, r); 219 r = amdgpu_gem_handle_lockup(adev, r);
223 return r; 220 return r;
224} 221}
@@ -250,8 +247,6 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
250 return -EACCES; 247 return -EACCES;
251 } 248 }
252 249
253 down_read(&adev->exclusive_lock);
254
255 /* create a gem object to contain this object in */ 250 /* create a gem object to contain this object in */
256 r = amdgpu_gem_object_create(adev, args->size, 0, 251 r = amdgpu_gem_object_create(adev, args->size, 0,
257 AMDGPU_GEM_DOMAIN_CPU, 0, 252 AMDGPU_GEM_DOMAIN_CPU, 0,
@@ -293,14 +288,12 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
293 goto handle_lockup; 288 goto handle_lockup;
294 289
295 args->handle = handle; 290 args->handle = handle;
296 up_read(&adev->exclusive_lock);
297 return 0; 291 return 0;
298 292
299release_object: 293release_object:
300 drm_gem_object_unreference_unlocked(gobj); 294 drm_gem_object_unreference_unlocked(gobj);
301 295
302handle_lockup: 296handle_lockup:
303 up_read(&adev->exclusive_lock);
304 r = amdgpu_gem_handle_lockup(adev, r); 297 r = amdgpu_gem_handle_lockup(adev, r);
305 298
306 return r; 299 return r;