aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch
new file mode 100644
index 00000000..b1f4184d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2833-drm-amdkcl-4.15-Keep-drm_atomic_state-put-free-on-re.patch
@@ -0,0 +1,37 @@
+From b1c0edb4930f3602aee769fd87f2a064c0069d24 Mon Sep 17 00:00:00 2001
+From: "Le.Ma" <Le.Ma@amd.com>
+Date: Fri, 8 Dec 2017 10:55:19 +0800
+Subject: [PATCH 2833/4131] drm/amdkcl: [4.15] Keep drm_atomic_state put/free
+ on resume
+
+This fixes patch "drm/amd/display: Do not put drm_atomic_state on resume"
+
+Change-Id: I2f58ff653e4ee851331877cd3e40af16409fea8c
+Signed-off-by: Le.Ma <Le.Ma@amd.com>
+Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index 69bfdbd..3a514a2 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -743,6 +743,14 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
+
+ ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state);
+
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) && !defined(OS_NAME_RHEL_7_4)
++ drm_atomic_state_free(adev->dm.cached_state);
++#else
++ drm_atomic_state_put(adev->dm.cached_state);
++#endif
++#endif
+ adev->dm.cached_state = NULL;
+
+ amdgpu_dm_irq_resume_late(adev);
+--
+2.7.4
+