<div dir="ltr"><div><div><div><div><div>Hello Asher,<br><br></div>Thanks for the information, is it open-source tests? Can I reproduce it? <br><br></div>Also, it seems like Radeon Instinct MI25 was released before Radeon RX Vega, is it possible that they have different PowerPlay subsystems? <br></div>On my Vega56, all these registers from vega20 are working very well. <br></div>Seems like we should split implementation somehow. <br><br></div>Regards, <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 26, 2022 at 3:51 PM Song, Asher <<a href="mailto:Asher.Song@amd.com">Asher.Song@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7722690196034941173">
<div style="overflow-wrap: break-word;" lang="EN-US">
<div class="m_7722690196034941173WordSection1">
<p class="m_7722690196034941173msipheaderdf3d92d6" style="margin:0in"><span style="font-size:10pt;font-family:"Arial",sans-serif;color:blue">[AMD Official Use Only - General]</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">+<a id="m_7722690196034941173OWAAM2C3FD9A9EF544EB3A89BBBB72AF67D08" href="mailto:Xiaohu.Meng@amd.com" target="_blank"><span style="font-family:"Calibri",sans-serif;text-decoration:none">@Meng, Xiaohu</span></a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi Zhuravlev,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The information of test card is as following:<u></u><u></u></p>
<p class="MsoNormal">Lspci name: [AMD/ATI] Vega 10 [Radeon Instinct MI25 MxGPU] (rev 05)<u></u><u></u></p>
<p class="MsoNormal">Firmware: ATOM BIOS: 113-D0531800-C04<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">When run test scripts compute-rocm-*/utils/run_rsmitst.sh, the below test cases fail.
<u></u><u></u></p>
<p class="MsoNormal">[ FAILED ] 4 tests, listed below:<u></u><u></u></p>
<p class="MsoNormal">[ FAILED ] rsmitstReadOnly.TestOverdriveRead<u></u><u></u></p>
<p class="MsoNormal">[ FAILED ] rsmitstReadWrite.FanReadWrite<u></u><u></u></p>
<p class="MsoNormal">[ FAILED ] rsmitstReadWrite.TestOverdriveReadWrite<u></u><u></u></p>
<p class="MsoNormal">[ FAILED ] rsmitstReadWrite.TestPowerCapReadWrite<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best Regards,<u></u><u></u></p>
<p class="MsoNormal">Asher<u></u><u></u></p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Yury Zhuravlev <<a href="mailto:stalkerg@gmail.com" target="_blank">stalkerg@gmail.com</a>> <br>
<b>Sent:</b> Wednesday, October 26, 2022 9:31 AM<br>
<b>To:</b> Song, Asher <<a href="mailto:Asher.Song@amd.com" target="_blank">Asher.Song@amd.com</a>><br>
<b>Cc:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" target="_blank">Alexander.Deucher@amd.com</a>>; Chen, Guchun <<a href="mailto:Guchun.Chen@amd.com" target="_blank">Guchun.Chen@amd.com</a>>; Quan, Evan <<a href="mailto:Evan.Quan@amd.com" target="_blank">Evan.Quan@amd.com</a>>; <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly"<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">Hello,<br>
Can you write here your card name and firmware version? Without this patch, my fan sensors are broken, and it's sensitive to my pc case with water cooling.<br>
My card is: Sapphire Pulse Radeon RX Vega 56 vd6546 SA<br>
lspci name: [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c3)<br>
Firmware: ATOM BIOS: 113-376XL-UO2<br>
This patch is 100% working correct on my machine, and I tested it last 2 months.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Regards,<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Oct 14, 2022 at 1:15 PM Asher Song <<a href="mailto:Asher.Song@amd.com" target="_blank">Asher.Song@amd.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<p class="MsoNormal" style="margin-bottom:12pt">This reverts commit fe01cb24b81c0091d7e5668874d51ce913e44a97.<br>
<br>
Unfortunately, that commit causes fan monitors can't be read and written<br>
properly.<br>
<br>
Signed-off-by: Asher Song <<a href="mailto:Asher.Song@amd.com" target="_blank">Asher.Song@amd.com</a>><br>
---<br>
.../amd/pm/powerplay/hwmgr/vega10_thermal.c | 25 ++++++++++---------<br>
1 file changed, 13 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c<br>
index 190af79f3236..dad3e3741a4e 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c<br>
@@ -67,21 +67,22 @@ int vega10_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr,<br>
int vega10_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr,<br>
uint32_t *speed)<br>
{<br>
- struct amdgpu_device *adev = hwmgr->adev;<br>
- uint32_t duty100, duty;<br>
- uint64_t tmp64;<br>
+ uint32_t current_rpm;<br>
+ uint32_t percent = 0;<br>
<br>
- duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1),<br>
- CG_FDO_CTRL1, FMAX_DUTY100);<br>
- duty = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_THERMAL_STATUS),<br>
- CG_THERMAL_STATUS, FDO_PWM_DUTY);<br>
+ if (hwmgr->thermal_controller.fanInfo.bNoFan)<br>
+ return 0;<br>
<br>
- if (!duty100)<br>
- return -EINVAL;<br>
+ if (vega10_get_current_rpm(hwmgr, ¤t_rpm))<br>
+ return -1;<br>
+<br>
+ if (hwmgr->thermal_controller.<br>
+ advanceFanControlParameters.usMaxFanRPM != 0)<br>
+ percent = current_rpm * 255 /<br>
+ hwmgr->thermal_controller.<br>
+ advanceFanControlParameters.usMaxFanRPM;<br>
<br>
- tmp64 = (uint64_t)duty * 255;<br>
- do_div(tmp64, duty100);<br>
- *speed = MIN((uint32_t)tmp64, 255);<br>
+ *speed = MIN(percent, 255);<br>
<br>
return 0;<br>
}<br>
-- <br>
2.25.1<u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div></blockquote></div>