<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">+       bool uclk_switching_disabled =<br>
+(bool)hwmgr->display_config->nb_pstate_switch_disable;</span></font><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Don't need type convert.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best Regards</p>
<p style="margin-top:0;margin-bottom:0">Rex<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Evan Quan <evan.quan@amd.com><br>
<b>Sent:</b> Friday, July 20, 2018 10:35 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Quan, Evan; Zhu, Rex<br>
<b>Subject:</b> [PATCH 3/3] drm/amd/powerplay: disallow slow switch if NBPState is disabled</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Otherwise there may be potential SMU performance issues.<br>
<br>
Change-Id: I05a09bb05407f7b3705d79a1d2c6628385c80461<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 5 ++++-<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 5 ++++-<br>
 2 files changed, 8 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
index 002ed77a5268..ccb587607b03 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
@@ -3779,9 +3779,12 @@ static int vega10_notify_smc_display_config_after_ps_adjustment(<br>
         struct PP_Clocks min_clocks = {0};<br>
         uint32_t i;<br>
         struct pp_display_clock_request clock_req;<br>
+       bool uclk_switching_disabled =<br>
+                       (bool)hwmgr->display_config->nb_pstate_switch_disable;<br>
 <br>
         if ((hwmgr->display_config->num_display > 1) &&<br>
-            !hwmgr->display_config->multi_monitor_in_sync)<br>
+            !hwmgr->display_config->multi_monitor_in_sync &&<br>
+            !uclk_switching_disabled)<br>
                 vega10_notify_smc_display_change(hwmgr, false);<br>
         else<br>
                 vega10_notify_smc_display_change(hwmgr, true);<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
index 35f96dacb50a..e3b11ae8fdb8 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
@@ -1387,9 +1387,12 @@ static int vega12_notify_smc_display_config_after_ps_adjustment(<br>
                         (struct vega12_hwmgr *)(hwmgr->backend);<br>
         struct PP_Clocks min_clocks = {0};<br>
         struct pp_display_clock_request clock_req;<br>
+       bool uclk_switching_disabled =<br>
+                       (bool)hwmgr->display_config->nb_pstate_switch_disable;<br>
 <br>
         if ((hwmgr->display_config->num_display > 1) &&<br>
-               !hwmgr->display_config->multi_monitor_in_sync)<br>
+            !hwmgr->display_config->multi_monitor_in_sync &&<br>
+            !uclk_switching_disabled)<br>
                 vega12_notify_smc_display_change(hwmgr, false);<br>
         else<br>
                 vega12_notify_smc_display_change(hwmgr, true);<br>
-- <br>
2.18.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk652857" class="OWAAutoLink" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15320760932520.07807509508203059" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15320760932240.4325743911662876" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_15320760932460.7623274709465312" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15320760932460.33509911256038116"></div>
<div id="LPTitle_15320760932460.8893094785459864" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15320760932520.7056631923527743" style="text-decoration: none;" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15320760932520.4922178239396222" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15320760932520.6953170574068477" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>