drm/amd/pm: enable more dpm features for SMU 13.0.0
Subsystems (3)
PATCH 1/6 drm/amd/pm: enable more dpm features for SMU 13.0.0
Enable MP0CLK DPM and FW Dstate since they are already supported by latest 78.36.0 PMFW.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +3 -0
@@ -296,6 +296,9 @@ smu_v13_0_0_get_allowed_feature_mask(struct smu_context *smu, *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_BACO_BIT ); + *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_DPM_MP0CLK_BIT ); + *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_FW_DSTATE_BIT ); +return 0 ; }
Signature · 1 line
2.29.0
PATCH 2/6 drm/amd/pm: skip dpm disablement on suspend for SMU 13.0.0
Since PMFW will handle this properly. Driver involvement is unnecessary.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
@@ -1436,6 +1436,7 @@ static int smu_disable_dpms(struct smu_context *smu)case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,5 ):case IP_VERSION (11 ,0 ,9 ): +case IP_VERSION (13 ,0 ,0 ):return 0 ;default :break ;
Signature · 1 line
2.29.0
PATCH 3/6 drm/amd/pm: update SMU 13.0.0 driver_if header
In reply to Evan QuanTo align with 78.37.0 and later PMFWs.
--- .../inc/pmfw_if/smu13_driver_if_v13_0_0.h | 22 +++++++++---------- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h +10 -12
@@ -671,8 +671,8 @@ typedef struct {uint16_t reserved[2 ];//Frequency changes -uint16_t GfxclkFmin;// MHz -uint16_t GfxclkFmax;// MHz +int16_t GfxclkFmin;// MHz +int16_t GfxclkFmax;// MHz uint16_t UclkFmin;// MHz uint16_t UclkFmax;// MHz
@@ -683,15 +683,14 @@ typedef struct {//Fan control uint8_t FanLinearPwmPoints[NUM_OD_FAN_MAX_POINTS ];uint8_t FanLinearTempPoints[NUM_OD_FAN_MAX_POINTS ]; -uint16_t FanMaximumRpm;uint16_t FanMinimumPwm; -uint16_t FanAcousticLimitRpm; +uint16_t AcousticTargetRpmThreshold; +uint16_t AcousticLimitRpmThreshold;uint16_t FanTargetTemperature;// Degree Celcius uint8_t FanZeroRpmEnable;uint8_t FanZeroRpmStopTemp;uint8_t FanMode; -uint8_t Padding[1 ]; - +uint8_t MaxOpTemp;uint32_t Spare[13 ];uint32_t MmHubPadding[8 ];// SMU internal use. Adding here instead of external as a workaround
@@ -719,15 +718,14 @@ typedef struct {uint8_t FanLinearPwmPoints;uint8_t FanLinearTempPoints; -uint16_t FanMaximumRpm;uint16_t FanMinimumPwm; -uint16_t FanAcousticLimitRpm; +uint16_t AcousticTargetRpmThreshold; +uint16_t AcousticLimitRpmThreshold;uint16_t FanTargetTemperature;// Degree Celcius uint8_t FanZeroRpmEnable;uint8_t FanZeroRpmStopTemp;uint8_t FanMode; -uint8_t Padding[1 ]; - +uint8_t MaxOpTemp;uint32_t Spare[13 ];
@@ -997,7 +995,8 @@ typedef struct {uint16_t SocketPowerLimitAcTau[PPT_THROTTLER_COUNT ];// Time constant of LPF in ms uint16_t SocketPowerLimitDcTau[PPT_THROTTLER_COUNT ];// Time constant of LPF in ms -uint32_t SpareVmin[12 ]; +QuadraticInt_t Vmin_droop; +uint32_t SpareVmin[9 ];//SECTION: DPM Configuration 1
@@ -1286,7 +1285,6 @@ typedef struct {uint32_t PostVoltageSetBacoDelay;// in microseconds. Amount of time FW will wait after power good is established or PSI0 command is issued uint32_t BacoEntryDelay;// in milliseconds. Amount of time FW will wait to trigger BACO entry after receiving entry notification from OS -// SECTION: Board Reserved uint32_t BoardSpare[64 ];
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 -1
@@ -30,7 +30,7 @@#define SMU13_DRIVER_IF_VERSION_ALDE 0x08#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x04#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04 -#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0 0x27 +#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0 0x28#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x28#define SMU13_MODE1_RESET_WAIT_TIME_IN_MS 500 //500ms
Signature · 1 line
2.29.0
PATCH 4/6 drm/amd/pm: correct the softpptable ids used for SMU 13.0.0
In reply to Evan QuanTo better match with the pptable_id settings from VBIOS.
--- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +35 -12
@@ -218,13 +218,25 @@ int smu_v13_0_init_pptable_microcode(struct smu_context *smu) pptable_id == 3688) pptable_id =36881 ;/* -* Temporary solution for SMU V13.0.0: -* - use 99991 signed pptable when SCPM enabled -* TODO: drop this when the pptable carried in vbios -* is ready. +* Temporary solution for SMU V13.0.0 with SCPM enabled: +* - use 36831 signed pptable when pp_table_id is 3683 +* - use 36641 signed pptable when pp_table_id is 3664 or 0 +* TODO: drop these when the pptable carried in vbios is ready. */ -if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,0 )) - pptable_id =99991 ; +if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,0 )) { +switch (pptable_id) { +case 0 : +case 3664 : + pptable_id =36641 ; +break ; +case 3683 : + pptable_id =36831 ; +break ; +default : +dev_err (adev->dev,"Unsupported pptable id %d\n" , pptable_id); +return -EINVAL ; + } + } }/* "pptable_id == 0" means vbios carries the pptable. */
@@ -448,13 +460,24 @@ int smu_v13_0_setup_pptable(struct smu_context *smu) pptable_id = smu->smu_table.boot_values.pp_table_id;/* -* Temporary solution for SMU V13.0.0: -* - use 9999 unsigned pptable when SCPM disabled -* TODO: drop this when the pptable carried in vbios -* is ready. +* Temporary solution for SMU V13.0.0 with SCPM disabled: +* - use 3664 or 3683 on request +* - use 3664 when pptable_id is 0 +* TODO: drop these when the pptable carried in vbios is ready. */ -if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,0 )) - pptable_id =9999 ; +if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,0 )) { +switch (pptable_id) { +case 0 : + pptable_id =3664 ; +break ; +case 3664 : +case 3683 : +break ; +default : +dev_err (adev->dev,"Unsupported pptable id %d\n" , pptable_id); +return -EINVAL ; + } + } }/* force using vbios pptable in sriov mode */
Signature · 1 line
2.29.0
PATCH 5/6 drm/amd/pm: enable more dpm features for SMU 13.0.0
In reply to Evan QuanEnable OOB Monitor and SOC CG which are ready since 78.38.0.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +3 -0
@@ -299,6 +299,9 @@ smu_v13_0_0_get_allowed_feature_mask(struct smu_context *smu, *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_DPM_MP0CLK_BIT ); *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_FW_DSTATE_BIT ); + *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_OUT_OF_BAND_MONITOR_BIT ); + *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_SOC_CG_BIT ); +return 0 ; }
Signature · 1 line
2.29.0
PATCH 6/6 drm/amd/pm: enable memory temp reading for SMU 13.0.0
In reply to Evan QuanWith the latest vbios, the memory temp reading is working.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +0 -2
@@ -275,9 +275,7 @@ smu_v13_0_0_get_allowed_feature_mask(struct smu_context *smu, *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_VDDIO_MEM_SCALING_BIT ); } -#if 0 *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_MEM_TEMP_READ_BIT ); -#endif if (adev->pm.pp_feature &PP_SCLK_DEEP_SLEEP_MASK ) *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_DS_GFXCLK_BIT );
Signature · 1 line
2.29.0