linux/drivers/gpu/drm/amd/pm/powerplay/inc/vega20_ppsmc.h

/*
 * Copyright 2018 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#ifndef VEGA20_PP_SMC_H
#define VEGA20_PP_SMC_H

#pragma pack(push, 1)

// SMU Response Codes:
#define PPSMC_Result_OK
#define PPSMC_Result_Failed
#define PPSMC_Result_UnknownCmd
#define PPSMC_Result_CmdRejectedPrereq
#define PPSMC_Result_CmdRejectedBusy

// Message Definitions:
#define PPSMC_MSG_TestMessage
#define PPSMC_MSG_GetSmuVersion
#define PPSMC_MSG_GetDriverIfVersion
#define PPSMC_MSG_SetAllowedFeaturesMaskLow
#define PPSMC_MSG_SetAllowedFeaturesMaskHigh
#define PPSMC_MSG_EnableAllSmuFeatures
#define PPSMC_MSG_DisableAllSmuFeatures
#define PPSMC_MSG_EnableSmuFeaturesLow
#define PPSMC_MSG_EnableSmuFeaturesHigh
#define PPSMC_MSG_DisableSmuFeaturesLow
#define PPSMC_MSG_DisableSmuFeaturesHigh
#define PPSMC_MSG_GetEnabledSmuFeaturesLow
#define PPSMC_MSG_GetEnabledSmuFeaturesHigh
#define PPSMC_MSG_SetWorkloadMask
#define PPSMC_MSG_SetPptLimit
#define PPSMC_MSG_SetDriverDramAddrHigh
#define PPSMC_MSG_SetDriverDramAddrLow
#define PPSMC_MSG_SetToolsDramAddrHigh
#define PPSMC_MSG_SetToolsDramAddrLow
#define PPSMC_MSG_TransferTableSmu2Dram
#define PPSMC_MSG_TransferTableDram2Smu
#define PPSMC_MSG_UseDefaultPPTable
#define PPSMC_MSG_UseBackupPPTable
#define PPSMC_MSG_RunBtc
#define PPSMC_MSG_RequestI2CBus
#define PPSMC_MSG_ReleaseI2CBus
#define PPSMC_MSG_SetFloorSocVoltage
#define PPSMC_MSG_SoftReset
#define PPSMC_MSG_StartBacoMonitor
#define PPSMC_MSG_CancelBacoMonitor
#define PPSMC_MSG_EnterBaco
#define PPSMC_MSG_SetSoftMinByFreq
#define PPSMC_MSG_SetSoftMaxByFreq
#define PPSMC_MSG_SetHardMinByFreq
#define PPSMC_MSG_SetHardMaxByFreq
#define PPSMC_MSG_GetMinDpmFreq
#define PPSMC_MSG_GetMaxDpmFreq
#define PPSMC_MSG_GetDpmFreqByIndex
#define PPSMC_MSG_GetDpmClockFreq
#define PPSMC_MSG_GetSsVoltageByDpm
#define PPSMC_MSG_SetMemoryChannelConfig
#define PPSMC_MSG_SetGeminiMode
#define PPSMC_MSG_SetGeminiApertureHigh
#define PPSMC_MSG_SetGeminiApertureLow
#define PPSMC_MSG_SetMinLinkDpmByIndex
#define PPSMC_MSG_OverridePcieParameters
#define PPSMC_MSG_OverDriveSetPercentage
#define PPSMC_MSG_SetMinDeepSleepDcefclk
#define PPSMC_MSG_ReenableAcDcInterrupt
#define PPSMC_MSG_NotifyPowerSource
#define PPSMC_MSG_SetUclkFastSwitch
#define PPSMC_MSG_SetUclkDownHyst
//#define PPSMC_MSG_GfxDeviceDriverReset           0x3B
#define PPSMC_MSG_GetCurrentRpm
#define PPSMC_MSG_SetVideoFps
#define PPSMC_MSG_SetTjMax
#define PPSMC_MSG_SetFanTemperatureTarget
#define PPSMC_MSG_PrepareMp1ForUnload
#define PPSMC_MSG_DramLogSetDramAddrHigh
#define PPSMC_MSG_DramLogSetDramAddrLow
#define PPSMC_MSG_DramLogSetDramSize
#define PPSMC_MSG_SetFanMaxRpm
#define PPSMC_MSG_SetFanMinPwm
#define PPSMC_MSG_ConfigureGfxDidt
#define PPSMC_MSG_NumOfDisplays
#define PPSMC_MSG_RemoveMargins
#define PPSMC_MSG_ReadSerialNumTop32
#define PPSMC_MSG_ReadSerialNumBottom32
#define PPSMC_MSG_SetSystemVirtualDramAddrHigh
#define PPSMC_MSG_SetSystemVirtualDramAddrLow
#define PPSMC_MSG_WaflTest
#define PPSMC_MSG_SetFclkGfxClkRatio
// Unused ID 0x4F to 0x50
#define PPSMC_MSG_AllowGfxOff
#define PPSMC_MSG_DisallowGfxOff
#define PPSMC_MSG_GetPptLimit
#define PPSMC_MSG_GetDcModeMaxDpmFreq
#define PPSMC_MSG_GetDebugData
#define PPSMC_MSG_SetXgmiMode
#define PPSMC_MSG_RunAfllBtc
#define PPSMC_MSG_ExitBaco
#define PPSMC_MSG_PrepareMp1ForReset
#define PPSMC_MSG_PrepareMp1ForShutdown
#define PPSMC_MSG_SetMGpuFanBoostLimitRpm
#define PPSMC_MSG_GetAVFSVoltageByDpm
#define PPSMC_MSG_BacoWorkAroundFlushVDCI
#define PPSMC_MSG_DFCstateControl
#define PPSMC_Message_Count

PPSMC_Result;
PPSMC_Msg;

#pragma pack(pop)

#endif