<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-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<meta content="text/html; charset=UTF-8">
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<p style="color: rgb(0, 0, 0); font-size: 12pt;">Hi Christian,</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p><span style="font-size: 12pt;">I used smu7_hwmgr for all the asics of smu version 7 , CI and Vi. Please see </span><span style="font-size: 12pt;">powerplay code refactoring patches</span><font color="#333333"><span style="font-size: 21px;">.</span></font></p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">But some functions in the table were different between those asics. so we needed to overload those functions for some asics.</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">for example:</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">from tonga. we used pptable version 1, but ci and iceland, no pptable, </p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">so needed to overload related functions:</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><span style="color: rgb(33, 33, 33); font-size: 13.3333px;"> hwmgr->hwmgr_func = &smu7_hwmgr_funcs;</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;"> hwmgr->pptable_func = &pptable_v1_0_funcs;</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;"> pp_smu7_thermal_initialize(hwmgr);</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;">+ if (hwmgr->pp_table_version == PP_TABLE_V0) {</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;">+ hwmgr->hwmgr_func->get_pp_table_entry = &smu7_get_pp_table_entry_v0;</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;">+ hwmgr->hwmgr_func->get_num_of_pp_table_entries = smu7_get_number_of_powerplay_table_entries_v0;</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;">+ hwmgr->pptable_func = &pptable_funcs;</span><br style="color: rgb(33, 33, 33); font-size: 13.3333px;">
<span style="color: rgb(33, 33, 33); font-size: 13.3333px;">+ }</span><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><span style="color: rgb(33, 33, 33); font-size: 13.3333px;"><br>
</span></p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">Best Regards </p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;">Rex</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
<p style="color: rgb(0, 0, 0); font-size: 12pt;"><br>
</p>
</div>
<hr tabindex="-1" style="color: rgb(0, 0, 0); font-size: 12pt; display: inline-block; width: 98%;">
<div id="x_divRplyFwdMsg" dir="ltr" style="color: rgb(0, 0, 0); font-size: 12pt;">
<font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christian König <deathsimple@vodafone.de><br>
<b>Sent:</b> Friday, September 9, 2016 10:23:26 PM<br>
<b>To:</b> Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH 0/9] misc patches related to powerplay</font>
<div> </div>
</div>
</div>
<font size="2" style="color: rgb(0, 0, 0); font-size: 12pt;"><span style="font-size:10pt;">
<div class="PlainText">Patch #1-#7 and #9 are Acked-by: Christian König <christian.koenig@amd.com>.<br>
<br>
Patch #8: That looks fishy, usually we don't want to override static <br>
functions tables.<br>
<br>
So what is the specific use case here?<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 09.09.2016 um 15:37 schrieb Rex Zhu:<br>
> Rex Zhu (9):<br>
> drm/amd/powerplay: mark symbols static where possible on tonga.<br>
> drm/amd/powerplay: add feature flags in hwmgr to enable/disable<br>
> special features.<br>
> drm/amd/powerplay: add module parameter for mask pp feature<br>
> drm/amd/powerplay: initialize platform caps in hwmgr_init.<br>
> drm/amd/powerplay: add common functiones for visiting pp table.<br>
> drm/amd/powerplay: wrap get evv voltage of fiji and polaris<br>
> drm/amd/powerplay: move smu related variable definitions to smumgr.<br>
> drm/amd/powerplay: delete const flag of hwmgr_funcs for overload.<br>
> drm/amd/powerplay: delete dupicated function and definition.<br>
><br>
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +-<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +-<br>
> .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 34 ----<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 186 ++++++++++++++++++---<br>
> .../gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c | 10 +-<br>
> .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 7 +-<br>
> .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 5 +-<br>
> .../drm/amd/powerplay/hwmgr/polaris10_powertune.h | 13 --<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 21 +--<br>
> .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 1 -<br>
> drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 32 +++-<br>
> .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 -<br>
> .../drm/amd/powerplay/smumgr/polaris10_smumgr.h | 20 +++<br>
> drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 +<br>
> 16 files changed, 229 insertions(+), 111 deletions(-)<br>
><br>
<br>
</div>
</span></font></div>
</body>
</html>