<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">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">Reviewed-by: Kevin Wang <kevin1.wang@amd.com></span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">But it's better to optimize the
 flow of control in <span style="font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important">is_support_sw_smu() </span></span><br>
</div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">Best Regards,</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">Kevin</span></div>
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Jack Zhang <Jack.Zhang1@amd.com><br>
<b>Sent:</b> Monday, December 2, 2019 7:05 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhang, Jack (Jian) <Jack.Zhang1@amd.com><br>
<b>Subject:</b> [PATCH] amd/amdgpu/sriov swSMU disable for sriov</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">For boards greater than ARCTURUS, and under sriov platform,<br>
swSMU is not supported because smu ip block is commented at<br>
guest driver.<br>
<br>
Generally for sriov, initialization of smu is moved to host driver.<br>
Thus, smu sw_init and hw_init will not be executed at guest driver.<br>
<br>
Without sw structure being initialized in guest driver, swSMU cannot<br>
declare to be supported.<br>
<br>
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 ++++-<br>
 1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
index 36001a4..0b8a53b 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
@@ -531,7 +531,10 @@ bool is_support_sw_smu(struct amdgpu_device *adev)<br>
         if (adev->asic_type == CHIP_VEGA20)<br>
                 return (amdgpu_dpm == 2) ? true : false;<br>
         else if (adev->asic_type >= CHIP_ARCTURUS)<br>
-               return true;<br>
+               if (amdgpu_sriov_vf(adev))<br>
+                       return false;<br>
+               else<br>
+                       return true;<br>
         else<br>
                 return false;<br>
 }<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CKevin1.Wang%40amd.com%7Cc80551b2c7d9426a7d5e08d777178bb9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637108815398674653&amp;sdata=5dFralarJqC8%2FkwhQWCjsU8b5UQDILN2p6HafXGi0TM%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CKevin1.Wang%40amd.com%7Cc80551b2c7d9426a7d5e08d777178bb9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637108815398674653&amp;sdata=5dFralarJqC8%2FkwhQWCjsU8b5UQDILN2p6HafXGi0TM%3D&amp;reserved=0</a></div>
</span></font></div>
</div>
</body>
</html>