diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-05-15 11:52:18 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-03 21:03:39 -0400 |
commit | 9e14c65c5715b16bcbf5d5c64de2bb8a973a0afa (patch) | |
tree | 3afd4d4347080e1437f788416762c7b47fee7d3a | |
parent | d94aed5a6c947b1fda346aff1fa316dacf4a1a5a (diff) |
drm/amdgpu: take the mode_config mutex when handling hpds
Since we may modify display state.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index 2187960baf7c..b4d36f0f2153 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |||
@@ -59,10 +59,12 @@ static void amdgpu_hotplug_work_func(struct work_struct *work) | |||
59 | struct drm_mode_config *mode_config = &dev->mode_config; | 59 | struct drm_mode_config *mode_config = &dev->mode_config; |
60 | struct drm_connector *connector; | 60 | struct drm_connector *connector; |
61 | 61 | ||
62 | mutex_lock(&mode_config->mutex); | ||
62 | if (mode_config->num_connector) { | 63 | if (mode_config->num_connector) { |
63 | list_for_each_entry(connector, &mode_config->connector_list, head) | 64 | list_for_each_entry(connector, &mode_config->connector_list, head) |
64 | amdgpu_connector_hotplug(connector); | 65 | amdgpu_connector_hotplug(connector); |
65 | } | 66 | } |
67 | mutex_unlock(&mode_config->mutex); | ||
66 | /* Just fire off a uevent and let userspace tell us what to do */ | 68 | /* Just fire off a uevent and let userspace tell us what to do */ |
67 | drm_helper_hpd_irq_event(dev); | 69 | drm_helper_hpd_irq_event(dev); |
68 | } | 70 | } |