diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c index d9fbbe191071..a135498a1298 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | |||
@@ -163,11 +163,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, | |||
163 | goto out_no_copy; | 163 | goto out_no_copy; |
164 | } | 164 | } |
165 | 165 | ||
166 | ret = mutex_lock_interruptible(&dev->mode_config.mutex); | 166 | drm_modeset_lock_all(dev); |
167 | if (unlikely(ret != 0)) { | ||
168 | ret = -ERESTARTSYS; | ||
169 | goto out_no_mode_mutex; | ||
170 | } | ||
171 | 167 | ||
172 | obj = drm_mode_object_find(dev, arg->fb_id, DRM_MODE_OBJECT_FB); | 168 | obj = drm_mode_object_find(dev, arg->fb_id, DRM_MODE_OBJECT_FB); |
173 | if (!obj) { | 169 | if (!obj) { |
@@ -200,8 +196,7 @@ out_no_surface: | |||
200 | ttm_read_unlock(&vmaster->lock); | 196 | ttm_read_unlock(&vmaster->lock); |
201 | out_no_ttm_lock: | 197 | out_no_ttm_lock: |
202 | out_no_fb: | 198 | out_no_fb: |
203 | mutex_unlock(&dev->mode_config.mutex); | 199 | drm_modeset_unlock_all(dev); |
204 | out_no_mode_mutex: | ||
205 | out_no_copy: | 200 | out_no_copy: |
206 | kfree(clips); | 201 | kfree(clips); |
207 | out_clips: | 202 | out_clips: |
@@ -251,11 +246,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, | |||
251 | goto out_no_copy; | 246 | goto out_no_copy; |
252 | } | 247 | } |
253 | 248 | ||
254 | ret = mutex_lock_interruptible(&dev->mode_config.mutex); | 249 | drm_modeset_lock_all(dev); |
255 | if (unlikely(ret != 0)) { | ||
256 | ret = -ERESTARTSYS; | ||
257 | goto out_no_mode_mutex; | ||
258 | } | ||
259 | 250 | ||
260 | obj = drm_mode_object_find(dev, arg->fb_id, DRM_MODE_OBJECT_FB); | 251 | obj = drm_mode_object_find(dev, arg->fb_id, DRM_MODE_OBJECT_FB); |
261 | if (!obj) { | 252 | if (!obj) { |
@@ -282,8 +273,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, | |||
282 | ttm_read_unlock(&vmaster->lock); | 273 | ttm_read_unlock(&vmaster->lock); |
283 | out_no_ttm_lock: | 274 | out_no_ttm_lock: |
284 | out_no_fb: | 275 | out_no_fb: |
285 | mutex_unlock(&dev->mode_config.mutex); | 276 | drm_modeset_unlock_all(dev); |
286 | out_no_mode_mutex: | ||
287 | out_no_copy: | 277 | out_no_copy: |
288 | kfree(clips); | 278 | kfree(clips); |
289 | out_clips: | 279 | out_clips: |