diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-05-15 11:52:18 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-05-26 15:51:50 -0400 |
commit | acdd8b69906d40b4a0636e0e5ead289026af3222 (patch) | |
tree | 225123bfaf1dba93ad72f310007add51697aa610 | |
parent | 10c41853fe1de211ca8ae7abaff1111197b20425 (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) struct drm_mode_config *mode_config = &dev->mode_config; struct drm_connector *connector; + mutex_lock(&mode_config->mutex); if (mode_config->num_connector) { list_for_each_entry(connector, &mode_config->connector_list, head) amdgpu_connector_hotplug(connector); } + mutex_unlock(&mode_config->mutex); /* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event(dev); } |