Commit ca8ff8fc authored by Lang Yu's avatar Lang Yu Committed by Alex Deucher

drm/amdgpu: update SMU driver interface for cyan skilfish(v3)

Add SmuMetrics_t definition for cyan skilfish.

v2: update SmuMetrics_t definition.
v3: cleanup and rearrange the order of fields.
Signed-off-by: default avatarLang Yu <lang.yu@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c7c6b86a
...@@ -33,63 +33,47 @@ ...@@ -33,63 +33,47 @@
#define TABLE_PMSTATUSLOG 3 // Called by Tools for Agm logging #define TABLE_PMSTATUSLOG 3 // Called by Tools for Agm logging
#define TABLE_DPMCLOCKS 4 // Called by Driver; defined here, but not used, for backward compatible #define TABLE_DPMCLOCKS 4 // Called by Driver; defined here, but not used, for backward compatible
#define TABLE_MOMENTARY_PM 5 // Called by Tools; defined here, but not used, for backward compatible #define TABLE_MOMENTARY_PM 5 // Called by Tools; defined here, but not used, for backward compatible
#define TABLE_COUNT 6 #define TABLE_SMU_METRICS 6 // Called by Driver
#define TABLE_COUNT 7
#define NUM_DSPCLK_LEVELS 8 typedef struct SmuMetricsTable_t {
#define NUM_SOCCLK_DPM_LEVELS 8 //CPU status
#define NUM_DCEFCLK_DPM_LEVELS 4 uint16_t CoreFrequency[6]; //[MHz]
#define NUM_FCLK_DPM_LEVELS 4 uint32_t CorePower[6]; //[mW]
#define NUM_MEMCLK_DPM_LEVELS 4 uint16_t CoreTemperature[6]; //[centi-Celsius]
uint16_t L3Frequency[2]; //[MHz]
uint16_t L3Temperature[2]; //[centi-Celsius]
uint16_t C0Residency[6]; //Percentage
#define NUMBER_OF_PSTATES 8 // GFX status
#define NUMBER_OF_CORES 8 uint16_t GfxclkFrequency; //[MHz]
uint16_t GfxTemperature; //[centi-Celsius]
typedef enum { // SOC IP info
S3_TYPE_ENTRY, uint16_t SocclkFrequency; //[MHz]
S5_TYPE_ENTRY, uint16_t VclkFrequency; //[MHz]
} Sleep_Type_e; uint16_t DclkFrequency; //[MHz]
uint16_t MemclkFrequency; //[MHz]
typedef enum { // power, VF info for CPU/GFX telemetry rails, and then socket power total
GFX_OFF = 0, uint32_t Voltage[2]; //[mV] indices: VDDCR_VDD, VDDCR_GFX
GFX_ON = 1, uint32_t Current[2]; //[mA] indices: VDDCR_VDD, VDDCR_GFX
} GFX_Mode_e; uint32_t Power[2]; //[mW] indices: VDDCR_VDD, VDDCR_GFX
uint32_t CurrentSocketPower; //[mW]
typedef enum { uint16_t SocTemperature; //[centi-Celsius]
CPU_P0 = 0, uint16_t EdgeTemperature;
CPU_P1, uint16_t ThrottlerStatus;
CPU_P2, uint16_t Spare;
CPU_P3,
CPU_P4,
CPU_P5,
CPU_P6,
CPU_P7
} CPU_PState_e;
typedef enum { } SmuMetricsTable_t;
CPU_CORE0 = 0,
CPU_CORE1,
CPU_CORE2,
CPU_CORE3,
CPU_CORE4,
CPU_CORE5,
CPU_CORE6,
CPU_CORE7
} CORE_ID_e;
typedef enum { typedef struct SmuMetrics_t {
DF_DPM0 = 0, SmuMetricsTable_t Current;
DF_DPM1, SmuMetricsTable_t Average;
DF_DPM2, uint32_t SampleStartTime;
DF_DPM3, uint32_t SampleStopTime;
DF_PState_Count uint32_t Accnt;
} DF_PState_e; } SmuMetrics_t;
typedef enum {
GFX_DPM0 = 0,
GFX_DPM1,
GFX_DPM2,
GFX_DPM3,
GFX_PState_Count
} GFX_PState_e;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment