diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c index 47b70949bf3a..37881ecf5d7a 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | |||
@@ -226,7 +226,6 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, | |||
226 | struct drm_vmw_present_arg *arg = | 226 | struct drm_vmw_present_arg *arg = |
227 | (struct drm_vmw_present_arg *)data; | 227 | (struct drm_vmw_present_arg *)data; |
228 | struct vmw_surface *surface; | 228 | struct vmw_surface *surface; |
229 | struct vmw_master *vmaster = vmw_master(file_priv->master); | ||
230 | struct drm_vmw_rect __user *clips_ptr; | 229 | struct drm_vmw_rect __user *clips_ptr; |
231 | struct drm_vmw_rect *clips = NULL; | 230 | struct drm_vmw_rect *clips = NULL; |
232 | struct drm_framebuffer *fb; | 231 | struct drm_framebuffer *fb; |
@@ -271,7 +270,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, | |||
271 | } | 270 | } |
272 | vfb = vmw_framebuffer_to_vfb(fb); | 271 | vfb = vmw_framebuffer_to_vfb(fb); |
273 | 272 | ||
274 | ret = ttm_read_lock(&vmaster->lock, true); | 273 | ret = ttm_read_lock(&dev_priv->reservation_sem, true); |
275 | if (unlikely(ret != 0)) | 274 | if (unlikely(ret != 0)) |
276 | goto out_no_ttm_lock; | 275 | goto out_no_ttm_lock; |
277 | 276 | ||
@@ -291,7 +290,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, | |||
291 | vmw_surface_unreference(&surface); | 290 | vmw_surface_unreference(&surface); |
292 | 291 | ||
293 | out_no_surface: | 292 | out_no_surface: |
294 | ttm_read_unlock(&vmaster->lock); | 293 | ttm_read_unlock(&dev_priv->reservation_sem); |
295 | out_no_ttm_lock: | 294 | out_no_ttm_lock: |
296 | drm_framebuffer_unreference(fb); | 295 | drm_framebuffer_unreference(fb); |
297 | out_no_fb: | 296 | out_no_fb: |
@@ -311,7 +310,6 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, | |||
311 | struct drm_vmw_fence_rep __user *user_fence_rep = | 310 | struct drm_vmw_fence_rep __user *user_fence_rep = |
312 | (struct drm_vmw_fence_rep __user *) | 311 | (struct drm_vmw_fence_rep __user *) |
313 | (unsigned long)arg->fence_rep; | 312 | (unsigned long)arg->fence_rep; |
314 | struct vmw_master *vmaster = vmw_master(file_priv->master); | ||
315 | struct drm_vmw_rect __user *clips_ptr; | 313 | struct drm_vmw_rect __user *clips_ptr; |
316 | struct drm_vmw_rect *clips = NULL; | 314 | struct drm_vmw_rect *clips = NULL; |
317 | struct drm_framebuffer *fb; | 315 | struct drm_framebuffer *fb; |
@@ -361,7 +359,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, | |||
361 | goto out_no_ttm_lock; | 359 | goto out_no_ttm_lock; |
362 | } | 360 | } |
363 | 361 | ||
364 | ret = ttm_read_lock(&vmaster->lock, true); | 362 | ret = ttm_read_lock(&dev_priv->reservation_sem, true); |
365 | if (unlikely(ret != 0)) | 363 | if (unlikely(ret != 0)) |
366 | goto out_no_ttm_lock; | 364 | goto out_no_ttm_lock; |
367 | 365 | ||
@@ -369,7 +367,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, | |||
369 | vfb, user_fence_rep, | 367 | vfb, user_fence_rep, |
370 | clips, num_clips); | 368 | clips, num_clips); |
371 | 369 | ||
372 | ttm_read_unlock(&vmaster->lock); | 370 | ttm_read_unlock(&dev_priv->reservation_sem); |
373 | out_no_ttm_lock: | 371 | out_no_ttm_lock: |
374 | drm_framebuffer_unreference(fb); | 372 | drm_framebuffer_unreference(fb); |
375 | out_no_fb: | 373 | out_no_fb: |