Commit 927f6eff authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Copy ctx to current_context instead of assign

Signed-off-by: default avatarHarry Wentland <harry.wentland@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 129eed72
...@@ -906,13 +906,13 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) ...@@ -906,13 +906,13 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
resource_validate_ctx_copy_construct(core_dc->current_context, context); resource_validate_ctx_copy_construct(core_dc->current_context, context);
post_surface_trace(dc); post_surface_trace(dc);
for (i = 0; i < context->res_ctx.pool->pipe_count; i++) for (i = 0; i < context->res_ctx.pool->pipe_count; i++)
if (context->res_ctx.pipe_ctx[i].stream == NULL) { if (context->res_ctx.pipe_ctx[i].stream == NULL) {
context->res_ctx.pipe_ctx[i].pipe_idx = i; context->res_ctx.pipe_ctx[i].pipe_idx = i;
core_dc->hwss.power_down_front_end( core_dc->hwss.power_down_front_end(
core_dc, &context->res_ctx.pipe_ctx[i]); core_dc, &context->res_ctx.pipe_ctx[i]);
} }
if (!core_dc->res_pool->funcs->validate_bandwidth(core_dc, context)) { if (!core_dc->res_pool->funcs->validate_bandwidth(core_dc, context)) {
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return false; return false;
...@@ -920,11 +920,10 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) ...@@ -920,11 +920,10 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
core_dc->hwss.set_bandwidth(core_dc, context, true); core_dc->hwss.set_bandwidth(core_dc, context, true);
resource_validate_ctx_destruct(core_dc->current_context); resource_validate_ctx_copy_construct(context, core_dc->current_context);
if (core_dc->current_context)
dm_free(core_dc->current_context);
core_dc->current_context = context; resource_validate_ctx_destruct(context);
dm_free(context);
return true; return true;
} }
......
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