Commit 68339af3 authored by Leon Elazar's avatar Leon Elazar Committed by Alex Deucher
Browse files

drm/amd/display: Memory leak fix during disable



1.current_context memory wasn't released at
dc_post_update_surfaces_to_stream during context swap.

Signed-off-by: default avatarLeon Elazar <leon.elazar@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e8c963d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1046,6 +1046,9 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
	core_dc->hwss.set_bandwidth(core_dc, context, true);

	resource_validate_ctx_destruct(core_dc->current_context);
	if (core_dc->current_context)
		dm_free(core_dc->current_context);

	core_dc->current_context = context;

	return true;