Skip to content

Commit a81de4a

Browse files
effective-lightalexdeucher
authored andcommitted
Revert "drm/amd/display: Remove v_startup workaround for dcn3+"
This reverts commit 3a31e8b. We still need to call dcn20_adjust_freesync_v_startup() for older DCN3+ ASICs. Otherwise, it can cause DP to HDMI 2.1 PCONs to fail to light up. Cc: stable@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2809 Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 3558831 commit a81de4a

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,10 @@ void dcn20_calculate_dlg_params(struct dc *dc,
10991099
context->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz =
11001100
pipes[pipe_idx].clks_cfg.dppclk_mhz * 1000;
11011101
context->res_ctx.pipe_ctx[i].pipe_dlg_param = pipes[pipe_idx].pipe.dest;
1102+
if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)
1103+
dcn20_adjust_freesync_v_startup(
1104+
&context->res_ctx.pipe_ctx[i].stream->timing,
1105+
&context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);
11021106

11031107
pipe_idx++;
11041108
}
@@ -1927,7 +1931,6 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co
19271931
int vlevel = 0;
19281932
int pipe_split_from[MAX_PIPES];
19291933
int pipe_cnt = 0;
1930-
int i = 0;
19311934
display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC);
19321935
DC_LOGGER_INIT(dc->ctx->logger);
19331936

@@ -1951,15 +1954,6 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co
19511954
dcn20_calculate_wm(dc, context, pipes, &pipe_cnt, pipe_split_from, vlevel, fast_validate);
19521955
dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);
19531956

1954-
for (i = 0; i < dc->res_pool->pipe_count; i++) {
1955-
if (!context->res_ctx.pipe_ctx[i].stream)
1956-
continue;
1957-
if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)
1958-
dcn20_adjust_freesync_v_startup(
1959-
&context->res_ctx.pipe_ctx[i].stream->timing,
1960-
&context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);
1961-
}
1962-
19631957
BW_VAL_TRACE_END_WATERMARKS();
19641958

19651959
goto validate_out;
@@ -2232,7 +2226,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc,
22322226
int vlevel = 0;
22332227
int pipe_split_from[MAX_PIPES];
22342228
int pipe_cnt = 0;
2235-
int i = 0;
22362229
display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC);
22372230
DC_LOGGER_INIT(dc->ctx->logger);
22382231

@@ -2261,15 +2254,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc,
22612254
dcn21_calculate_wm(dc, context, pipes, &pipe_cnt, pipe_split_from, vlevel, fast_validate);
22622255
dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);
22632256

2264-
for (i = 0; i < dc->res_pool->pipe_count; i++) {
2265-
if (!context->res_ctx.pipe_ctx[i].stream)
2266-
continue;
2267-
if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)
2268-
dcn20_adjust_freesync_v_startup(
2269-
&context->res_ctx.pipe_ctx[i].stream->timing,
2270-
&context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);
2271-
}
2272-
22732257
BW_VAL_TRACE_END_WATERMARKS();
22742258

22752259
goto validate_out;

0 commit comments

Comments
 (0)