aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch
new file mode 100644
index 00000000..a9a128d7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0964-drm-amd-display-Add-comment-explaining-context-free.patch
@@ -0,0 +1,41 @@
+From df22095d4458a7e2c450446928c2c2becfb40339 Mon Sep 17 00:00:00 2001
+From: Corbin McElhanney <corbin.mcelhanney@amd.com>
+Date: Wed, 9 Aug 2017 10:30:28 -0400
+Subject: [PATCH 0964/4131] drm/amd/display: Add comment explaining context
+ free
+
+This comment explains a previous change that adds some complexity
+to the context free in dc:
+
+commit 9ad58779a895 ("drm/amd/display: Fix accessing freed memory")
+
+Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index 6b29ea5..04547fb 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -1740,6 +1740,15 @@ void dc_update_planes_and_stream(struct dc *dc,
+ }
+
+ if (core_dc->current_context != context) {
++
++ /* Since memory free requires elevated IRQL, an interrupt
++ * request is generated by mem free. If this happens
++ * between freeing and reassigning the context, our vsync
++ * interrupt will call into dc and cause a memory
++ * corruption BSOD. Hence, we first reassign the context,
++ * then free the old context.
++ */
++
+ struct validate_context *old = core_dc->current_context;
+
+ core_dc->current_context = context;
+--
+2.7.4
+