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

/*
 * Copyright 2014 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 CZ_PP_SMC_H
#define CZ_PP_SMC_H

#pragma pack(push, 1)

/* Fan control algorithm:*/
#define FDO_MODE_HARDWARE
#define FDO_MODE_PIECE_WISE_LINEAR

enum FAN_CONTROL {};

enum DPM_ARRAY {};

/*
 * Return codes for driver to SMC communication.
 * Leave these #define-s, enums might not be exactly 8-bits on the microcontroller.
 */
#define PPSMC_Result_OK
#define PPSMC_Result_NoMore
#define PPSMC_Result_NotNow
#define PPSMC_Result_Failed
#define PPSMC_Result_UnknownCmd
#define PPSMC_Result_UnknownVT

#define PPSMC_isERROR(x)

/*
 * Supported driver messages
 */
#define PPSMC_MSG_Test
#define PPSMC_MSG_GetFeatureStatus
#define PPSMC_MSG_EnableAllSmuFeatures
#define PPSMC_MSG_DisableAllSmuFeatures
#define PPSMC_MSG_OptimizeBattery
#define PPSMC_MSG_MaximizePerf
#define PPSMC_MSG_UVDPowerOFF
#define PPSMC_MSG_UVDPowerON
#define PPSMC_MSG_VCEPowerOFF
#define PPSMC_MSG_VCEPowerON
#define PPSMC_MSG_ACPPowerOFF
#define PPSMC_MSG_ACPPowerON
#define PPSMC_MSG_SDMAPowerOFF
#define PPSMC_MSG_SDMAPowerON
#define PPSMC_MSG_XDMAPowerOFF
#define PPSMC_MSG_XDMAPowerON
#define PPSMC_MSG_SetMinDeepSleepSclk
#define PPSMC_MSG_SetSclkSoftMin
#define PPSMC_MSG_SetSclkSoftMax
#define PPSMC_MSG_SetSclkHardMin
#define PPSMC_MSG_SetSclkHardMax
#define PPSMC_MSG_SetLclkSoftMin
#define PPSMC_MSG_SetLclkSoftMax
#define PPSMC_MSG_SetLclkHardMin
#define PPSMC_MSG_SetLclkHardMax
#define PPSMC_MSG_SetUvdSoftMin
#define PPSMC_MSG_SetUvdSoftMax
#define PPSMC_MSG_SetUvdHardMin
#define PPSMC_MSG_SetUvdHardMax
#define PPSMC_MSG_SetEclkSoftMin
#define PPSMC_MSG_SetEclkSoftMax
#define PPSMC_MSG_SetEclkHardMin
#define PPSMC_MSG_SetEclkHardMax
#define PPSMC_MSG_SetAclkSoftMin
#define PPSMC_MSG_SetAclkSoftMax
#define PPSMC_MSG_SetAclkHardMin
#define PPSMC_MSG_SetAclkHardMax
#define PPSMC_MSG_SetNclkSoftMin
#define PPSMC_MSG_SetNclkSoftMax
#define PPSMC_MSG_SetNclkHardMin
#define PPSMC_MSG_SetNclkHardMax
#define PPSMC_MSG_SetPstateSoftMin
#define PPSMC_MSG_SetPstateSoftMax
#define PPSMC_MSG_SetPstateHardMin
#define PPSMC_MSG_SetPstateHardMax
#define PPSMC_MSG_DisableLowMemoryPstate
#define PPSMC_MSG_EnableLowMemoryPstate
#define PPSMC_MSG_UcodeAddressLow
#define PPSMC_MSG_UcodeAddressHigh
#define PPSMC_MSG_UcodeLoadStatus
#define PPSMC_MSG_DriverDramAddrHi
#define PPSMC_MSG_DriverDramAddrLo
#define PPSMC_MSG_CondExecDramAddrHi
#define PPSMC_MSG_CondExecDramAddrLo
#define PPSMC_MSG_LoadUcodes
#define PPSMC_MSG_DriverResetMode
#define PPSMC_MSG_PowerStateNotify
#define PPSMC_MSG_SetDisplayPhyConfig
#define PPSMC_MSG_GetMaxSclkLevel
#define PPSMC_MSG_GetMaxLclkLevel
#define PPSMC_MSG_GetMaxUvdLevel
#define PPSMC_MSG_GetMaxEclkLevel
#define PPSMC_MSG_GetMaxAclkLevel
#define PPSMC_MSG_GetMaxNclkLevel
#define PPSMC_MSG_GetMaxPstate
#define PPSMC_MSG_DramAddrHiVirtual
#define PPSMC_MSG_DramAddrLoVirtual
#define PPSMC_MSG_DramAddrHiPhysical
#define PPSMC_MSG_DramAddrLoPhysical
#define PPSMC_MSG_DramBufferSize
#define PPSMC_MSG_SetMmPwrLogDramAddrHi
#define PPSMC_MSG_SetMmPwrLogDramAddrLo
#define PPSMC_MSG_SetClkTableAddrHi
#define PPSMC_MSG_SetClkTableAddrLo
#define PPSMC_MSG_GetConservativePowerLimit

#define PPSMC_MSG_InitJobs
#define PPSMC_MSG_ExecuteJob

#define PPSMC_MSG_NBDPM_Enable
#define PPSMC_MSG_NBDPM_Disable

#define PPSMC_MSG_DPM_FPS_Mode
#define PPSMC_MSG_DPM_Activity_Mode

#define PPSMC_MSG_PmStatusLogStart
#define PPSMC_MSG_PmStatusLogSample

#define PPSMC_MSG_AllowLowSclkInterrupt
#define PPSMC_MSG_MmPowerMonitorStart
#define PPSMC_MSG_MmPowerMonitorStop
#define PPSMC_MSG_MmPowerMonitorRestart

#define PPSMC_MSG_SetClockGateMask
#define PPSMC_MSG_SetFpsThresholdLo
#define PPSMC_MSG_SetFpsThresholdHi
#define PPSMC_MSG_SetLowSclkIntrThreshold

#define PPSMC_MSG_ClkTableXferToDram
#define PPSMC_MSG_ClkTableXferToSmu
#define PPSMC_MSG_GetAverageGraphicsActivity
#define PPSMC_MSG_GetAverageGioActivity
#define PPSMC_MSG_SetLoggerBufferSize
#define PPSMC_MSG_SetLoggerAddressHigh
#define PPSMC_MSG_SetLoggerAddressLow
#define PPSMC_MSG_SetWatermarkFrequency
#define PPSMC_MSG_SetDisplaySizePowerParams

/* REMOVE LATER*/
#define PPSMC_MSG_DPM_ForceState

/* Feature Enable Masks*/
#define NB_DPM_MASK
#define VDDGFX_MASK
#define VCE_DPM_MASK
#define ACP_DPM_MASK
#define UVD_DPM_MASK
#define GFX_CU_PG_MASK
#define SCLK_DPM_MASK

#if !defined(SMC_MICROCODE)
#pragma pack(pop)

#endif

#endif