Path: blob/master/drivers/gpu/drm/amd/pm/powerplay/inc/hardwaremanager.h
26552 views
/*1* Copyright 2015 Advanced Micro Devices, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21*/22#ifndef _HARDWARE_MANAGER_H_23#define _HARDWARE_MANAGER_H_24252627struct pp_hwmgr;28struct pp_hw_power_state;29struct pp_power_state;30enum amd_dpm_forced_level;31struct PP_TemperatureRange;323334struct phm_fan_speed_info {35uint32_t min_percent;36uint32_t max_percent;37uint32_t min_rpm;38uint32_t max_rpm;39bool supports_percent_read;40bool supports_percent_write;41bool supports_rpm_read;42bool supports_rpm_write;43};4445/* Automatic Power State Throttling */46enum PHM_AutoThrottleSource {47PHM_AutoThrottleSource_Thermal,48PHM_AutoThrottleSource_External49};5051typedef enum PHM_AutoThrottleSource PHM_AutoThrottleSource;5253enum phm_platform_caps {54PHM_PlatformCaps_AtomBiosPpV1 = 0,55PHM_PlatformCaps_PowerPlaySupport,56PHM_PlatformCaps_ACOverdriveSupport,57PHM_PlatformCaps_BacklightSupport,58PHM_PlatformCaps_ThermalController,59PHM_PlatformCaps_BiosPowerSourceControl,60PHM_PlatformCaps_DisableVoltageTransition,61PHM_PlatformCaps_DisableEngineTransition,62PHM_PlatformCaps_DisableMemoryTransition,63PHM_PlatformCaps_DynamicPowerManagement,64PHM_PlatformCaps_EnableASPML0s,65PHM_PlatformCaps_EnableASPML1,66PHM_PlatformCaps_OD5inACSupport,67PHM_PlatformCaps_OD5inDCSupport,68PHM_PlatformCaps_SoftStateOD5,69PHM_PlatformCaps_NoOD5Support,70PHM_PlatformCaps_ContinuousHardwarePerformanceRange,71PHM_PlatformCaps_ActivityReporting,72PHM_PlatformCaps_EnableBackbias,73PHM_PlatformCaps_OverdriveDisabledByPowerBudget,74PHM_PlatformCaps_ShowPowerBudgetWarning,75PHM_PlatformCaps_PowerBudgetWaiverAvailable,76PHM_PlatformCaps_GFXClockGatingSupport,77PHM_PlatformCaps_MMClockGatingSupport,78PHM_PlatformCaps_AutomaticDCTransition,79PHM_PlatformCaps_GeminiPrimary,80PHM_PlatformCaps_MemorySpreadSpectrumSupport,81PHM_PlatformCaps_EngineSpreadSpectrumSupport,82PHM_PlatformCaps_StepVddc,83PHM_PlatformCaps_DynamicPCIEGen2Support,84PHM_PlatformCaps_SMC,85PHM_PlatformCaps_FaultyInternalThermalReading, /* Internal thermal controller reports faulty temperature value when DAC2 is active */86PHM_PlatformCaps_EnableVoltageControl, /* indicates voltage can be controlled */87PHM_PlatformCaps_EnableSideportControl, /* indicates Sideport can be controlled */88PHM_PlatformCaps_VideoPlaybackEEUNotification, /* indicates EEU notification of video start/stop is required */89PHM_PlatformCaps_TurnOffPll_ASPML1, /* PCIE Turn Off PLL in ASPM L1 */90PHM_PlatformCaps_EnableHTLinkControl, /* indicates HT Link can be controlled by ACPI or CLMC overridden/automated mode. */91PHM_PlatformCaps_PerformanceStateOnly, /* indicates only performance power state to be used on current system. */92PHM_PlatformCaps_ExclusiveModeAlwaysHigh, /* In Exclusive (3D) mode always stay in High state. */93PHM_PlatformCaps_DisableMGClockGating, /* to disable Medium Grain Clock Gating or not */94PHM_PlatformCaps_DisableMGCGTSSM, /* TO disable Medium Grain Clock Gating Shader Complex control */95PHM_PlatformCaps_UVDAlwaysHigh, /* In UVD mode always stay in High state */96PHM_PlatformCaps_DisablePowerGating, /* to disable power gating */97PHM_PlatformCaps_CustomThermalPolicy, /* indicates only performance power state to be used on current system. */98PHM_PlatformCaps_StayInBootState, /* Stay in Boot State, do not do clock/voltage or PCIe Lane and Gen switching (RV7xx and up). */99PHM_PlatformCaps_SMCAllowSeparateSWThermalState, /* SMC use separate SW thermal state, instead of the default SMC thermal policy. */100PHM_PlatformCaps_MultiUVDStateSupport, /* Powerplay state table supports multi UVD states. */101PHM_PlatformCaps_EnableSCLKDeepSleepForUVD, /* With HW ECOs, we don't need to disable SCLK Deep Sleep for UVD state. */102PHM_PlatformCaps_EnableMCUHTLinkControl, /* Enable HT link control by MCU */103PHM_PlatformCaps_ABM, /* ABM support.*/104PHM_PlatformCaps_KongThermalPolicy, /* A thermal policy specific for Kong */105PHM_PlatformCaps_SwitchVDDNB, /* if the users want to switch VDDNB */106PHM_PlatformCaps_ULPS, /* support ULPS mode either through ACPI state or ULPS state */107PHM_PlatformCaps_NativeULPS, /* hardware capable of ULPS state (other than through the ACPI state) */108PHM_PlatformCaps_EnableMVDDControl, /* indicates that memory voltage can be controlled */109PHM_PlatformCaps_ControlVDDCI, /* Control VDDCI separately from VDDC. */110PHM_PlatformCaps_DisableDCODT, /* indicates if DC ODT apply or not */111PHM_PlatformCaps_DynamicACTiming, /* if the SMC dynamically re-programs MC SEQ register values */112PHM_PlatformCaps_EnableThermalIntByGPIO, /* enable throttle control through GPIO */113PHM_PlatformCaps_BootStateOnAlert, /* Go to boot state on alerts, e.g. on an AC->DC transition. */114PHM_PlatformCaps_DontWaitForVBlankOnAlert, /* Do NOT wait for VBLANK during an alert (e.g. AC->DC transition). */115PHM_PlatformCaps_Force3DClockSupport, /* indicates if the platform supports force 3D clock. */116PHM_PlatformCaps_MicrocodeFanControl, /* Fan is controlled by the SMC microcode. */117PHM_PlatformCaps_AdjustUVDPriorityForSP,118PHM_PlatformCaps_DisableLightSleep, /* Light sleep for evergreen family. */119PHM_PlatformCaps_DisableMCLS, /* MC Light sleep */120PHM_PlatformCaps_RegulatorHot, /* Enable throttling on 'regulator hot' events. */121PHM_PlatformCaps_BACO, /* Support Bus Alive Chip Off mode */122PHM_PlatformCaps_DisableDPM, /* Disable DPM, supported from Llano */123PHM_PlatformCaps_DynamicM3Arbiter, /* support dynamically change m3 arbitor parameters */124PHM_PlatformCaps_SclkDeepSleep, /* support sclk deep sleep */125PHM_PlatformCaps_DynamicPatchPowerState, /* this ASIC supports to patch power state dynamically */126PHM_PlatformCaps_ThermalAutoThrottling, /* enabling auto thermal throttling, */127PHM_PlatformCaps_SumoThermalPolicy, /* A thermal policy specific for Sumo */128PHM_PlatformCaps_PCIEPerformanceRequest, /* support to change RC voltage */129PHM_PlatformCaps_BLControlledByGPU, /* support varibright */130PHM_PlatformCaps_PowerContainment, /* support DPM2 power containment (AKA TDP clamping) */131PHM_PlatformCaps_SQRamping, /* support DPM2 SQ power throttle */132PHM_PlatformCaps_CAC, /* support Capacitance * Activity power estimation */133PHM_PlatformCaps_NIChipsets, /* Northern Island and beyond chipsets */134PHM_PlatformCaps_TrinityChipsets, /* Trinity chipset */135PHM_PlatformCaps_EvergreenChipsets, /* Evergreen family chipset */136PHM_PlatformCaps_PowerControl, /* Cayman and beyond chipsets */137PHM_PlatformCaps_DisableLSClockGating, /* to disable Light Sleep control for HDP memories */138PHM_PlatformCaps_BoostState, /* this ASIC supports boost state */139PHM_PlatformCaps_UserMaxClockForMultiDisplays, /* indicates if max memory clock is used for all status when multiple displays are connected */140PHM_PlatformCaps_RegWriteDelay, /* indicates if back to back reg write delay is required */141PHM_PlatformCaps_NonABMSupportInPPLib, /* ABM is not supported in PPLIB, (moved from PPLIB to DAL) */142PHM_PlatformCaps_GFXDynamicMGPowerGating, /* Enable Dynamic MG PowerGating on Trinity */143PHM_PlatformCaps_DisableSMUUVDHandshake, /* Disable SMU UVD Handshake */144PHM_PlatformCaps_DTE, /* Support Digital Temperature Estimation */145PHM_PlatformCaps_W5100Specifc_SmuSkipMsgDTE, /* This is for the feature requested by David B., and Tonny W.*/146PHM_PlatformCaps_UVDPowerGating, /* enable UVD power gating, supported from Llano */147PHM_PlatformCaps_UVDDynamicPowerGating, /* enable UVD Dynamic power gating, supported from UVD5 */148PHM_PlatformCaps_VCEPowerGating, /* Enable VCE power gating, supported for TN and later ASICs */149PHM_PlatformCaps_SamuPowerGating, /* Enable SAMU power gating, supported for KV and later ASICs */150PHM_PlatformCaps_UVDDPM, /* UVD clock DPM */151PHM_PlatformCaps_VCEDPM, /* VCE clock DPM */152PHM_PlatformCaps_SamuDPM, /* SAMU clock DPM */153PHM_PlatformCaps_AcpDPM, /* ACP clock DPM */154PHM_PlatformCaps_SclkDeepSleepAboveLow, /* Enable SCLK Deep Sleep on all DPM states */155PHM_PlatformCaps_DynamicUVDState, /* Dynamic UVD State */156PHM_PlatformCaps_WantSAMClkWithDummyBackEnd, /* Set SAM Clk With Dummy Back End */157PHM_PlatformCaps_WantUVDClkWithDummyBackEnd, /* Set UVD Clk With Dummy Back End */158PHM_PlatformCaps_WantVCEClkWithDummyBackEnd, /* Set VCE Clk With Dummy Back End */159PHM_PlatformCaps_WantACPClkWithDummyBackEnd, /* Set SAM Clk With Dummy Back End */160PHM_PlatformCaps_OD6inACSupport, /* indicates that the ASIC/back end supports OD6 */161PHM_PlatformCaps_OD6inDCSupport, /* indicates that the ASIC/back end supports OD6 in DC */162PHM_PlatformCaps_EnablePlatformPowerManagement, /* indicates that Platform Power Management feature is supported */163PHM_PlatformCaps_SurpriseRemoval, /* indicates that surprise removal feature is requested */164PHM_PlatformCaps_NewCACVoltage, /* indicates new CAC voltage table support */165PHM_PlatformCaps_DiDtSupport, /* for dI/dT feature */166PHM_PlatformCaps_DBRamping, /* for dI/dT feature */167PHM_PlatformCaps_TDRamping, /* for dI/dT feature */168PHM_PlatformCaps_TCPRamping, /* for dI/dT feature */169PHM_PlatformCaps_DBRRamping, /* for dI/dT feature */170PHM_PlatformCaps_DiDtEDCEnable, /* for dI/dT feature */171PHM_PlatformCaps_GCEDC, /* for dI/dT feature */172PHM_PlatformCaps_PSM, /* for dI/dT feature */173PHM_PlatformCaps_EnableSMU7ThermalManagement, /* SMC will manage thermal events */174PHM_PlatformCaps_FPS, /* FPS support */175PHM_PlatformCaps_ACP, /* ACP support */176PHM_PlatformCaps_SclkThrottleLowNotification, /* SCLK Throttle Low Notification */177PHM_PlatformCaps_XDMAEnabled, /* XDMA engine is enabled */178PHM_PlatformCaps_UseDummyBackEnd, /* use dummy back end */179PHM_PlatformCaps_EnableDFSBypass, /* Enable DFS bypass */180PHM_PlatformCaps_VddNBDirectRequest,181PHM_PlatformCaps_PauseMMSessions,182PHM_PlatformCaps_UnTabledHardwareInterface, /* Tableless/direct call hardware interface for CI and newer ASICs */183PHM_PlatformCaps_SMU7, /* indicates that vpuRecoveryBegin without SMU shutdown */184PHM_PlatformCaps_RevertGPIO5Polarity, /* indicates revert GPIO5 plarity table support */185PHM_PlatformCaps_Thermal2GPIO17, /* indicates thermal2GPIO17 table support */186PHM_PlatformCaps_ThermalOutGPIO, /* indicates ThermalOutGPIO support, pin number is assigned by VBIOS */187PHM_PlatformCaps_DisableMclkSwitchingForFrameLock, /* Disable memory clock switch during Framelock */188PHM_PlatformCaps_ForceMclkHigh, /* Disable memory clock switching by forcing memory clock high */189PHM_PlatformCaps_VRHotGPIOConfigurable, /* indicates VR_HOT GPIO configurable */190PHM_PlatformCaps_TempInversion, /* enable Temp Inversion feature */191PHM_PlatformCaps_IOIC3,192PHM_PlatformCaps_ConnectedStandby,193PHM_PlatformCaps_EVV,194PHM_PlatformCaps_EnableLongIdleBACOSupport,195PHM_PlatformCaps_CombinePCCWithThermalSignal,196PHM_PlatformCaps_DisableUsingActualTemperatureForPowerCalc,197PHM_PlatformCaps_StablePState,198PHM_PlatformCaps_OD6PlusinACSupport,199PHM_PlatformCaps_OD6PlusinDCSupport,200PHM_PlatformCaps_ODThermalLimitUnlock,201PHM_PlatformCaps_ReducePowerLimit,202PHM_PlatformCaps_ODFuzzyFanControlSupport,203PHM_PlatformCaps_GeminiRegulatorFanControlSupport,204PHM_PlatformCaps_ControlVDDGFX,205PHM_PlatformCaps_BBBSupported,206PHM_PlatformCaps_DisableVoltageIsland,207PHM_PlatformCaps_FanSpeedInTableIsRPM,208PHM_PlatformCaps_GFXClockGatingManagedInCAIL,209PHM_PlatformCaps_IcelandULPSSWWorkAround,210PHM_PlatformCaps_FPSEnhancement,211PHM_PlatformCaps_LoadPostProductionFirmware,212PHM_PlatformCaps_VpuRecoveryInProgress,213PHM_PlatformCaps_Falcon_QuickTransition,214PHM_PlatformCaps_AVFS,215PHM_PlatformCaps_ClockStretcher,216PHM_PlatformCaps_TablelessHardwareInterface,217PHM_PlatformCaps_EnableDriverEVV,218PHM_PlatformCaps_SPLLShutdownSupport,219PHM_PlatformCaps_VirtualBatteryState,220PHM_PlatformCaps_IgnoreForceHighClockRequestsInAPUs,221PHM_PlatformCaps_DisableMclkSwitchForVR,222PHM_PlatformCaps_SMU8,223PHM_PlatformCaps_VRHotPolarityHigh,224PHM_PlatformCaps_IPS_UlpsExclusive,225PHM_PlatformCaps_SMCtoPPLIBAcdcGpioScheme,226PHM_PlatformCaps_GeminiAsymmetricPower,227PHM_PlatformCaps_OCLPowerOptimization,228PHM_PlatformCaps_MaxPCIEBandWidth,229PHM_PlatformCaps_PerfPerWattOptimizationSupport,230PHM_PlatformCaps_UVDClientMCTuning,231PHM_PlatformCaps_ODNinACSupport,232PHM_PlatformCaps_ODNinDCSupport,233PHM_PlatformCaps_OD8inACSupport,234PHM_PlatformCaps_OD8inDCSupport,235PHM_PlatformCaps_UMDPState,236PHM_PlatformCaps_AutoWattmanSupport,237PHM_PlatformCaps_AutoWattmanEnable_CCCState,238PHM_PlatformCaps_FreeSyncActive,239PHM_PlatformCaps_EnableShadowPstate,240PHM_PlatformCaps_customThermalManagement,241PHM_PlatformCaps_staticFanControl,242PHM_PlatformCaps_Virtual_System,243PHM_PlatformCaps_LowestUclkReservedForUlv,244PHM_PlatformCaps_EnableBoostState,245PHM_PlatformCaps_AVFSSupport,246PHM_PlatformCaps_ThermalPolicyDelay,247PHM_PlatformCaps_CustomFanControlSupport,248PHM_PlatformCaps_BAMACO,249PHM_PlatformCaps_Max250};251252#define PHM_MAX_NUM_CAPS_BITS_PER_FIELD (sizeof(uint32_t)*8)253254/* Number of uint32_t entries used by CAPS table */255#define PHM_MAX_NUM_CAPS_ULONG_ENTRIES \256((PHM_PlatformCaps_Max + ((PHM_MAX_NUM_CAPS_BITS_PER_FIELD) - 1)) / (PHM_MAX_NUM_CAPS_BITS_PER_FIELD))257258struct pp_hw_descriptor {259uint32_t hw_caps[PHM_MAX_NUM_CAPS_ULONG_ENTRIES];260};261262enum PHM_PerformanceLevelDesignation {263PHM_PerformanceLevelDesignation_Activity,264PHM_PerformanceLevelDesignation_PowerContainment265};266267typedef enum PHM_PerformanceLevelDesignation PHM_PerformanceLevelDesignation;268269struct PHM_PerformanceLevel {270uint32_t coreClock;271uint32_t memory_clock;272uint32_t vddc;273uint32_t vddci;274uint32_t nonLocalMemoryFreq;275uint32_t nonLocalMemoryWidth;276};277278typedef struct PHM_PerformanceLevel PHM_PerformanceLevel;279280/* Function for setting a platform cap */281static inline void phm_cap_set(uint32_t *caps,282enum phm_platform_caps c)283{284caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] |= (1UL <<285(c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)));286}287288static inline void phm_cap_unset(uint32_t *caps,289enum phm_platform_caps c)290{291caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] &= ~(1UL << (c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)));292}293294static inline bool phm_cap_enabled(const uint32_t *caps, enum phm_platform_caps c)295{296return (0 != (caps[c / PHM_MAX_NUM_CAPS_BITS_PER_FIELD] &297(1UL << (c & (PHM_MAX_NUM_CAPS_BITS_PER_FIELD - 1)))));298}299300#define PP_CAP(c) phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, (c))301302#define PP_PCIEGenInvalid 0xffff303enum PP_PCIEGen {304PP_PCIEGen1 = 0, /* PCIE 1.0 - Transfer rate of 2.5 GT/s */305PP_PCIEGen2, /*PCIE 2.0 - Transfer rate of 5.0 GT/s */306PP_PCIEGen3 /*PCIE 3.0 - Transfer rate of 8.0 GT/s */307};308309typedef enum PP_PCIEGen PP_PCIEGen;310311#define PP_Min_PCIEGen PP_PCIEGen1312#define PP_Max_PCIEGen PP_PCIEGen3313#define PP_Min_PCIELane 1314#define PP_Max_PCIELane 16315316enum phm_clock_Type {317PHM_DispClock = 1,318PHM_SClock,319PHM_MemClock320};321322#define MAX_NUM_CLOCKS 16323324struct PP_Clocks {325uint32_t engineClock;326uint32_t memoryClock;327uint32_t BusBandwidth;328uint32_t engineClockInSR;329uint32_t dcefClock;330uint32_t dcefClockInSR;331};332333struct pp_clock_info {334uint32_t min_mem_clk;335uint32_t max_mem_clk;336uint32_t min_eng_clk;337uint32_t max_eng_clk;338uint32_t min_bus_bandwidth;339uint32_t max_bus_bandwidth;340};341342struct phm_platform_descriptor {343uint32_t platformCaps[PHM_MAX_NUM_CAPS_ULONG_ENTRIES];344uint32_t vbiosInterruptId;345struct PP_Clocks overdriveLimit;346struct PP_Clocks clockStep;347uint32_t hardwareActivityPerformanceLevels;348uint32_t minimumClocksReductionPercentage;349uint32_t minOverdriveVDDC;350uint32_t maxOverdriveVDDC;351uint32_t overdriveVDDCStep;352uint32_t hardwarePerformanceLevels;353uint16_t powerBudget;354uint32_t TDPLimit;355uint32_t nearTDPLimit;356uint32_t nearTDPLimitAdjusted;357uint32_t SQRampingThreshold;358uint32_t CACLeakage;359uint16_t TDPODLimit;360uint32_t TDPAdjustment;361bool TDPAdjustmentPolarity;362uint16_t LoadLineSlope;363uint32_t VidMinLimit;364uint32_t VidMaxLimit;365uint32_t VidStep;366uint32_t VidAdjustment;367bool VidAdjustmentPolarity;368};369370struct phm_clocks {371uint32_t num_of_entries;372uint32_t clock[MAX_NUM_CLOCKS];373};374375#define DPMTABLE_OD_UPDATE_SCLK 0x00000001376#define DPMTABLE_OD_UPDATE_MCLK 0x00000002377#define DPMTABLE_UPDATE_SCLK 0x00000004378#define DPMTABLE_UPDATE_MCLK 0x00000008379#define DPMTABLE_OD_UPDATE_VDDC 0x00000010380#define DPMTABLE_UPDATE_SOCCLK 0x00000020381382struct phm_odn_performance_level {383uint32_t clock;384uint32_t vddc;385bool enabled;386};387388struct phm_odn_clock_levels {389uint32_t size;390uint32_t options;391uint32_t flags;392uint32_t num_of_pl;393/* variable-sized array, specify by num_of_pl. */394struct phm_odn_performance_level entries[8];395};396397extern int phm_disable_clock_power_gatings(struct pp_hwmgr *hwmgr);398extern int phm_setup_asic(struct pp_hwmgr *hwmgr);399extern int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr);400extern int phm_disable_dynamic_state_management(struct pp_hwmgr *hwmgr);401extern int phm_set_power_state(struct pp_hwmgr *hwmgr,402const struct pp_hw_power_state *pcurrent_state,403const struct pp_hw_power_state *pnew_power_state);404405extern int phm_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,406struct pp_power_state *adjusted_ps,407const struct pp_power_state *current_ps);408409extern int phm_apply_clock_adjust_rules(struct pp_hwmgr *hwmgr);410411extern int phm_force_dpm_levels(struct pp_hwmgr *hwmgr, enum amd_dpm_forced_level level);412extern int phm_pre_display_configuration_changed(struct pp_hwmgr *hwmgr);413extern int phm_display_configuration_changed(struct pp_hwmgr *hwmgr);414extern int phm_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr);415extern int phm_register_irq_handlers(struct pp_hwmgr *hwmgr);416extern int phm_start_thermal_controller(struct pp_hwmgr *hwmgr);417extern int phm_stop_thermal_controller(struct pp_hwmgr *hwmgr);418extern bool phm_check_smc_update_required_for_display_configuration(struct pp_hwmgr *hwmgr);419420extern int phm_check_states_equal(struct pp_hwmgr *hwmgr,421const struct pp_hw_power_state *pstate1,422const struct pp_hw_power_state *pstate2,423bool *equal);424425extern int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,426const struct amd_pp_display_configuration *display_config);427428extern int phm_get_dal_power_level(struct pp_hwmgr *hwmgr,429struct amd_pp_simple_clock_info *info);430431extern int phm_set_cpu_power_state(struct pp_hwmgr *hwmgr);432433extern int phm_power_down_asic(struct pp_hwmgr *hwmgr);434435extern int phm_get_performance_level(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state,436PHM_PerformanceLevelDesignation designation, uint32_t index,437PHM_PerformanceLevel *level);438439extern int phm_get_clock_info(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state,440struct pp_clock_info *pclock_info,441PHM_PerformanceLevelDesignation designation);442443extern int phm_get_current_shallow_sleep_clocks(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *clock_info);444445extern int phm_get_clock_by_type(struct pp_hwmgr *hwmgr, enum amd_pp_clock_type type, struct amd_pp_clocks *clocks);446447extern int phm_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,448enum amd_pp_clock_type type,449struct pp_clock_levels_with_latency *clocks);450extern int phm_get_clock_by_type_with_voltage(struct pp_hwmgr *hwmgr,451enum amd_pp_clock_type type,452struct pp_clock_levels_with_voltage *clocks);453extern int phm_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,454void *clock_ranges);455extern int phm_display_clock_voltage_request(struct pp_hwmgr *hwmgr,456struct pp_display_clock_request *clock);457458extern int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks);459extern int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr);460461extern int phm_set_active_display_count(struct pp_hwmgr *hwmgr, uint32_t count);462463#endif /* _HARDWARE_MANAGER_H_ */464465466467