summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorbin McElhanney <corbin.mcelhanney@amd.com>2017-08-09 10:30:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:16:38 -0400
commite771aae02baa59386972faec491cd221c169ed53 (patch)
treedec661204f01683b3209097e730ace9575dc1c11
parent77a4ea53fd89ccf823e77cc31cea808a3589f732 (diff)
downloadlinux-stable-e771aae02baa59386972faec491cd221c169ed53.tar.gz
linux-stable-e771aae02baa59386972faec491cd221c169ed53.tar.bz2
linux-stable-e771aae02baa59386972faec491cd221c169ed53.zip
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> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 477024c467e6..33c3d88b1c86 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;