From 28491a6728bfa73af876dffbf04339d3c3739146 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Wed, 9 May 2018 16:24:09 -0400 Subject: [PATCH] Fix mutex deadlock in nouveau driver. In af2405af07d168e29, drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector() were incompatibly changed to add locking of a mutex that previously the caller was expected to lock. The i915 and radeon drivers were updated to no longer lock the mutex, but nouveau was not updated. https://bugs.freedesktop.org/show_bug.cgi?id=106456 --- drivers/gpu/drm/nouveau/nv50_display.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index fb47d46050ec..25b1aee735ab 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -3215,12 +3215,8 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr, struct nv50_mstc *mstc = nv50_mstc(connector); drm_connector_unregister(&mstc->connector); - - drm_modeset_lock_all(drm->dev); drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector); mstc->port = NULL; - drm_modeset_unlock_all(drm->dev); - drm_connector_unreference(&mstc->connector); } @@ -3229,10 +3225,7 @@ nv50_mstm_register_connector(struct drm_connector *connector) { struct nouveau_drm *drm = nouveau_drm(connector->dev); - drm_modeset_lock_all(drm->dev); drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector); - drm_modeset_unlock_all(drm->dev); - drm_connector_register(connector); } -- 2.17.0