mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
drm/amd/display: Move Link Encoder Assignment Out Of dc_global_validate
Assigning link encoder is not relevant to validating bandwidth so move the logic outside of dc_global_validate. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
94d904aec1
commit
5c7cc114dd
|
|
@ -2187,6 +2187,14 @@ enum dc_status dc_commit_streams(struct dc *dc, struct dc_commit_streams_params
|
|||
context->power_source = params->power_source;
|
||||
|
||||
res = dc_validate_with_context(dc, set, params->stream_count, context, false);
|
||||
|
||||
/*
|
||||
* Only update link encoder to stream assignment after bandwidth validation passed.
|
||||
*/
|
||||
if (res == DC_OK && dc->res_pool->funcs->link_encs_assign)
|
||||
dc->res_pool->funcs->link_encs_assign(
|
||||
dc, context, context->streams, context->stream_count);
|
||||
|
||||
if (res != DC_OK) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -4091,14 +4091,6 @@ enum dc_status dc_validate_global_state(
|
|||
if (!dc->res_pool->funcs->validate_bandwidth(dc, new_ctx, fast_validate))
|
||||
result = DC_FAIL_BANDWIDTH_VALIDATE;
|
||||
|
||||
/*
|
||||
* Only update link encoder to stream assignment after bandwidth validation passed.
|
||||
* TODO: Split out assignment and validation.
|
||||
*/
|
||||
if (result == DC_OK && dc->res_pool->funcs->link_encs_assign && fast_validate == false)
|
||||
dc->res_pool->funcs->link_encs_assign(
|
||||
dc, new_ctx, new_ctx->streams, new_ctx->stream_count);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user