Skip to contentSkip to conversation

drm/amdgpu/powerplay: Apply avfs cks-off voltages on Polaris30

PATCH Superseded Kenneth Feng 2 participants 2 messages Dec 6, 2018 1 message not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/powerplay: Apply avfs cks-off voltages on Polaris30

Instead of EVV cks-off voltages, avfs cks-off voltages can avoid the overshoot voltages when switching sclk.

---
 drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h          | 2 ++
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h +2 -0
index 62f36ba..c1a99df 100644
@@ -386,6 +386,8 @@ typedef uint16_t PPSMC_Result;
 #define PPSMC_MSG_AgmResetPsm                 ((uint16_t) 0x403)
 #define PPSMC_MSG_ReadVftCell                 ((uint16_t) 0x404)
 
+#define PPSMC_MSG_ApplyAvfsCksOffVoltage      ((uint16_t) 0x415)
+
 #define PPSMC_MSG_GFX_CU_PG_ENABLE            ((uint16_t) 0x280)
 #define PPSMC_MSG_GFX_CU_PG_DISABLE           ((uint16_t) 0x281)
 #define PPSMC_MSG_GetCurrPkgPwr               ((uint16_t) 0x282)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +9 -0
index 94898b2..6012dbf 100644
@@ -1988,6 +1988,7 @@ static int polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
 int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
+	struct amdgpu_device *adev = (struct amdgpu_device *)hwmgr->adev;
 
 	if (!hwmgr->avfs_supported)
 		return 0;
@@ -1997,6 +1998,14 @@ int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 
 	smum_send_msg_to_smc(hwmgr, PPSMC_MSG_EnableAvfs);
 
+	/* P30 case for applying Avfs cks-off voltages to avoid the overshoot
+	 * when switching to the highest sclk frequency
+	 */
+	if ((adev->pdev->device == 0x67df) &&
+		((adev->pdev->revision == 0xe1) ||
+		(adev->pdev->revision == 0xf7)))
+		smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ApplyAvfsCksOffVoltage);
+
 	return 0;
 }
 
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): 1544076690-31117-1-git-send-email-kenneth.feng-5C7GfCeVMHo@public.gmane.org

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

Instead of EVV cks-off voltages, avfs cks-off voltages can avoid the overshoot voltages when switching sclk.

Quoted 48 lines
---
 drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h          | 2 ++
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h +2 -0
index 62f36ba..c1a99df 100644
@@ -386,6 +386,8 @@ typedef uint16_t PPSMC_Result;
 #define PPSMC_MSG_AgmResetPsm                 ((uint16_t) 0x403)
 #define PPSMC_MSG_ReadVftCell                 ((uint16_t) 0x404)
 
+#define PPSMC_MSG_ApplyAvfsCksOffVoltage      ((uint16_t) 0x415)
+
 #define PPSMC_MSG_GFX_CU_PG_ENABLE            ((uint16_t) 0x280)
 #define PPSMC_MSG_GFX_CU_PG_DISABLE           ((uint16_t) 0x281)
 #define PPSMC_MSG_GetCurrPkgPwr               ((uint16_t) 0x282)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +9 -1
index 94898b2..6012dbf 100644
@@ -1988,6 +1988,7 @@ static int polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
 int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 {
        struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
+       struct amdgpu_device *adev = (struct amdgpu_device *)hwmgr->adev;
 
        if (!hwmgr->avfs_supported)
                return 0;
@@ -1997,6 +1998,14 @@ int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 
        smum_send_msg_to_smc(hwmgr, PPSMC_MSG_EnableAvfs);
 
+       /* P30 case for applying Avfs cks-off voltages to avoid the overshoot
+        * when switching to the highest sclk frequency
+        */
+       if ((adev->pdev->device == 0x67df) &&
+               ((adev->pdev->revision == 0xe1) ||
+               (adev->pdev->revision == 0xf7)))
+               smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ApplyAvfsCksOffVoltage);
+
        return 0;
 }
 
--

2.7.4

Quoted 4 lines

_______________________________________________
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