diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 52077d39b30a4967829cc4661db2b290e4b0ee3b..4f9302901a6210cf471a24387a561a7f467e456b 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -972,7 +972,9 @@ static bool dc_commit_context_no_check(struct dc *dc, struct validate_context *c dc_enable_stereo(dc, context, dc_streams, context->stream_count); - dc_resource_validate_ctx_copy_construct(context, core_dc->current_context); + dc_resource_validate_ctx_destruct(core_dc->current_context); + dm_free(core_dc->current_context); + core_dc->current_context = context; return (result == DC_OK); } @@ -1057,9 +1059,6 @@ bool dc_commit_streams( result = dc_commit_context_no_check(dc, context); - dc_resource_validate_ctx_destruct(context); - dm_free(context); - return (result == DC_OK); fail: