aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch')
-rw-r--r--common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch b/common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch
new file mode 100644
index 00000000..f4bbe496
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0209-drm-amdgpu-take-the-mode_config-mutex-when-handling-.patch
@@ -0,0 +1,37 @@
+From 9e14c65c5715b16bcbf5d5c64de2bb8a973a0afa Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 15 May 2015 11:52:18 -0400
+Subject: [PATCH 0209/1050] drm/amdgpu: take the mode_config mutex when
+ handling hpds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since we may modify display state.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+index 2187960..b4d36f0 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);
+ }
+--
+1.9.1
+