drm/amd/powerplay: add registry key to disable ACG
authorKenneth Feng <kenneth.feng@amd.com>
Fri, 20 Apr 2018 05:55:39 +0000 (13:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:43:35 +0000 (13:43 -0500)
For the dummy ACG fuses,need to disable ACG, otherwise
corruption will be caused.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

index 7fa1ba89ac54f6c6c07a6bea1605cc7bac575352..888ddca902d894216acee566879f239a47009468 100644 (file)
@@ -224,6 +224,11 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
        ppsmc_pptable->AcgGfxclkSpreadPercent = smc_dpm_table.acggfxclkspreadpercent;
        ppsmc_pptable->AcgGfxclkSpreadFreq = smc_dpm_table.acggfxclkspreadfreq;
 
+       /* 0xFFFF will disable the ACG feature */
+       if (!(hwmgr->feature_mask & PP_ACG_MASK)) {
+               ppsmc_pptable->AcgThresholdFreqHigh = 0xFFFF;
+               ppsmc_pptable->AcgThresholdFreqLow = 0xFFFF;
+       }
 
        return 0;
 }
index 9b3dd7dce4e2b02383a525bc06959b65c9085bcb..2f203ec3d19cf60bce73862414c47e2079758a8b 100644 (file)
@@ -82,6 +82,7 @@ enum PP_FEATURE_MASK {
        PP_SOCCLK_DPM_MASK = 0x1000,
        PP_DCEFCLK_DPM_MASK = 0x2000,
        PP_OVERDRIVE_MASK = 0x4000,
+       PP_ACG_MASK = 0x10000,
 };
 
 enum PHM_BackEnd_Magic {