Skip to content

Commit c147355

Browse files
Andrey Grodzovskyalexdeucher
authored andcommitted
drm/amd/display: program scaler not called.
Scaler code in case of UPDATE_TYPE_MED was not called since new pipe context and current context are the same. Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e73b59b commit c147355

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,12 +1011,23 @@ bool dc_commit_surfaces_to_stream(
10111011
struct dc_plane_info plane_info[MAX_SURFACES];
10121012
struct dc_scaling_info scaling_info[MAX_SURFACES];
10131013
int i;
1014+
bool ret;
1015+
struct dc_stream_update *stream_update =
1016+
dm_alloc(sizeof(struct dc_stream_update));
1017+
1018+
if (!stream_update) {
1019+
BREAK_TO_DEBUGGER();
1020+
return false;
1021+
}
10141022

10151023
memset(updates, 0, sizeof(updates));
10161024
memset(flip_addr, 0, sizeof(flip_addr));
10171025
memset(plane_info, 0, sizeof(plane_info));
10181026
memset(scaling_info, 0, sizeof(scaling_info));
10191027

1028+
stream_update->src = dc_stream->src;
1029+
stream_update->dst = dc_stream->dst;
1030+
10201031
for (i = 0; i < new_surface_count; i++) {
10211032
updates[i].surface = new_surfaces[i];
10221033
updates[i].gamma =
@@ -1041,9 +1052,17 @@ bool dc_commit_surfaces_to_stream(
10411052
updates[i].plane_info = &plane_info[i];
10421053
updates[i].scaling_info = &scaling_info[i];
10431054
}
1044-
dc_update_surfaces_for_stream(dc, updates, new_surface_count, dc_stream);
10451055

1046-
return dc_post_update_surfaces_to_stream(dc);
1056+
dc_update_surfaces_and_stream(
1057+
dc,
1058+
updates,
1059+
new_surface_count,
1060+
dc_stream, stream_update);
1061+
1062+
ret = dc_post_update_surfaces_to_stream(dc);
1063+
1064+
dm_free(stream_update);
1065+
return ret;
10471066
}
10481067

10491068
static bool is_surface_in_context(

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,10 +2408,8 @@ static void dce110_program_front_end_for_pipe(
24082408
pipe_ctx->xfm->funcs->transform_set_gamut_remap(pipe_ctx->xfm, &adjust);
24092409

24102410
pipe_ctx->scl_data.lb_params.alpha_en = pipe_ctx->bottom_pipe != 0;
2411-
if (old_pipe && memcmp(&old_pipe->scl_data,
2412-
&pipe_ctx->scl_data,
2413-
sizeof(struct scaler_data)) != 0)
2414-
program_scaler(dc, pipe_ctx);
2411+
2412+
program_scaler(dc, pipe_ctx);
24152413

24162414
mi->funcs->mem_input_program_surface_config(
24172415
mi,

0 commit comments

Comments
 (0)