Skip to contentSkip to conversation

drm/amd/powerplay: add registry key to disable ACG

PATCH In review Kenneth Feng 2 participants 2 messages Apr 20, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amd/powerplay: add registry key to disable ACG

For the dummy ACG fuses,need to disable ACG, otherwise corruption will be caused.

Change-Id Ic32b138720cada2de510cbda607c681ad409e748
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c | 5 +++++
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h                    | 1 +
 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c +5 -0
index 7fa1ba8..888ddca 100644
@@ -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;
 }
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
index 9b3dd7d..2f203ec 100644
@@ -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 {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1524205489-1966-1-git-send-email-kenneth.feng-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 5 lines · Kenneth Feng

For the dummy ACG fuses,need to disable ACG, otherwise corruption will be caused.

Change-Id Ic32b138720cada2de510cbda607c681ad409e748
Quoted 40 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c | 5 +++++
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h                    | 1 +
 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_processpptables.c +5 -0
index 7fa1ba8..888ddca 100644
@@ -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;
 }
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
index 9b3dd7d..2f203ec 100644
@@ -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 {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx