Commit 506d32ee authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: build scaling params when a new plane is appended

[why & how]
We are boundling changes in plane state and build scaling params
together. This is to simplify DML code so DML doesn't need to build
scaling params. We are also avoiding rebuilding scaling params for
planes without scaling changes.
Reviewed-by: default avatarDillon Varone <dillon.varone@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 57b1ce83
......@@ -3236,7 +3236,10 @@ static bool update_planes_and_stream_state(struct dc *dc,
for (i = 0; i < surface_count; i++) {
struct dc_plane_state *surface = srf_updates[i].surface;
if (update_type >= UPDATE_TYPE_MED) {
if (update_type != UPDATE_TYPE_MED)
continue;
if (surface->update_flags.bits.clip_size_change ||
surface->update_flags.bits.position_change) {
for (j = 0; j < dc->res_pool->pipe_count; j++) {
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];
......
......@@ -2649,13 +2649,19 @@ bool resource_append_dpp_pipes_for_plane_composition(
struct pipe_ctx *otg_master_pipe,
struct dc_plane_state *plane_state)
{
bool success;
if (otg_master_pipe->plane_state == NULL)
return add_plane_to_opp_head_pipes(otg_master_pipe,
success = add_plane_to_opp_head_pipes(otg_master_pipe,
plane_state, new_ctx);
else
return acquire_secondary_dpp_pipes_and_add_plane(
success = acquire_secondary_dpp_pipes_and_add_plane(
otg_master_pipe, plane_state, new_ctx,
cur_ctx, pool);
if (success)
/* when appending a plane mpc slice count changes from 0 to 1 */
success = update_pipe_params_after_mpc_slice_count_change(
plane_state, new_ctx, pool);
return success;
}
void resource_remove_dpp_pipes_for_plane_composition(
......
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