<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Christian,</p>
<p><br>
</p>
<p>you are right, I missed mult-gpu case. i will refine related patches.</p>
<p><br>
</p>
<p>Thanks. <br>
</p>
<p><br>
</p>
<p>Best Regards</p>
<p>Rex<br>
</p>
</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> Christian König <deathsimple@vodafone.de><br>
<b>Sent:</b> Saturday, September 10, 2016 1:51:30 AM<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>
<div class="moz-cite-prefix">Hi Rex,<br>
<br>
exactly as I feared, please don't do this.<br>
<br>
I for example have a system with multiple PEG slots to be able to test different hardware generations at the same time.<br>
<br>
This is rather common setup for testing and will break horrible and quite unpredictable when the code suddenly overrides a global function table which is used by multiple hardware generations.<br>
<br>
Either create one function table for each variant or make the function table a member of the hwmgr structure so that you can overwrite it in each instance without affecting others.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 09.09.2016 um 18:29 schrieb Zhu, Rex:<br>
</div>
<blockquote cite="mid:CY4PR12MB16872A6C90804AF1D368A194FBFA0@CY4PR12MB1687.namprd12.prod.outlook.com" type="cite">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<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 style="font-size:11pt" color="#000000" face="Calibri,
sans-serif"><b>From:</b> Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:deathsimple@vodafone.de"><deathsimple@vodafone.de></a><br>
<b>Sent:</b> Friday, September 9, 2016 10:23:26 PM<br>
<b>To:</b> Zhu, Rex; <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH 0/9] misc patches related to powerplay</font>
<div> </div>
</div>
</div>
<font style="color: rgb(0, 0, 0); font-size: 12pt;" size="2"><span style="font-size:10pt;">
<div class="PlainText">Patch #1-#7 and #9 are Acked-by: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com">
<christian.koenig@amd.com></a>.<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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</body>
</html>