diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0564-drm-amdgpu-Sprinkle-drm_modeset_lock_all-to-appease-.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0564-drm-amdgpu-Sprinkle-drm_modeset_lock_all-to-appease-.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0564-drm-amdgpu-Sprinkle-drm_modeset_lock_all-to-appease-.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0564-drm-amdgpu-Sprinkle-drm_modeset_lock_all-to-appease-.patch new file mode 100644 index 00000000..79fb6e2b --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0564-drm-amdgpu-Sprinkle-drm_modeset_lock_all-to-appease-.patch @@ -0,0 +1,62 @@ +From 4c7fbc39b1d58d9f4113ef962743a67bcdfe6be2 Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Wed, 23 Sep 2015 14:32:06 -0400 +Subject: [PATCH 0564/1050] drm/amdgpu: Sprinkle drm_modeset_lock_all to + appease locking checks + +In + +commit 7a3f3d6667f5f9ffd1517f6b21d64bbf5312042c +Author: Daniel Vetter <daniel.vetter@ffwll.ch> +Date: Thu Jul 9 23:44:28 2015 +0200 + + drm: Check locking in drm_for_each_connector + +I added locking checks to drm_for_each_connector but failed that +through drm_helper_connector_dpms -> drm_helper_choose_encoder_dpms +it's used in a few more places in the amdgpu resume/suspend code. + +Fix them up. + +Note that we could use the connector iterator macros in there too, but +that's for the future. + +Port of radeon commit: +drm/radeon: Sprinkle drm_modeset_lock_all to appease locking checks + +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index 2d569ec..6068d82 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -1651,9 +1651,11 @@ int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) + drm_kms_helper_poll_disable(dev); + + /* turn off display hw */ ++ drm_modeset_lock_all(dev); + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { + drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); + } ++ drm_modeset_unlock_all(dev); + + /* unpin the front buffers */ + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { +@@ -1748,9 +1750,11 @@ int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon) + if (fbcon) { + drm_helper_resume_force_mode(dev); + /* turn on display hw */ ++ drm_modeset_lock_all(dev); + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { + drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); + } ++ drm_modeset_unlock_all(dev); + } + + drm_kms_helper_poll_enable(dev); +-- +1.9.1 + |