aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch
new file mode 100644
index 00000000..87067de0
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0872-drm-amd-display-Fix-NULL-ptr-deref-for-commit_planes.patch
@@ -0,0 +1,42 @@
+From 1743bee1dfc1729593e138f8295415e13db70ddc Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Fri, 30 Nov 2018 09:56:02 -0500
+Subject: [PATCH 0872/2940] drm/amd/display: Fix NULL ptr deref for
+ commit_planes_to_stream
+
+[Why]
+With scaling, underscan and abm changes we can end up calling
+commit_planes_to_stream in commit_tail. This call uses dm_state->context
+which can be NULL if the commit was a fast update.
+
+[How]
+Use dc_state instead since that can't be NULL unless the system ran
+out of memory.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108912
+Fixes: e64abff2f133 ("drm/amd/display: Use private obj helpers for dm_atomic_state")
+
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Leo Li <sunpeng.li@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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 650d3906f8b0..653bd5ad8e32 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -5042,7 +5042,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
+ status->plane_count,
+ dm_new_crtc_state,
+ to_dm_crtc_state(old_crtc_state),
+- dm_state->context))
++ dc_state))
+ dm_error("%s: Failed to update stream scaling!\n", __func__);
+ }
+
+--
+2.17.1
+