linux/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.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_HWMGR_H_
#define _VEGA20_HWMGR_H_

#include "hwmgr.h"
#include "smu11_driver_if.h"
#include "ppatomfwctrl.h"

#define VEGA20_MAX_HARDWARE_POWERLEVELS

#define WaterMarksExist
#define WaterMarksLoaded

#define VG20_PSUEDO_NUM_GFXCLK_DPM_LEVELS
#define VG20_PSUEDO_NUM_SOCCLK_DPM_LEVELS
#define VG20_PSUEDO_NUM_DCEFCLK_DPM_LEVELS
#define VG20_PSUEDO_NUM_UCLK_DPM_LEVELS

//OverDriver8 macro defs
#define AVFS_CURVE
#define OD8_HOTCURVE_TEMPERATURE

#define VG20_CLOCK_MAX_DEFAULT

PP_Clock;

enum {};


#define GNLD_DPM_MAX

#define SMC_DPM_FEATURES

struct smu_features {};

struct vega20_performance_level {};

struct vega20_bacos {};

struct vega20_uvd_clocks {};

struct vega20_vce_clocks {};

struct vega20_power_state {};

struct vega20_dpm_level {};

#define VEGA20_MAX_DEEPSLEEP_DIVIDER_ID
#define MAX_REGULAR_DPM_NUMBER
#define MAX_PCIE_CONF
#define VEGA20_MINIMUM_ENGINE_CLOCK

struct vega20_max_sustainable_clocks {};

struct vega20_dpm_state {};

struct vega20_single_dpm_table {};

struct vega20_odn_dpm_control {};

struct vega20_pcie_table {};

struct vega20_dpm_table {};

#define VEGA20_MAX_LEAKAGE_COUNT
struct vega20_leakage_voltage {};

struct vega20_display_timing {};

struct vega20_dpmlevel_enable_mask {};

struct vega20_vbios_boot_state {};

#define DPMTABLE_OD_UPDATE_SCLK
#define DPMTABLE_OD_UPDATE_MCLK
#define DPMTABLE_UPDATE_SCLK
#define DPMTABLE_UPDATE_MCLK
#define DPMTABLE_OD_UPDATE_VDDC
#define DPMTABLE_OD_UPDATE_SCLK_MASK
#define DPMTABLE_OD_UPDATE_MCLK_MASK

// To determine if sclk and mclk are in overdrive state
#define SCLK_MASK_OVERDRIVE_ENABLED
#define MCLK_MASK_OVERDRIVE_ENABLED
#define SOCCLK_OVERDRIVE_ENABLED

struct vega20_smc_state_table {};

struct vega20_mclk_latency_entries {};

struct vega20_mclk_latency_table {};

struct vega20_registry_data {};

struct vega20_odn_clock_voltage_dependency_table {};

struct vega20_odn_dpm_table {};

struct vega20_odn_fan_table {};

struct vega20_odn_temp_table {};

struct vega20_odn_data {};

enum OD8_FEATURE_ID {};

enum OD8_SETTING_ID {};

struct vega20_od8_single_setting {};

struct vega20_od8_settings {};

struct vega20_hwmgr {};

#define VEGA20_DPM2_NEAR_TDP_DEC
#define VEGA20_DPM2_ABOVE_SAFE_INC
#define VEGA20_DPM2_BELOW_SAFE_INC

#define VEGA20_DPM2_LTA_WINDOW_SIZE

#define VEGA20_DPM2_LTS_TRUNCATE

#define VEGA20_DPM2_TDP_SAFE_LIMIT_PERCENT

#define VEGA20_DPM2_MAXPS_PERCENT_M
#define VEGA20_DPM2_MAXPS_PERCENT_H

#define VEGA20_DPM2_PWREFFICIENCYRATIO_MARGIN

#define VEGA20_DPM2_SQ_RAMP_MAX_POWER
#define VEGA20_DPM2_SQ_RAMP_MIN_POWER
#define VEGA20_DPM2_SQ_RAMP_MAX_POWER_DELTA
#define VEGA20_DPM2_SQ_RAMP_SHORT_TERM_INTERVAL_SIZE
#define VEGA20_DPM2_SQ_RAMP_LONG_TERM_INTERVAL_RATIO

#define VEGA20_VOLTAGE_CONTROL_NONE
#define VEGA20_VOLTAGE_CONTROL_BY_GPIO
#define VEGA20_VOLTAGE_CONTROL_BY_SVID2
#define VEGA20_VOLTAGE_CONTROL_MERGED
/* To convert to Q8.8 format for firmware */
#define VEGA20_Q88_FORMAT_CONVERSION_UNIT

#define VEGA20_UNUSED_GPIO_PIN

#define VEGA20_THERM_OUT_MODE_DISABLE
#define VEGA20_THERM_OUT_MODE_THERM_ONLY
#define VEGA20_THERM_OUT_MODE_THERM_VRHOT

#define PPVEGA20_VEGA20DISPLAYVOLTAGEMODE_DFLT
#define PPREGKEY_VEGA20QUADRATICEQUATION_DFLT

#define PPVEGA20_VEGA20GFXCLKAVERAGEALPHA_DFLT
#define PPVEGA20_VEGA20SOCCLKAVERAGEALPHA_DFLT
#define PPVEGA20_VEGA20UCLKCLKAVERAGEALPHA_DFLT
#define PPVEGA20_VEGA20GFXACTIVITYAVERAGEALPHA_DFLT
#define PPVEGA20_VEGA20LOWESTUCLKRESERVEDFORULV_DFLT
#define PPVEGA20_VEGA20DISPLAYVOLTAGEMODE_DFLT
#define PPREGKEY_VEGA20QUADRATICEQUATION_DFLT

#define VEGA20_UMD_PSTATE_GFXCLK_LEVEL
#define VEGA20_UMD_PSTATE_SOCCLK_LEVEL
#define VEGA20_UMD_PSTATE_MCLK_LEVEL
#define VEGA20_UMD_PSTATE_UVDCLK_LEVEL
#define VEGA20_UMD_PSTATE_VCEMCLK_LEVEL

#endif /* _VEGA20_HWMGR_H_ */