drm/nouveau/kms: take mode_config mutex in connector hotplug path
authorBen Skeggs <bskeggs@redhat.com>
Thu, 7 Jan 2016 22:56:51 +0000 (08:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 11 Jan 2016 01:29:36 +0000 (11:29 +1000)
fdo#93634

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/nouveau/nouveau_connector.c

index 84e63b55037e367962fc01e19a983406382535dc..fcebfae5d42680802b3dea19d63915cb92a157be 100644 (file)
@@ -983,10 +983,13 @@ nouveau_connector_hotplug(struct nvif_notify *notify)
 
                NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", name);
 
+               mutex_lock(&drm->dev->mode_config.mutex);
                if (plugged)
                        drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
                else
                        drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
+               mutex_unlock(&drm->dev->mode_config.mutex);
+
                drm_helper_hpd_irq_event(connector->dev);
        }