<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com><br>
</div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Aurabindo<br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com><br>
<b>Sent:</b> Wednesday, February 15, 2023 2:37 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Zhuo, Qingqing (Lillian)
 <Qingqing.Zhuo@amd.com>; Li, Roman <Roman.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Kotarac, Pavle <Pavle.Kotarac@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com><br>
<b>Subject:</b> [PATCH] Revert "drm/amd/display: enable DPG when disabling plane for phantom pipe"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This reverts commit b73cf50bd1d0008027cc1b41881b671d9c9054b9.<br>
<br>
regression detected by the change. Revert until<br>
fix is available.<br>
<br>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com><br>
---<br>
 drivers/gpu/drm/amd/display/dc/core/dc.c | 47 +-----------------------<br>
 1 file changed, 1 insertion(+), 46 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
index 510661d303e8..1c218c526650 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
@@ -74,8 +74,6 @@<br>
 <br>
 #include "dc_trace.h"<br>
 <br>
-#include "hw_sequencer_private.h"<br>
-<br>
 #include "dce/dmub_outbox.h"<br>
 <br>
 #define CTX \<br>
@@ -1059,44 +1057,6 @@ static void apply_ctx_interdependent_lock(struct dc *dc, struct dc_state *contex<br>
         }<br>
 }<br>
 <br>
-static void phantom_pipe_blank(<br>
-               struct dc *dc,<br>
-               struct timing_generator *tg,<br>
-               int width,<br>
-               int height)<br>
-{<br>
-       struct dce_hwseq *hws = dc->hwseq;<br>
-       enum dc_color_space color_space;<br>
-       struct tg_color black_color = {0};<br>
-       struct output_pixel_processor *opp = NULL;<br>
-       uint32_t num_opps, opp_id_src0, opp_id_src1;<br>
-       uint32_t otg_active_width, otg_active_height;<br>
-<br>
-       /* program opp dpg blank color */<br>
-       color_space = COLOR_SPACE_SRGB;<br>
-       color_space_to_black_color(dc, color_space, &black_color);<br>
-<br>
-       otg_active_width = width;<br>
-       otg_active_height = height;<br>
-<br>
-       /* get the OPTC source */<br>
-       tg->funcs->get_optc_source(tg, &num_opps, &opp_id_src0, &opp_id_src1);<br>
-       ASSERT(opp_id_src0 < dc->res_pool->res_cap->num_opp);<br>
-       opp = dc->res_pool->opps[opp_id_src0];<br>
-<br>
-       opp->funcs->opp_set_disp_pattern_generator(<br>
-                       opp,<br>
-                       CONTROLLER_DP_TEST_PATTERN_SOLID_COLOR,<br>
-                       CONTROLLER_DP_COLOR_SPACE_UDEFINED,<br>
-                       COLOR_DEPTH_UNDEFINED,<br>
-                       &black_color,<br>
-                       otg_active_width,<br>
-                       otg_active_height,<br>
-                       0);<br>
-<br>
-       hws->funcs.wait_for_blank_complete(opp);<br>
-}<br>
-<br>
 static void disable_dangling_plane(struct dc *dc, struct dc_state *context)<br>
 {<br>
         int i, j;<br>
@@ -1155,13 +1115,8 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)<br>
                          * again for different use.<br>
                          */<br>
                         if (old_stream->mall_stream_config.type == SUBVP_PHANTOM) {<br>
-                               if (tg->funcs->enable_crtc) {<br>
-                                       int main_pipe_width, main_pipe_height;<br>
-                                       main_pipe_width = old_stream->mall_stream_config.paired_stream->dst.width;<br>
-                                       main_pipe_height = old_stream->mall_stream_config.paired_stream->dst.height;<br>
-                                       phantom_pipe_blank(dc, tg, main_pipe_width, main_pipe_height);<br>
+                               if (tg->funcs->enable_crtc)<br>
                                         tg->funcs->enable_crtc(tg);<br>
-                               }<br>
                         }<br>
                         dc_rem_all_planes_for_stream(dc, old_stream, dangling_context);<br>
                         disable_all_writeback_pipes_for_stream(dc, old_stream, dangling_context);<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>