Skip to content

Commit 9515e74

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/pm: update the driver-fw interface file for smu v14.0.2/3
update the driver-fw interface file for smu v14.0.2/3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 0642c95)
1 parent bf58f03 commit 9515e74

File tree

3 files changed

+102
-89
lines changed

3 files changed

+102
-89
lines changed

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h

Lines changed: 84 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#define SMU14_DRIVER_IF_V14_0_H
2626

2727
//Increment this version if SkuTable_t or BoardTable_t change
28-
#define PPTABLE_VERSION 0x18
28+
#define PPTABLE_VERSION 0x1B
2929

3030
#define NUM_GFXCLK_DPM_LEVELS 16
3131
#define NUM_SOCCLK_DPM_LEVELS 8
@@ -145,7 +145,7 @@ typedef enum {
145145
} FEATURE_BTC_e;
146146

147147
// Debug Overrides Bitmask
148-
#define DEBUG_OVERRIDE_DISABLE_VOLT_LINK_VCN_FCLK 0x00000001
148+
#define DEBUG_OVERRIDE_NOT_USE 0x00000001
149149
#define DEBUG_OVERRIDE_DISABLE_VOLT_LINK_DCN_FCLK 0x00000002
150150
#define DEBUG_OVERRIDE_DISABLE_VOLT_LINK_MP0_FCLK 0x00000004
151151
#define DEBUG_OVERRIDE_DISABLE_VOLT_LINK_VCN_DCFCLK 0x00000008
@@ -161,6 +161,7 @@ typedef enum {
161161
#define DEBUG_OVERRIDE_ENABLE_SOC_VF_BRINGUP_MODE 0x00002000
162162
#define DEBUG_OVERRIDE_ENABLE_PER_WGP_RESIENCY 0x00004000
163163
#define DEBUG_OVERRIDE_DISABLE_MEMORY_VOLTAGE_SCALING 0x00008000
164+
#define DEBUG_OVERRIDE_DFLL_BTC_FCW_LOG 0x00010000
164165

165166
// VR Mapping Bit Defines
166167
#define VR_MAPPING_VR_SELECT_MASK 0x01
@@ -391,6 +392,21 @@ typedef struct {
391392
EccInfo_t EccInfo[24];
392393
} EccInfoTable_t;
393394

395+
#define EPCS_HIGH_POWER 600
396+
#define EPCS_NORMAL_POWER 450
397+
#define EPCS_LOW_POWER 300
398+
#define EPCS_SHORTED_POWER 150
399+
#define EPCS_NO_BOOTUP 0
400+
401+
typedef enum{
402+
EPCS_SHORTED_LIMIT,
403+
EPCS_LOW_POWER_LIMIT,
404+
EPCS_NORMAL_POWER_LIMIT,
405+
EPCS_HIGH_POWER_LIMIT,
406+
EPCS_NOT_CONFIGURED,
407+
EPCS_STATUS_COUNT,
408+
} EPCS_STATUS_e;
409+
394410
//D3HOT sequences
395411
typedef enum {
396412
BACO_SEQUENCE,
@@ -662,7 +678,7 @@ typedef enum {
662678
} PP_GRTAVFS_FW_SEP_FUSE_e;
663679

664680
#define PP_NUM_RTAVFS_PWL_ZONES 5
665-
681+
#define PP_NUM_PSM_DIDT_PWL_ZONES 3
666682

667683
// VBIOS or PPLIB configures telemetry slope and offset. Only slope expected to be set for SVI3
668684
// Slope Q1.7, Offset Q1.2
@@ -746,10 +762,10 @@ typedef struct {
746762
uint16_t Padding;
747763

748764
//Frequency changes
749-
int16_t GfxclkFmin; // MHz
750-
int16_t GfxclkFmax; // MHz
751-
uint16_t UclkFmin; // MHz
752-
uint16_t UclkFmax; // MHz
765+
int16_t GfxclkFoffset;
766+
uint16_t Padding1;
767+
uint16_t UclkFmin;
768+
uint16_t UclkFmax;
753769
uint16_t FclkFmin;
754770
uint16_t FclkFmax;
755771

@@ -770,19 +786,23 @@ typedef struct {
770786
uint8_t MaxOpTemp;
771787

772788
uint8_t AdvancedOdModeEnabled;
773-
uint8_t Padding1[3];
789+
uint8_t Padding2[3];
774790

775791
uint16_t GfxVoltageFullCtrlMode;
776792
uint16_t SocVoltageFullCtrlMode;
777793
uint16_t GfxclkFullCtrlMode;
778794
uint16_t UclkFullCtrlMode;
779795
uint16_t FclkFullCtrlMode;
780-
uint16_t Padding2;
796+
uint16_t Padding3;
781797

782798
int16_t GfxEdc;
783799
int16_t GfxPccLimitControl;
784800

785-
uint32_t Spare[10];
801+
uint16_t GfxclkFmaxVmax;
802+
uint8_t GfxclkFmaxVmaxTemperature;
803+
uint8_t Padding4[1];
804+
805+
uint32_t Spare[9];
786806
uint32_t MmHubPadding[8]; // SMU internal use. Adding here instead of external as a workaround
787807
} OverDriveTable_t;
788808

@@ -802,8 +822,8 @@ typedef struct {
802822
uint16_t VddSocVmax;
803823

804824
//gfxclk
805-
int16_t GfxclkFmin; // MHz
806-
int16_t GfxclkFmax; // MHz
825+
int16_t GfxclkFoffset;
826+
uint16_t Padding;
807827
//uclk
808828
uint16_t UclkFmin; // MHz
809829
uint16_t UclkFmax; // MHz
@@ -828,7 +848,7 @@ typedef struct {
828848
uint8_t FanZeroRpmEnable;
829849
//temperature
830850
uint8_t MaxOpTemp;
831-
uint8_t Padding[2];
851+
uint8_t Padding1[2];
832852

833853
//Full Ctrl
834854
uint16_t GfxVoltageFullCtrlMode;
@@ -839,7 +859,7 @@ typedef struct {
839859
//EDC
840860
int16_t GfxEdc;
841861
int16_t GfxPccLimitControl;
842-
int16_t Padding1;
862+
int16_t Padding2;
843863

844864
uint32_t Spare[5];
845865
} OverDriveLimits_t;
@@ -987,8 +1007,9 @@ typedef struct {
9871007
uint16_t BaseClockDc;
9881008
uint16_t GameClockDc;
9891009
uint16_t BoostClockDc;
990-
991-
uint32_t Reserved[4];
1010+
uint16_t MaxReportedClock;
1011+
uint16_t Padding;
1012+
uint32_t Reserved[3];
9921013
} DriverReportedClocks_t;
9931014

9941015
typedef struct {
@@ -1132,7 +1153,7 @@ typedef struct {
11321153
uint32_t DcModeMaxFreq [PPCLK_COUNT ]; // In MHz
11331154

11341155
uint16_t GfxclkAibFmax;
1135-
uint16_t GfxclkFreqCap;
1156+
uint16_t GfxDpmPadding;
11361157

11371158
//GFX Idle Power Settings
11381159
uint16_t GfxclkFgfxoffEntry; // Entry in RLC stage (PLL), in Mhz
@@ -1172,8 +1193,7 @@ typedef struct {
11721193
uint32_t DvoFmaxLowScaler; //Unitless float
11731194

11741195
// GFX DCS
1175-
uint16_t DcsGfxOffVoltage; //Voltage in mV(Q2) applied to VDDGFX when entering DCS GFXOFF phase
1176-
uint16_t PaddingDcs;
1196+
uint32_t PaddingDcs;
11771197

11781198
uint16_t DcsMinGfxOffTime; //Minimum amount of time PMFW shuts GFX OFF as part of GFX DCS phase
11791199
uint16_t DcsMaxGfxOffTime; //Maximum amount of time PMFW can shut GFX OFF as part of GFX DCS phase at a stretch.
@@ -1205,8 +1225,7 @@ typedef struct {
12051225
uint16_t DalDcModeMaxUclkFreq;
12061226
uint8_t PaddingsMem[2];
12071227
//FCLK Section
1208-
uint16_t FclkDpmDisallowPstateFreq; //Frequency which FW will target when indicated that display config cannot support P-state. Set to 0 use FW calculated value
1209-
uint16_t PaddingFclk;
1228+
uint32_t PaddingFclk;
12101229

12111230
// Link DPM Settings
12121231
uint8_t PcieGenSpeed[NUM_LINK_LEVELS]; ///< 0:PciE-gen1 1:PciE-gen2 2:PciE-gen3 3:PciE-gen4 4:PciE-gen5
@@ -1215,12 +1234,19 @@ typedef struct {
12151234

12161235
// SECTION: VDD_GFX AVFS
12171236
uint8_t OverrideGfxAvfsFuses;
1218-
uint8_t GfxAvfsPadding[3];
1237+
uint8_t GfxAvfsPadding[1];
1238+
uint16_t DroopGBStDev;
12191239

12201240
uint32_t SocHwRtAvfsFuses[PP_GRTAVFS_HW_FUSE_COUNT]; //new added for Soc domain
12211241
uint32_t GfxL2HwRtAvfsFuses[PP_GRTAVFS_HW_FUSE_COUNT]; //see fusedoc for encoding
12221242
//uint32_t GfxSeHwRtAvfsFuses[PP_GRTAVFS_HW_FUSE_COUNT];
1223-
uint32_t spare_HwRtAvfsFuses[PP_GRTAVFS_HW_FUSE_COUNT];
1243+
1244+
uint16_t PsmDidt_Vcross[PP_NUM_PSM_DIDT_PWL_ZONES-1];
1245+
uint32_t PsmDidt_StaticDroop_A[PP_NUM_PSM_DIDT_PWL_ZONES];
1246+
uint32_t PsmDidt_StaticDroop_B[PP_NUM_PSM_DIDT_PWL_ZONES];
1247+
uint32_t PsmDidt_DynDroop_A[PP_NUM_PSM_DIDT_PWL_ZONES];
1248+
uint32_t PsmDidt_DynDroop_B[PP_NUM_PSM_DIDT_PWL_ZONES];
1249+
uint32_t spare_HwRtAvfsFuses[19];
12241250

12251251
uint32_t SocCommonRtAvfs[PP_GRTAVFS_FW_COMMON_FUSE_COUNT];
12261252
uint32_t GfxCommonRtAvfs[PP_GRTAVFS_FW_COMMON_FUSE_COUNT];
@@ -1246,11 +1272,7 @@ typedef struct {
12461272
uint32_t dGbV_dT_vmin;
12471273
uint32_t dGbV_dT_vmax;
12481274

1249-
//Unused: PMFW-9370
1250-
uint32_t V2F_vmin_range_low;
1251-
uint32_t V2F_vmin_range_high;
1252-
uint32_t V2F_vmax_range_low;
1253-
uint32_t V2F_vmax_range_high;
1275+
uint32_t PaddingV2F[4];
12541276

12551277
AvfsDcBtcParams_t DcBtcGfxParams;
12561278
QuadraticInt_t SSCurve_GFX;
@@ -1327,18 +1349,18 @@ typedef struct {
13271349
uint16_t PsmDidtReleaseTimer;
13281350
uint32_t PsmDidtStallPattern; //Will be written to both pattern 1 and didt_static_level_prog
13291351
// CAC EDC
1330-
uint32_t Leakage_C0; // in IEEE float
1331-
uint32_t Leakage_C1; // in IEEE float
1332-
uint32_t Leakage_C2; // in IEEE float
1333-
uint32_t Leakage_C3; // in IEEE float
1334-
uint32_t Leakage_C4; // in IEEE float
1335-
uint32_t Leakage_C5; // in IEEE float
1336-
uint32_t GFX_CLK_SCALAR; // in IEEE float
1337-
uint32_t GFX_CLK_INTERCEPT; // in IEEE float
1338-
uint32_t GFX_CAC_M; // in IEEE float
1339-
uint32_t GFX_CAC_B; // in IEEE float
1340-
uint32_t VDD_GFX_CurrentLimitGuardband; // in IEEE float
1341-
uint32_t DynToTotalCacScalar; // in IEEE
1352+
uint32_t CacEdcCacLeakageC0;
1353+
uint32_t CacEdcCacLeakageC1;
1354+
uint32_t CacEdcCacLeakageC2;
1355+
uint32_t CacEdcCacLeakageC3;
1356+
uint32_t CacEdcCacLeakageC4;
1357+
uint32_t CacEdcCacLeakageC5;
1358+
uint32_t CacEdcGfxClkScalar;
1359+
uint32_t CacEdcGfxClkIntercept;
1360+
uint32_t CacEdcCac_m;
1361+
uint32_t CacEdcCac_b;
1362+
uint32_t CacEdcCurrLimitGuardband;
1363+
uint32_t CacEdcDynToTotalCacRatio;
13421364
// GFX EDC XVMIN
13431365
uint32_t XVmin_Gfx_EdcThreshScalar;
13441366
uint32_t XVmin_Gfx_EdcEnableFreq;
@@ -1467,7 +1489,7 @@ typedef struct {
14671489
uint8_t VddqOffEnabled;
14681490
uint8_t PaddingUmcFlags[2];
14691491

1470-
uint32_t PostVoltageSetBacoDelay; // in microseconds. Amount of time FW will wait after power good is established or PSI0 command is issued
1492+
uint32_t Paddign1;
14711493
uint32_t BacoEntryDelay; // in milliseconds. Amount of time FW will wait to trigger BACO entry after receiving entry notification from OS
14721494

14731495
uint8_t FuseWritePowerMuxPresent;
@@ -1530,7 +1552,7 @@ typedef struct {
15301552
int16_t FuzzyFan_ErrorSetDelta;
15311553
int16_t FuzzyFan_ErrorRateSetDelta;
15321554
int16_t FuzzyFan_PwmSetDelta;
1533-
uint16_t FuzzyFan_Reserved;
1555+
uint16_t FanPadding2;
15341556

15351557
uint16_t FwCtfLimit[TEMP_COUNT];
15361558

@@ -1547,9 +1569,10 @@ typedef struct {
15471569
uint16_t FanSpare[1];
15481570
uint8_t FanIntakeSensorSupport;
15491571
uint8_t FanIntakePadding;
1550-
uint32_t FanAmbientPerfBoostThreshold;
15511572
uint32_t FanSpare2[12];
15521573

1574+
uint32_t ODFeatureCtrlMask;
1575+
15531576
uint16_t TemperatureLimit_Hynix; // In degrees Celsius. Memory temperature limit associated with Hynix
15541577
uint16_t TemperatureLimit_Micron; // In degrees Celsius. Memory temperature limit associated with Micron
15551578
uint16_t TemperatureFwCtfLimit_Hynix;
@@ -1637,7 +1660,7 @@ typedef struct {
16371660
uint16_t AverageDclk0Frequency ;
16381661
uint16_t AverageVclk1Frequency ;
16391662
uint16_t AverageDclk1Frequency ;
1640-
uint16_t PCIeBusy ;
1663+
uint16_t AveragePCIeBusy ;
16411664
uint16_t dGPU_W_MAX ;
16421665
uint16_t padding ;
16431666

@@ -1665,12 +1688,12 @@ typedef struct {
16651688

16661689
uint16_t AverageGfxActivity ;
16671690
uint16_t AverageUclkActivity ;
1668-
uint16_t Vcn0ActivityPercentage ;
1691+
uint16_t AverageVcn0ActivityPercentage;
16691692
uint16_t Vcn1ActivityPercentage ;
16701693

16711694
uint32_t EnergyAccumulator;
16721695
uint16_t AverageSocketPower;
1673-
uint16_t MovingAverageTotalBoardPower;
1696+
uint16_t AverageTotalBoardPower;
16741697

16751698
uint16_t AvgTemperature[TEMP_COUNT];
16761699
uint16_t AvgTemperatureFanIntake;
@@ -1684,7 +1707,8 @@ typedef struct {
16841707

16851708

16861709
uint8_t ThrottlingPercentage[THROTTLER_COUNT];
1687-
uint8_t padding1[3];
1710+
uint8_t VmaxThrottlingPercentage;
1711+
uint8_t padding1[2];
16881712

16891713
//metrics for D3hot entry/exit and driver ARM msgs
16901714
uint32_t D3HotEntryCountPerMode[D3HOT_SEQUENCE_COUNT];
@@ -1693,7 +1717,7 @@ typedef struct {
16931717

16941718
uint16_t ApuSTAPMSmartShiftLimit;
16951719
uint16_t ApuSTAPMLimit;
1696-
uint16_t MovingAvgApuSocketPower;
1720+
uint16_t AvgApuSocketPower;
16971721

16981722
uint16_t AverageUclkActivity_MAX;
16991723

@@ -1823,6 +1847,17 @@ typedef struct {
18231847
#define TABLE_TRANSFER_FAILED 0xFF
18241848
#define TABLE_TRANSFER_PENDING 0xAB
18251849

1850+
#define TABLE_PPT_FAILED 0x100
1851+
#define TABLE_TDC_FAILED 0x200
1852+
#define TABLE_TEMP_FAILED 0x400
1853+
#define TABLE_FAN_TARGET_TEMP_FAILED 0x800
1854+
#define TABLE_FAN_STOP_TEMP_FAILED 0x1000
1855+
#define TABLE_FAN_START_TEMP_FAILED 0x2000
1856+
#define TABLE_FAN_PWM_MIN_FAILED 0x4000
1857+
#define TABLE_ACOUSTIC_TARGET_RPM_FAILED 0x8000
1858+
#define TABLE_ACOUSTIC_LIMIT_RPM_FAILED 0x10000
1859+
#define TABLE_MGPU_ACOUSTIC_TARGET_RPM_FAILED 0x20000
1860+
18261861
// Table types
18271862
#define TABLE_PPTABLE 0
18281863
#define TABLE_COMBO_PPTABLE 1
@@ -1849,5 +1884,6 @@ typedef struct {
18491884
#define IH_INTERRUPT_CONTEXT_ID_THERMAL_THROTTLING 0x7
18501885
#define IH_INTERRUPT_CONTEXT_ID_FAN_ABNORMAL 0x8
18511886
#define IH_INTERRUPT_CONTEXT_ID_FAN_RECOVERY 0x9
1887+
#define IH_INTERRUPT_CONTEXT_ID_DYNAMIC_TABLE 0xA
18521888

18531889
#endif

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define SMU14_DRIVER_IF_VERSION_INV 0xFFFFFFFF
2929
#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_0 0x7
3030
#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_1 0x6
31-
#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_2 0x26
31+
#define SMU14_DRIVER_IF_VERSION_SMU_V14_0_2 0x2E
3232

3333
#define FEATURE_MASK(feature) (1ULL << feature)
3434

0 commit comments

Comments
 (0)