aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2016-05-03 05:24:35 -0400
committerThomas Hellstrom <thellstrom@vmware.com>2016-05-20 11:05:55 -0400
commit93cd16817ae5ddcfc548784b51c76bf6d7923442 (patch)
tree4d953a68d06e5165a34da3ae8a0965ddc1c62718 /drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
parent7c10ddf87472c07eabc206e273dc59f77c700858 (diff)
drm/vmwgfx: Kill some lockdep warnings
Some global KMS state that is elsewhere protected by the mode_config mutex here needs to be protected with a local mutex. Remove corresponding lockdep checks and introduce a new driver-private global_kms_state_mutex, and make sure its locking order is *after* the crtc locks in order to avoid having to release those when the new mutex is taken. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Cc: <stable@vger.kernel.org> # 4.6
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 0ea22fd112c9..b74eae2b8594 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -285,14 +285,17 @@ static int vmw_sou_crtc_set_config(struct drm_mode_set *set)
285 } 285 }
286 286
287 /* Only one active implicit frame-buffer at a time. */ 287 /* Only one active implicit frame-buffer at a time. */
288 mutex_lock(&dev_priv->global_kms_state_mutex);
288 if (sou->base.is_implicit && 289 if (sou->base.is_implicit &&
289 dev_priv->implicit_fb && vfb && 290 dev_priv->implicit_fb && vfb &&
290 !(dev_priv->num_implicit == 1 && 291 !(dev_priv->num_implicit == 1 &&
291 sou->base.active_implicit) && 292 sou->base.active_implicit) &&
292 dev_priv->implicit_fb != vfb) { 293 dev_priv->implicit_fb != vfb) {
294 mutex_unlock(&dev_priv->global_kms_state_mutex);
293 DRM_ERROR("Multiple implicit framebuffers not supported.\n"); 295 DRM_ERROR("Multiple implicit framebuffers not supported.\n");
294 return -EINVAL; 296 return -EINVAL;
295 } 297 }
298 mutex_unlock(&dev_priv->global_kms_state_mutex);
296 299
297 /* since they always map one to one these are safe */ 300 /* since they always map one to one these are safe */
298 connector = &sou->base.connector; 301 connector = &sou->base.connector;