Skip to content

Commit

Permalink
drm/radeon: Take all modeset locks for DP MST hotplug
Browse files Browse the repository at this point in the history
[ Upstream commit 2ee6bcd ]

Similar with the i915 take all modeset locks for mst hotplug. This is
needed to make sure radeon holds both mode_config.mutex and
mode_config.connection_mutex when updating the connector_list, which
is the new (interim) locking regime we want for that.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
  • Loading branch information
Daniel Vetter authored and Sasha Levin committed Feb 15, 2016
1 parent 06f4d7c commit fde3cda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/radeon/radeon_dp_mst.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topol
drm_mode_connector_set_path_property(connector, pathprop);
drm_reinit_primary_mode_group(dev);

mutex_lock(&dev->mode_config.mutex);
drm_modeset_lock_all(dev);
radeon_fb_add_connector(rdev, connector);
mutex_unlock(&dev->mode_config.mutex);
drm_modeset_unlock_all(dev);

drm_connector_register(connector);
return connector;
Expand All @@ -304,12 +304,12 @@ static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,

drm_connector_unregister(connector);
/* need to nuke the connector */
mutex_lock(&dev->mode_config.mutex);
drm_modeset_lock_all(dev);
/* dpms off */
radeon_fb_remove_connector(rdev, connector);

drm_connector_cleanup(connector);
mutex_unlock(&dev->mode_config.mutex);
drm_modeset_unlock_all(dev);
drm_reinit_primary_mode_group(dev);


Expand Down

0 comments on commit fde3cda

Please sign in to comment.