aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index ba978bf93a2e..67a2501d519d 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -1045,13 +1045,13 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
1045 } 1045 }
1046 1046
1047 if (!(put_image_rec->flags & I915_OVERLAY_ENABLE)) { 1047 if (!(put_image_rec->flags & I915_OVERLAY_ENABLE)) {
1048 mutex_lock(&dev->mode_config.mutex); 1048 drm_modeset_lock_all(dev);
1049 mutex_lock(&dev->struct_mutex); 1049 mutex_lock(&dev->struct_mutex);
1050 1050
1051 ret = intel_overlay_switch_off(overlay); 1051 ret = intel_overlay_switch_off(overlay);
1052 1052
1053 mutex_unlock(&dev->struct_mutex); 1053 mutex_unlock(&dev->struct_mutex);
1054 mutex_unlock(&dev->mode_config.mutex); 1054 drm_modeset_unlock_all(dev);
1055 1055
1056 return ret; 1056 return ret;
1057 } 1057 }
@@ -1075,7 +1075,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
1075 goto out_free; 1075 goto out_free;
1076 } 1076 }
1077 1077
1078 mutex_lock(&dev->mode_config.mutex); 1078 drm_modeset_lock_all(dev);
1079 mutex_lock(&dev->struct_mutex); 1079 mutex_lock(&dev->struct_mutex);
1080 1080
1081 if (new_bo->tiling_mode) { 1081 if (new_bo->tiling_mode) {
@@ -1157,7 +1157,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
1157 goto out_unlock; 1157 goto out_unlock;
1158 1158
1159 mutex_unlock(&dev->struct_mutex); 1159 mutex_unlock(&dev->struct_mutex);
1160 mutex_unlock(&dev->mode_config.mutex); 1160 drm_modeset_unlock_all(dev);
1161 1161
1162 kfree(params); 1162 kfree(params);
1163 1163
@@ -1165,7 +1165,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
1165 1165
1166out_unlock: 1166out_unlock:
1167 mutex_unlock(&dev->struct_mutex); 1167 mutex_unlock(&dev->struct_mutex);
1168 mutex_unlock(&dev->mode_config.mutex); 1168 drm_modeset_unlock_all(dev);
1169 drm_gem_object_unreference_unlocked(&new_bo->base); 1169 drm_gem_object_unreference_unlocked(&new_bo->base);
1170out_free: 1170out_free:
1171 kfree(params); 1171 kfree(params);
@@ -1241,7 +1241,7 @@ int intel_overlay_attrs(struct drm_device *dev, void *data,
1241 return -ENODEV; 1241 return -ENODEV;
1242 } 1242 }
1243 1243
1244 mutex_lock(&dev->mode_config.mutex); 1244 drm_modeset_lock_all(dev);
1245 mutex_lock(&dev->struct_mutex); 1245 mutex_lock(&dev->struct_mutex);
1246 1246
1247 ret = -EINVAL; 1247 ret = -EINVAL;
@@ -1307,7 +1307,7 @@ int intel_overlay_attrs(struct drm_device *dev, void *data,
1307 ret = 0; 1307 ret = 0;
1308out_unlock: 1308out_unlock:
1309 mutex_unlock(&dev->struct_mutex); 1309 mutex_unlock(&dev->struct_mutex);
1310 mutex_unlock(&dev->mode_config.mutex); 1310 drm_modeset_unlock_all(dev);
1311 1311
1312 return ret; 1312 return ret;
1313} 1313}