drivers/gpu/drm/amd/pm/powerplay/inc/smu7_ppsmc.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/pm/powerplay/inc/smu7_ppsmc.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/pm/powerplay/inc/smu7_ppsmc.h
Extension
.h
Size
22918 bytes
Lines
428
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef DGPU_VI_PP_SMC_H
#define DGPU_VI_PP_SMC_H


#pragma pack(push, 1)

#define PPSMC_MSG_SetGBDroopSettings          ((uint16_t) 0x305)

#define PPSMC_SWSTATE_FLAG_DC                           0x01
#define PPSMC_SWSTATE_FLAG_UVD                          0x02
#define PPSMC_SWSTATE_FLAG_VCE                          0x04

#define PPSMC_THERMAL_PROTECT_TYPE_INTERNAL             0x00
#define PPSMC_THERMAL_PROTECT_TYPE_EXTERNAL             0x01
#define PPSMC_THERMAL_PROTECT_TYPE_NONE                 0xff

#define PPSMC_SYSTEMFLAG_GPIO_DC                        0x01
#define PPSMC_SYSTEMFLAG_STEPVDDC                       0x02
#define PPSMC_SYSTEMFLAG_GDDR5                          0x04

#define PPSMC_SYSTEMFLAG_DISABLE_BABYSTEP               0x08

#define PPSMC_SYSTEMFLAG_REGULATOR_HOT                  0x10
#define PPSMC_SYSTEMFLAG_REGULATOR_HOT_ANALOG           0x20

#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_MASK              0x07
#define PPSMC_EXTRAFLAGS_AC2DC_DONT_WAIT_FOR_VBLANK     0x08

#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_GOTODPMLOWSTATE   0x00
#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_GOTOINITIALSTATE  0x01


#define PPSMC_DPM2FLAGS_TDPCLMP                         0x01
#define PPSMC_DPM2FLAGS_PWRSHFT                         0x02
#define PPSMC_DPM2FLAGS_OCP                             0x04


#define PPSMC_DISPLAY_WATERMARK_LOW                     0
#define PPSMC_DISPLAY_WATERMARK_HIGH                    1


#define PPSMC_STATEFLAG_AUTO_PULSE_SKIP    0x01
#define PPSMC_STATEFLAG_POWERBOOST         0x02
#define PPSMC_STATEFLAG_PSKIP_ON_TDP_FAULT 0x04
#define PPSMC_STATEFLAG_POWERSHIFT         0x08
#define PPSMC_STATEFLAG_SLOW_READ_MARGIN   0x10
#define PPSMC_STATEFLAG_DEEPSLEEP_THROTTLE 0x20
#define PPSMC_STATEFLAG_DEEPSLEEP_BYPASS   0x40


#define FDO_MODE_HARDWARE 0
#define FDO_MODE_PIECE_WISE_LINEAR 1

enum FAN_CONTROL {
	FAN_CONTROL_FUZZY,
	FAN_CONTROL_TABLE
};


#define PPSMC_Result_OK             ((uint16_t)0x01)
#define PPSMC_Result_NoMore         ((uint16_t)0x02)

#define PPSMC_Result_NotNow         ((uint16_t)0x03)
#define PPSMC_Result_Failed         ((uint16_t)0xFF)
#define PPSMC_Result_UnknownCmd     ((uint16_t)0xFE)
#define PPSMC_Result_UnknownVT      ((uint16_t)0xFD)

typedef uint16_t PPSMC_Result;

#define PPSMC_isERROR(x) ((uint16_t)0x80 & (x))


#define PPSMC_MSG_Halt                      ((uint16_t)0x10)
#define PPSMC_MSG_Resume                    ((uint16_t)0x11)
#define PPSMC_MSG_EnableDPMLevel            ((uint16_t)0x12)
#define PPSMC_MSG_ZeroLevelsDisabled        ((uint16_t)0x13)
#define PPSMC_MSG_OneLevelsDisabled         ((uint16_t)0x14)
#define PPSMC_MSG_TwoLevelsDisabled         ((uint16_t)0x15)
#define PPSMC_MSG_EnableThermalInterrupt    ((uint16_t)0x16)
#define PPSMC_MSG_RunningOnAC               ((uint16_t)0x17)
#define PPSMC_MSG_LevelUp                   ((uint16_t)0x18)
#define PPSMC_MSG_LevelDown                 ((uint16_t)0x19)
#define PPSMC_MSG_ResetDPMCounters          ((uint16_t)0x1a)
#define PPSMC_MSG_SwitchToSwState           ((uint16_t)0x20)
#define PPSMC_MSG_SwitchToSwStateLast       ((uint16_t)0x3f)
#define PPSMC_MSG_SwitchToInitialState      ((uint16_t)0x40)
#define PPSMC_MSG_NoForcedLevel             ((uint16_t)0x41)
#define PPSMC_MSG_ForceHigh                 ((uint16_t)0x42)
#define PPSMC_MSG_ForceMediumOrHigh         ((uint16_t)0x43)
#define PPSMC_MSG_SwitchToMinimumPower      ((uint16_t)0x51)

Annotation

Implementation Notes