<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Likun Gao <likun.gao@amd.com><br>
<b>Sent:</b> Wednesday, June 24, 2020 2:35 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Gao, Likun <Likun.Gao@amd.com>; Feng, Kenneth <Kenneth.Feng@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amd/powerplay: change method to set board parameters</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Likun Gao <Likun.Gao@amd.com><br>
<br>
Copy board parameters directly instead of set each parameter for<br>
sienna_cichlid.<br>
<br>
Signed-off-by: Likun Gao <Likun.Gao@amd.com><br>
---<br>
.../drm/amd/powerplay/sienna_cichlid_ppt.c | 89 +------------------<br>
1 file changed, 2 insertions(+), 87 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
index 769e031d489a..693ad8963d0a 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
@@ -394,7 +394,6 @@ static int sienna_cichlid_append_powerplay_table(struct smu_context *smu)<br>
PPTable_t *smc_pptable = table_context->driver_pptable;<br>
struct atom_smc_dpm_info_v4_9 *smc_dpm_table;<br>
int index, ret;<br>
- int i;<br>
<br>
index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,<br>
smc_dpm_info);<br>
@@ -405,92 +404,8 @@ static int sienna_cichlid_append_powerplay_table(struct smu_context *smu)<br>
return ret;<br>
<br>
memcpy(smc_pptable->I2cControllers, smc_dpm_table->I2cControllers,<br>
- sizeof(I2cControllerConfig_t) * NUM_I2C_CONTROLLERS);<br>
-<br>
- /* SVI2 Board Parameters */<br>
- smc_pptable->VddGfxVrMapping = smc_dpm_table->VddGfxVrMapping;<br>
- smc_pptable->VddSocVrMapping = smc_dpm_table->VddSocVrMapping;<br>
- smc_pptable->VddMem0VrMapping = smc_dpm_table->VddMem0VrMapping;<br>
- smc_pptable->VddMem1VrMapping = smc_dpm_table->VddMem1VrMapping;<br>
- smc_pptable->GfxUlvPhaseSheddingMask = smc_dpm_table->GfxUlvPhaseSheddingMask;<br>
- smc_pptable->SocUlvPhaseSheddingMask = smc_dpm_table->SocUlvPhaseSheddingMask;<br>
- smc_pptable->VddciUlvPhaseSheddingMask = smc_dpm_table->VddciUlvPhaseSheddingMask;<br>
- smc_pptable->MvddUlvPhaseSheddingMask = smc_dpm_table->MvddUlvPhaseSheddingMask;<br>
-<br>
- /* Telemetry Settings */<br>
- smc_pptable->GfxMaxCurrent = smc_dpm_table->GfxMaxCurrent;<br>
- smc_pptable->GfxOffset = smc_dpm_table->GfxOffset;<br>
- smc_pptable->Padding_TelemetryGfx = smc_dpm_table->Padding_TelemetryGfx;<br>
- smc_pptable->SocMaxCurrent = smc_dpm_table->SocMaxCurrent;<br>
- smc_pptable->SocOffset = smc_dpm_table->SocOffset;<br>
- smc_pptable->Padding_TelemetrySoc = smc_dpm_table->Padding_TelemetrySoc;<br>
- smc_pptable->Mem0MaxCurrent = smc_dpm_table->Mem0MaxCurrent;<br>
- smc_pptable->Mem0Offset = smc_dpm_table->Mem0Offset;<br>
- smc_pptable->Padding_TelemetryMem0 = smc_dpm_table->Padding_TelemetryMem0;<br>
- smc_pptable->Mem1MaxCurrent = smc_dpm_table->Mem1MaxCurrent;<br>
- smc_pptable->Mem1Offset = smc_dpm_table->Mem1Offset;<br>
- smc_pptable->Padding_TelemetryMem1 = smc_dpm_table->Padding_TelemetryMem1;<br>
- smc_pptable->MvddRatio = smc_dpm_table->MvddRatio;<br>
-<br>
- /* GPIO Settings */<br>
- smc_pptable->AcDcGpio = smc_dpm_table->AcDcGpio;<br>
- smc_pptable->AcDcPolarity = smc_dpm_table->AcDcPolarity;<br>
- smc_pptable->VR0HotGpio = smc_dpm_table->VR0HotGpio;<br>
- smc_pptable->VR0HotPolarity = smc_dpm_table->VR0HotPolarity;<br>
- smc_pptable->VR1HotGpio = smc_dpm_table->VR1HotGpio;<br>
- smc_pptable->VR1HotPolarity = smc_dpm_table->VR1HotPolarity;<br>
- smc_pptable->GthrGpio = smc_dpm_table->GthrGpio;<br>
- smc_pptable->GthrPolarity = smc_dpm_table->GthrPolarity;<br>
-<br>
- /* LED Display Settings */<br>
- smc_pptable->LedPin0 = smc_dpm_table->LedPin0;<br>
- smc_pptable->LedPin1 = smc_dpm_table->LedPin1;<br>
- smc_pptable->LedPin2 = smc_dpm_table->LedPin2;<br>
- smc_pptable->LedEnableMask = smc_dpm_table->LedEnableMask;<br>
- smc_pptable->LedPcie = smc_dpm_table->LedPcie;<br>
- smc_pptable->LedError = smc_dpm_table->LedError;<br>
- smc_pptable->LedSpare1[0] = smc_dpm_table->LedSpare1[0];<br>
- smc_pptable->LedSpare1[1] = smc_dpm_table->LedSpare1[1];<br>
-<br>
- /* GFXCLK PLL Spread Spectrum */<br>
- smc_pptable->PllGfxclkSpreadEnabled = smc_dpm_table->PllGfxclkSpreadEnabled;<br>
- smc_pptable->PllGfxclkSpreadPercent = smc_dpm_table->PllGfxclkSpreadPercent;<br>
- smc_pptable->PllGfxclkSpreadFreq = smc_dpm_table->PllGfxclkSpreadFreq;<br>
-<br>
- /* GFXCLK DFLL Spread Spectrum */<br>
- smc_pptable->DfllGfxclkSpreadEnabled = smc_dpm_table->DfllGfxclkSpreadEnabled;<br>
- smc_pptable->DfllGfxclkSpreadPercent = smc_dpm_table->DfllGfxclkSpreadPercent;<br>
- smc_pptable->DfllGfxclkSpreadFreq = smc_dpm_table->DfllGfxclkSpreadFreq;<br>
-<br>
- /* UCLK Spread Spectrum */<br>
- smc_pptable->UclkSpreadEnabled = smc_dpm_table->UclkSpreadEnabled;<br>
- smc_pptable->UclkSpreadPercent = smc_dpm_table->UclkSpreadPercent;<br>
- smc_pptable->UclkSpreadFreq = smc_dpm_table->UclkSpreadFreq;<br>
-<br>
- /* FCLK Spred Spectrum */<br>
- smc_pptable->FclkSpreadEnabled = smc_dpm_table->FclkSpreadEnabled;<br>
- smc_pptable->FclkSpreadPercent = smc_dpm_table->FclkSpreadPercent;<br>
- smc_pptable->FclkSpreadFreq = smc_dpm_table->FclkSpreadFreq;<br>
-<br>
- /* Memory Config */<br>
- smc_pptable->MemoryChannelEnabled = smc_dpm_table->MemoryChannelEnabled;<br>
- smc_pptable->DramBitWidth = smc_dpm_table->DramBitWidth;<br>
- smc_pptable->PaddingMem1[0] = smc_dpm_table->PaddingMem1[0];<br>
- smc_pptable->PaddingMem1[1] = smc_dpm_table->PaddingMem1[1];<br>
- smc_pptable->PaddingMem1[2] = smc_dpm_table->PaddingMem1[2];<br>
-<br>
- /* Total board power */<br>
- smc_pptable->TotalBoardPower = smc_dpm_table->TotalBoardPower;<br>
- smc_pptable->BoardPowerPadding = smc_dpm_table->BoardPowerPadding;<br>
-<br>
- /* XGMI Training */<br>
- for (i = 0; i < NUM_XGMI_PSTATE_LEVELS; i++) {<br>
- smc_pptable->XgmiLinkSpeed[i] = smc_dpm_table->XgmiLinkSpeed[i];<br>
- smc_pptable->XgmiLinkWidth[i] = smc_dpm_table->XgmiLinkWidth[i];<br>
- smc_pptable->XgmiFclkFreq[i] = smc_dpm_table->XgmiFclkFreq[i];<br>
- smc_pptable->XgmiSocVoltage[i] = smc_dpm_table->XgmiSocVoltage[i];<br>
- }<br>
-<br>
+ sizeof(*smc_dpm_table) - sizeof(smc_dpm_table->table_header));<br>
+ <br>
return 0;<br>
}<br>
<br>
-- <br>
2.25.1<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&data=02%7C01%7Calexander.deucher%40amd.com%7Cbe47dcbc7575467cef3208d81808ddd3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637285773673894951&sdata=gWPsTKZfNVQ1ug0x182mDfLzsBLt%2FxK17kk69Rg6Hkw%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7Cbe47dcbc7575467cef3208d81808ddd3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637285773673894951&sdata=gWPsTKZfNVQ1ug0x182mDfLzsBLt%2FxK17kk69Rg6Hkw%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>