drm/amd/swsmu: Update smu v14.0.0 headers to be 14.0.1 compatible
Subsystems (3)
Alex Deucher
maintainerPATCH 1/2 drm/amd/swsmu: Update smu v14.0.0 headers to be 14.0.1 compatible
From: lima1002 <[email protected]>
update ppsmc.h pmfw.h and driver_if.h for smu v14_0_1
Signed-off-by lima1002 <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- .../inc/pmfw_if/smu14_driver_if_v14_0_0.h | 33 +- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_pmfw.h | 55 ++- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_ppsmc.h | 18 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h | 1 + .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 +- .../drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 347 ++++++++++++++++-- 6 files changed, 413 insertions(+), 43 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0_0.h +32 -1
@@ -144,6 +144,37 @@ typedef struct {uint32_t MaxGfxClk; } DpmClocks_t; +//Freq in MHz +//Voltage in milli volts with 2 fractional bits +typedef struct { +uint32_t DcfClocks[NUM_DCFCLK_DPM_LEVELS ]; +uint32_t DispClocks[NUM_DISPCLK_DPM_LEVELS ]; +uint32_t DppClocks[NUM_DPPCLK_DPM_LEVELS ]; +uint32_t SocClocks[NUM_SOCCLK_DPM_LEVELS ]; +uint32_t VClocks0[NUM_VCN_DPM_LEVELS ]; +uint32_t VClocks1[NUM_VCN_DPM_LEVELS ]; +uint32_t DClocks0[NUM_VCN_DPM_LEVELS ]; +uint32_t DClocks1[NUM_VCN_DPM_LEVELS ]; +uint32_t VPEClocks[NUM_VPE_DPM_LEVELS ]; +uint32_t FclkClocks_Freq[NUM_FCLK_DPM_LEVELS ]; +uint32_t FclkClocks_Voltage[NUM_FCLK_DPM_LEVELS ]; +uint32_t SocVoltage[NUM_SOC_VOLTAGE_LEVELS ]; +MemPstateTable_t MemPstateTable[NUM_MEM_PSTATE_LEVELS ]; + +uint8_t NumDcfClkLevelsEnabled; +uint8_t NumDispClkLevelsEnabled;//Applies to both Dispclk and Dppclk +uint8_t NumSocClkLevelsEnabled; +uint8_t Vcn0ClkLevelsEnabled;//Applies to both Vclk0 and Dclk0 +uint8_t Vcn1ClkLevelsEnabled;//Applies to both Vclk1 and Dclk1 +uint8_t VpeClkLevelsEnabled; +uint8_t NumMemPstatesEnabled; +uint8_t NumFclkLevelsEnabled; +uint8_t spare; + +uint32_t MinGfxClk; +uint32_t MaxGfxClk; +}DpmClocks_t_v14_0_1 ; + typedef struct { uint16_t CoreFrequency[16]; //Target core frequency [MHz] uint16_t CorePower[16]; //CAC calculated core power [mW]
@@ -224,7 +255,7 @@ typedef enum {#define TABLE_CUSTOM_DPM 2 // Called by Driver#define TABLE_BIOS_GPIO_CONFIG 3 // Called by BIOS#define TABLE_DPMCLOCKS 4 // Called by Driver and VBIOS -#define TABLE_SPARE0 5 // Unused +#define TABLE_MOMENTARY_PM 5 // Called by Tools#define TABLE_MODERN_STDBY 6 // Called by Tools for Modern Standby Log#define TABLE_SMU_METRICS 7 // Called by Driver and SMF/PMF#define TABLE_COUNT 8
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v14_0_0_pmfw.h +46 -9
95 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v14_0_0_ppsmc.h +8 -10
@@ -72,23 +72,19 @@#define PPSMC_MSG_SetHardMinSocclkByFreq 0x13 ///< Set hard min for SOC CLK#define PPSMC_MSG_SetSoftMinFclk 0x14 ///< Set hard min for FCLK#define PPSMC_MSG_SetSoftMinVcn0 0x15 ///< Set soft min for VCN0 clocks (VCLK0 and DCLK0) -#define PPSMC_MSG_EnableGfxImu 0x16 ///< Enable GFX IMU - -#define PPSMC_MSG_spare_0x17 0x17 -#define PPSMC_MSG_spare_0x18 0x18 +#define PPSMC_MSG_spare_0x17 0x17 ///< Get GFX clock frequency +#define PPSMC_MSG_spare_0x18 0x18 ///< Get FCLK frequency#define PPSMC_MSG_AllowGfxOff 0x19 ///< Inform PMFW of allowing GFXOFF entry#define PPSMC_MSG_DisallowGfxOff 0x1A ///< Inform PMFW of disallowing GFXOFF entry#define PPSMC_MSG_SetSoftMaxGfxClk 0x1B ///< Set soft max for GFX CLK#define PPSMC_MSG_SetHardMinGfxClk 0x1C ///< Set hard min for GFX CLK -#define PPSMC_MSG_SetSoftMaxSocclkByFreq 0x1D ///< Set soft max for SOC CLK#define PPSMC_MSG_SetSoftMaxFclkByFreq 0x1E ///< Set soft max for FCLK#define PPSMC_MSG_SetSoftMaxVcn0 0x1F ///< Set soft max for VCN0 clocks (VCLK0 and DCLK0) -#define PPSMC_MSG_spare_0x20 0x20 +#define PPSMC_MSG_spare_0x20 0x20 ///< Set power limit percentage#define PPSMC_MSG_PowerDownJpeg0 0x21 ///< Power down Jpeg of VCN0#define PPSMC_MSG_PowerUpJpeg0 0x22 ///< Power up Jpeg of VCN0; VCN0 is power gated by default -#define PPSMC_MSG_SetHardMinFclkByFreq 0x23 ///< Set hard min for FCLK#define PPSMC_MSG_SetSoftMinSocclkByFreq 0x24 ///< Set soft min for SOC CLK#define PPSMC_MSG_AllowZstates 0x25 ///< Inform PMFM of allowing Zstate entry, i.e. no Miracast activity
@@ -99,8 +95,8 @@#define PPSMC_MSG_PowerUpIspByTile 0x2A ///< This message is used to power up ISP tiles and enable the ISP DPM#define PPSMC_MSG_SetHardMinIspiclkByFreq 0x2B ///< Set HardMin by frequency for ISPICLK#define PPSMC_MSG_SetHardMinIspxclkByFreq 0x2C ///< Set HardMin by frequency for ISPXCLK -#define PPSMC_MSG_PowerDownUmsch 0x2D ///< Power down VCN.UMSCH (aka VSCH) scheduler -#define PPSMC_MSG_PowerUpUmsch 0x2E ///< Power up VCN.UMSCH (aka VSCH) scheduler +#define PPSMC_MSG_PowerDownUmsch 0x2D ///< Power down VCN0.UMSCH (aka VSCH) scheduler +#define PPSMC_MSG_PowerUpUmsch 0x2E ///< Power up VCN0.UMSCH (aka VSCH) scheduler#define PPSMC_Message_IspStutterOn_MmhubPgDis 0x2F ///< ISP StutterOn mmHub PgDis#define PPSMC_Message_IspStutterOff_MmhubPgEn 0x30 ///< ISP StufferOff mmHub PgEn#define PPSMC_MSG_PowerUpVpe 0x31 ///< Power up VPE
@@ -110,7 +106,9 @@#define PPSMC_MSG_DisableLSdma 0x35 ///< Disable LSDMA#define PPSMC_MSG_SetSoftMaxVpe 0x36 ///<#define PPSMC_MSG_SetSoftMinVpe 0x37 ///< -#define PPSMC_Message_Count 0x38 ///< Total number of PPSMC messages +#define PPSMC_MSG_AllocMALLCache 0x38 ///< Allocating MALL Cache +#define PPSMC_MSG_ReleaseMALLCache 0x39 ///< Releasing MALL Cache +#define PPSMC_Message_Count 0x3A ///< Total number of PPSMC messages/** @}*/ /**
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h +1 -0
@@ -27,6 +27,7 @@#define SMU14_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_0 0x7 +#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_1 0x6#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_2 0x1#define FEATURE_MASK (feature) (1ULL << feature)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +1 -1
@@ -234,7 +234,7 @@ int smu_v14_0_check_fw_version(struct smu_context *smu) smu->smc_driver_if_version =SMU14_DRIVER_IF_VERSION_SMU_V14_0_0 ;break ;case IP_VERSION (14 ,0 ,1 ): - smu->smc_driver_if_version =SMU14_DRIVER_IF_VERSION_SMU_V14_0_0 ; + smu->smc_driver_if_version =SMU14_DRIVER_IF_VERSION_SMU_V14_0_1 ;break ;default :
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +325 -22
497 lines not on this page · raw message
Signature · 1 line
2.44.0
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu: add smu 14.0.1 discovery support
From: Yifan Zhang <[email protected]>
This patch to add smu 14.0.1 support
Signed-off-by Yifan Zhang <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -1905,6 +1905,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &smu_v13_0_ip_block);break ;case IP_VERSION (14 ,0 ,0 ): +case IP_VERSION (14 ,0 ,1 ):amdgpu_device_ip_block_add (adev, &smu_v14_0_ip_block);break ;default :
Signature · 1 line
2.44.0