drm/amd/pm: ac/dc change for smu_v13_0
fixed the issue: gpu runs in dc mode but it is expected to be in ac mode. this causes the lower performance on smu_v13_0 Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9a23fcf79d
commit
c028d66e6e
@ -128,7 +128,12 @@
|
||||
#define PPSMC_MSG_EnableAudioStutterWA 0x44
|
||||
#define PPSMC_MSG_PowerUpUmsch 0x45
|
||||
#define PPSMC_MSG_PowerDownUmsch 0x46
|
||||
#define PPSMC_Message_Count 0x4C
|
||||
|
||||
#define PPSMC_MSG_SetDcsArch 0x47
|
||||
#define PPSMC_MSG_TriggerVFFLR 0x48
|
||||
#define PPSMC_MSG_SetNumBadMemoryPagesRetired 0x49
|
||||
#define PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel 0x4A
|
||||
#define PPSMC_MSG_SetPriorityDeltaGain 0x4B
|
||||
#define PPSMC_MSG_AllowIHHostInterrupt 0x4C
|
||||
#define PPSMC_Message_Count 0x4D
|
||||
|
||||
#endif
|
||||
|
@ -74,6 +74,7 @@
|
||||
__SMU_DUMMY_MAP(OverDriveSetPercentage), \
|
||||
__SMU_DUMMY_MAP(SetMinDeepSleepDcefclk), \
|
||||
__SMU_DUMMY_MAP(ReenableAcDcInterrupt), \
|
||||
__SMU_DUMMY_MAP(AllowIHHostInterrupt), \
|
||||
__SMU_DUMMY_MAP(NotifyPowerSource), \
|
||||
__SMU_DUMMY_MAP(SetUclkFastSwitch), \
|
||||
__SMU_DUMMY_MAP(SetUclkDownHyst), \
|
||||
|
@ -1084,9 +1084,35 @@ int smu_v13_0_set_power_limit(struct smu_context *smu,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int smu_v13_0_allow_ih_interrupt(struct smu_context *smu)
|
||||
{
|
||||
return smu_cmn_send_smc_msg(smu,
|
||||
SMU_MSG_AllowIHHostInterrupt,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static int smu_v13_0_process_pending_interrupt(struct smu_context *smu)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (smu->dc_controlled_by_gpio &&
|
||||
smu_cmn_feature_is_enabled(smu, SMU_FEATURE_ACDC_BIT))
|
||||
ret = smu_v13_0_allow_ih_interrupt(smu);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int smu_v13_0_enable_thermal_alert(struct smu_context *smu)
|
||||
{
|
||||
return amdgpu_irq_get(smu->adev, &smu->irq_source, 0);
|
||||
int ret = 0;
|
||||
|
||||
if (smu->smu_table.thermal_controller_type) {
|
||||
ret = amdgpu_irq_get(smu->adev, &smu->irq_source, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return smu_v13_0_process_pending_interrupt(smu);
|
||||
}
|
||||
|
||||
int smu_v13_0_disable_thermal_alert(struct smu_context *smu)
|
||||
|
@ -111,6 +111,8 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] =
|
||||
MSG_MAP(PowerDownJpeg, PPSMC_MSG_PowerDownJpeg, 0),
|
||||
MSG_MAP(GetDcModeMaxDpmFreq, PPSMC_MSG_GetDcModeMaxDpmFreq, 1),
|
||||
MSG_MAP(OverridePcieParameters, PPSMC_MSG_OverridePcieParameters, 0),
|
||||
MSG_MAP(ReenableAcDcInterrupt, PPSMC_MSG_ReenableAcDcInterrupt, 0),
|
||||
MSG_MAP(AllowIHHostInterrupt, PPSMC_MSG_AllowIHHostInterrupt, 0),
|
||||
MSG_MAP(DramLogSetDramAddrHigh, PPSMC_MSG_DramLogSetDramAddrHigh, 0),
|
||||
MSG_MAP(DramLogSetDramAddrLow, PPSMC_MSG_DramLogSetDramAddrLow, 0),
|
||||
MSG_MAP(DramLogSetDramSize, PPSMC_MSG_DramLogSetDramSize, 0),
|
||||
|
Loading…
x
Reference in New Issue
Block a user