aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch
new file mode 100644
index 00000000..434d4f30
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0549-drm-amd-display-Fix-misuse-of-plane-state-destroy-he.patch
@@ -0,0 +1,36 @@
+From d59033991acc3299af04ea4d77120aed43e6b7b4 Mon Sep 17 00:00:00 2001
+From: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
+Date: Tue, 4 Jul 2017 14:21:58 +0800
+Subject: [PATCH 0549/4131] drm/amd/display: Fix misuse of plane state destroy
+ helper
+
+drm_plane_state is subclassed by dm_plane_state, so atomic driver should
+use __drm_atomic_helper_plane_destroy_state() to destroy a state.
+drm_atomic_helper_plane_destroy_state() frees drm_plane_state which is
+allocated inside dm_plane_state, this is problematic.
+
+Fixes: 95ae03a ("drm/amd/display: Create dm_plane_state.")
+Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
+Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+index 5a87f1b..f5079ae 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+@@ -1574,7 +1574,8 @@ void dm_drm_plane_destroy_state(struct drm_plane *plane,
+ dc_surface_release(dc_surface);
+ }
+
+- drm_atomic_helper_plane_destroy_state(plane, state);
++ __drm_atomic_helper_plane_destroy_state(state);
++ kfree(dm_plane_state);
+ }
+
+ static const struct drm_plane_funcs dm_plane_funcs = {
+--
+2.7.4
+