Commit e771aae0 authored by Corbin McElhanney's avatar Corbin McElhanney Committed by Alex Deucher

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: default avatarCorbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 77a4ea53
...@@ -1740,6 +1740,15 @@ void dc_update_planes_and_stream(struct dc *dc, ...@@ -1740,6 +1740,15 @@ void dc_update_planes_and_stream(struct dc *dc,
} }
if (core_dc->current_context != context) { 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; struct validate_context *old = core_dc->current_context;
core_dc->current_context = context; core_dc->current_context = context;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment