diff options
author | 2017-04-06 18:57:05 -0400 | |
---|---|---|
committer | 2017-09-26 17:24:16 -0400 | |
commit | 927f6eff2aa40e73528619818374c271ddfadd3d (patch) | |
tree | 6e00d7116ef8936e182c25dc0ec2e25cd7d93d1d | |
parent | drm/amd/display: pull commit_surfaces out of atomic_commit into helper function (diff) | |
download | wireguard-linux-927f6eff2aa40e73528619818374c271ddfadd3d.tar.xz wireguard-linux-927f6eff2aa40e73528619818374c271ddfadd3d.zip |
drm/amd/display: Copy ctx to current_context instead of assign
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index e8499e744595..0d870e9c7c99 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -906,13 +906,13 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) resource_validate_ctx_copy_construct(core_dc->current_context, context); post_surface_trace(dc); - for (i = 0; i < context->res_ctx.pool->pipe_count; i++) if (context->res_ctx.pipe_ctx[i].stream == NULL) { context->res_ctx.pipe_ctx[i].pipe_idx = i; core_dc->hwss.power_down_front_end( core_dc, &context->res_ctx.pipe_ctx[i]); } + if (!core_dc->res_pool->funcs->validate_bandwidth(core_dc, context)) { BREAK_TO_DEBUGGER(); return false; @@ -920,11 +920,10 @@ 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); + resource_validate_ctx_copy_construct(context, core_dc->current_context); - core_dc->current_context = context; + resource_validate_ctx_destruct(context); + dm_free(context); return true; } |