Commit b8a8d34b authored by Sung Lee's avatar Sung Lee Committed by Alex Deucher

drm/amd/display: Fail validation if building scaling params fails

[WHY & HOW]
If building scaling parameters fails, validation
should also fail.
Signed-off-by: default avatarSung Lee <sung.lee@amd.com>
Reviewed-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 23838777
...@@ -1936,7 +1936,7 @@ bool dcn20_split_stream_for_odm( ...@@ -1936,7 +1936,7 @@ bool dcn20_split_stream_for_odm(
return true; return true;
} }
void dcn20_split_stream_for_mpc( bool dcn20_split_stream_for_mpc(
struct resource_context *res_ctx, struct resource_context *res_ctx,
const struct resource_pool *pool, const struct resource_pool *pool,
struct pipe_ctx *primary_pipe, struct pipe_ctx *primary_pipe,
...@@ -1965,8 +1965,11 @@ void dcn20_split_stream_for_mpc( ...@@ -1965,8 +1965,11 @@ void dcn20_split_stream_for_mpc(
secondary_pipe->top_pipe = primary_pipe; secondary_pipe->top_pipe = primary_pipe;
ASSERT(primary_pipe->plane_state); ASSERT(primary_pipe->plane_state);
resource_build_scaling_params(primary_pipe); if (!resource_build_scaling_params(primary_pipe) ||
resource_build_scaling_params(secondary_pipe); !resource_build_scaling_params(secondary_pipe))
return false;
return true;
} }
void dcn20_populate_dml_writeback_from_context( void dcn20_populate_dml_writeback_from_context(
...@@ -2796,9 +2799,10 @@ bool dcn20_fast_validate_bw( ...@@ -2796,9 +2799,10 @@ bool dcn20_fast_validate_bw(
goto validate_fail; goto validate_fail;
dcn20_build_mapped_resource(dc, context, pipe->stream); dcn20_build_mapped_resource(dc, context, pipe->stream);
} else } else
dcn20_split_stream_for_mpc( if (!dcn20_split_stream_for_mpc(
&context->res_ctx, dc->res_pool, &context->res_ctx, dc->res_pool,
pipe, hsplit_pipe); pipe, hsplit_pipe))
goto validate_fail;
pipe_split_from[hsplit_pipe->pipe_idx] = pipe_idx; pipe_split_from[hsplit_pipe->pipe_idx] = pipe_idx;
} }
} else if (hsplit_pipe && hsplit_pipe->plane_state == pipe->plane_state) { } else if (hsplit_pipe && hsplit_pipe->plane_state == pipe->plane_state) {
......
...@@ -129,7 +129,7 @@ void dcn20_release_dsc(struct resource_context *res_ctx, ...@@ -129,7 +129,7 @@ void dcn20_release_dsc(struct resource_context *res_ctx,
const struct resource_pool *pool, const struct resource_pool *pool,
struct display_stream_compressor **dsc); struct display_stream_compressor **dsc);
bool dcn20_validate_dsc(struct dc *dc, struct dc_state *new_ctx); bool dcn20_validate_dsc(struct dc *dc, struct dc_state *new_ctx);
void dcn20_split_stream_for_mpc( bool dcn20_split_stream_for_mpc(
struct resource_context *res_ctx, struct resource_context *res_ctx,
const struct resource_pool *pool, const struct resource_pool *pool,
struct pipe_ctx *primary_pipe, struct pipe_ctx *primary_pipe,
......
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