<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div dir="auto">
<div dir="auto">
<p><span style="font-size: 12pt;">Series is:</span><br>
</p>
<p>Reviewed-By: Fangzhi Zuo <jerry.zuo@amd.com></p>
</div>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div id="mail-editor-reference-message-container" dir="auto">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" style="font-size: 11pt;"><strong>发件人:</strong> Mahfooz, Hamza <Hamza.Mahfooz@amd.com><br>
<strong>发送时间:</strong> 星期四, 八月 31, 2023 3:39:04 下午<br>
<strong>收件人:</strong> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<strong>抄送:</strong> Zuo, Jerry <Jerry.Zuo@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; stable@vger.kernel.org <stable@vger.kernel.org>; Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>;
Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Lei, Jun <Jun.Lei@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>;
Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Liu, Wenjing <Wenjing.Liu@amd.com>; Lee, Alvin <Alvin.Lee2@amd.com>; Kim, Sung joon <Sungjoon.Kim@amd.com>; Miess, Daniel <Daniel.Miess@amd.com>; Teeger, Gabe <Gabe.Teeger@amd.com>; dri-devel@lists.freedesktop.org
<dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org><br>
<strong>主题:</strong> [PATCH v2 1/2] Revert "drm/amd/display: Remove v_startup workaround for dcn3+"<br>
</div>
<br>
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This reverts commit 3a31e8b89b7240d9a17ace8a1ed050bdcb560f9e.<br>
<br>
We still need to call dcn20_adjust_freesync_v_startup() for older DCN3+<br>
ASICs otherwise it can cause DP to HDMI 2.1 PCONs to fail to light up.<br>
<br>
Cc: stable@vger.kernel.org<br>
Link: <a href="https://gitlab.freedesktop.org/drm/amd/-/issues/2809">https://gitlab.freedesktop.org/drm/amd/-/issues/2809</a><br>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com><br>
---<br>
.../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 24 ++++---------------<br>
1 file changed, 4 insertions(+), 20 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c<br>
index 0989a0152ae8..1bfdf0271fdf 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c<br>
@@ -1099,6 +1099,10 @@ void dcn20_calculate_dlg_params(struct dc *dc,<br>
context->res_ctx.pipe_ctx[i].plane_res.bw.dppclk_khz =<br>
pipes[pipe_idx].clks_cfg.dppclk_mhz * 1000;<br>
context->res_ctx.pipe_ctx[i].pipe_dlg_param = pipes[pipe_idx].pipe.dest;<br>
+ if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)<br>
+ dcn20_adjust_freesync_v_startup(<br>
+ &context->res_ctx.pipe_ctx[i].stream->timing,<br>
+ &context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);<br>
<br>
pipe_idx++;<br>
}<br>
@@ -1927,7 +1931,6 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co<br>
int vlevel = 0;<br>
int pipe_split_from[MAX_PIPES];<br>
int pipe_cnt = 0;<br>
- int i = 0;<br>
display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC);<br>
DC_LOGGER_INIT(dc->ctx->logger);<br>
<br>
@@ -1951,15 +1954,6 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co<br>
dcn20_calculate_wm(dc, context, pipes, &pipe_cnt, pipe_split_from, vlevel, fast_validate);<br>
dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);<br>
<br>
- for (i = 0; i < dc->res_pool->pipe_count; i++) {<br>
- if (!context->res_ctx.pipe_ctx[i].stream)<br>
- continue;<br>
- if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)<br>
- dcn20_adjust_freesync_v_startup(<br>
- &context->res_ctx.pipe_ctx[i].stream->timing,<br>
- &context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);<br>
- }<br>
-<br>
BW_VAL_TRACE_END_WATERMARKS();<br>
<br>
goto validate_out;<br>
@@ -2232,7 +2226,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc,<br>
int vlevel = 0;<br>
int pipe_split_from[MAX_PIPES];<br>
int pipe_cnt = 0;<br>
- int i = 0;<br>
display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC);<br>
DC_LOGGER_INIT(dc->ctx->logger);<br>
<br>
@@ -2261,15 +2254,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc,<br>
dcn21_calculate_wm(dc, context, pipes, &pipe_cnt, pipe_split_from, vlevel, fast_validate);<br>
dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);<br>
<br>
- for (i = 0; i < dc->res_pool->pipe_count; i++) {<br>
- if (!context->res_ctx.pipe_ctx[i].stream)<br>
- continue;<br>
- if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid)<br>
- dcn20_adjust_freesync_v_startup(<br>
- &context->res_ctx.pipe_ctx[i].stream->timing,<br>
- &context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start);<br>
- }<br>
-<br>
BW_VAL_TRACE_END_WATERMARKS();<br>
<br>
goto validate_out;<br>
-- <br>
2.41.0<br>
<br>
</div>
</span></font><br>
</div>
</div>
</div>
</body>
</html>