<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:#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);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</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> Zhu, Changfeng <Changfeng.Zhu@amd.com><br>
<b>Sent:</b> Thursday, December 12, 2019 10:24 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Liang, Prike <Prike.Liang@amd.com>; Liu, Aaron <Aaron.Liu@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Huang, Shimmer <Xinmei.Huang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Zhu, Changfeng <Changfeng.Zhu@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: enable gfxoff for raven1 refresh</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: changzhu <Changfeng.Zhu@amd.com><br>
<br>
When smu version is larger than 0x41e2b, it will load<br>
raven_kicker_rlc.bin.To enable gfxoff for raven_kicker_rlc.bin,it<br>
needs to avoid adev->pm.pp_feature &= ~PP_GFXOFF_MASK when it loads<br>
raven_kicker_rlc.bin.<br>
<br>
Change-Id: I4dffa1783c9ceb5d40df9756d821e2cd7feff84d<br>
Signed-off-by: changzhu <Changfeng.Zhu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++++-----------<br>
 1 file changed, 4 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
index ea58d0e5be4c..68409bb7c9e0 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
@@ -1038,17 +1038,10 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)<br>
         case CHIP_VEGA20:<br>
                 break;<br>
         case CHIP_RAVEN:<br>
-               /* Disable GFXOFF on original raven.  There are combinations<br>
-                * of sbios and platforms that are not stable.<br>
-                */<br>
-               if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8))<br>
-                       adev->pm.pp_feature &= ~PP_GFXOFF_MASK;<br>
-               else if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)<br>
-                        &&((adev->gfx.rlc_fw_version != 106 &&<br>
-                            adev->gfx.rlc_fw_version < 531) ||<br>
-                           (adev->gfx.rlc_fw_version == 53815) ||<br>
-                           (adev->gfx.rlc_feature_version < 1) ||<br>
-                           !adev->gfx.rlc.is_rlc_v2_1))<br>
+               if (!(adev->rev_id >= 0x8 ||<br>
+                     adev->pdev->device == 0x15d8) &&<br>
+                   (adev->pm.fw_version < 0x41e2b || /* not raven1 fresh */<br>
+                    !adev->gfx.rlc.is_rlc_v2_1)) /* without rlc save restore ucodes */<br>
                         adev->pm.pp_feature &= ~PP_GFXOFF_MASK;<br>
 <br>
                 if (adev->pm.pp_feature & PP_GFXOFF_MASK)<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>