1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef _VEGA20_SMUMANAGER_H_
24 #define _VEGA20_SMUMANAGER_H_
25
26 #include "hwmgr.h"
27 #include "smu11_driver_if.h"
28
29 struct smu_table_entry {
30 uint32_t version;
31 uint32_t size;
32 uint64_t mc_addr;
33 void *table;
34 struct amdgpu_bo *handle;
35 };
36
37 struct smu_table_array {
38 struct smu_table_entry entry[TABLE_COUNT];
39 };
40
41 struct vega20_smumgr {
42 struct smu_table_array smu_tables;
43 };
44
45 #define SMU_FEATURES_LOW_MASK 0x00000000FFFFFFFF
46 #define SMU_FEATURES_LOW_SHIFT 0
47 #define SMU_FEATURES_HIGH_MASK 0xFFFFFFFF00000000
48 #define SMU_FEATURES_HIGH_SHIFT 32
49
50 int vega20_enable_smc_features(struct pp_hwmgr *hwmgr,
51 bool enable, uint64_t feature_mask);
52 int vega20_get_enabled_smc_features(struct pp_hwmgr *hwmgr,
53 uint64_t *features_enabled);
54 int vega20_set_activity_monitor_coeff(struct pp_hwmgr *hwmgr,
55 uint8_t *table, uint16_t workload_type);
56 int vega20_get_activity_monitor_coeff(struct pp_hwmgr *hwmgr,
57 uint8_t *table, uint16_t workload_type);
58 int vega20_set_pptable_driver_address(struct pp_hwmgr *hwmgr);
59
60 bool vega20_is_smc_ram_running(struct pp_hwmgr *hwmgr);
61
62 #endif
63