diff options
author | Dave Airlie <airlied@redhat.com> | 2015-12-22 23:15:26 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-12-22 23:15:26 -0500 |
commit | fd3e14ffbd9ec7593ba4dafc9452a91373a4df05 (patch) | |
tree | 2db6625f712787514208f794ac62d24f415771a4 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 9116199536878bb2fdd63d6064633d6e3f2cba22 (diff) | |
parent | eafbbd9883d0121811a9388988b80476dc12b1bf (diff) |
Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-next
[airlied: fixup build problems on arm - added errno.h include]
* 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: (152 commits)
amd/powerplay: fix copy paste typo in hardwaremanager.c
amd/powerplay: disable powerplay by default initially
amd/powerplay: don't enable ucode fan control if vbios has no fan table
drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2)
drm/amd/powerplay: check whether need to enable thermal control. (v2)
drm/amd/powerplay: add point check to avoid NULL point hang.
drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.
drm/amd/powerplay: Don't return an error if fan table is missing
drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init
drm/powerplay: add debugging output to processpptables.c
drm/powerplay: add debugging output to tonga_processpptables.c
amd/powerplay: Add structures required to report configuration change
amd/powerplay: Fix get dal power level
amd\powerplay Implement get dal power level
drm/amd/powerplay: display gpu load when print performance for tonga.
drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late
drm/amd/powerplay: move shared function of vi to hwmgr. (v2)
drm/amd/powerplay: check whether enable dpm in powerplay.
drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing.
drm/amd/powerplay: fix boolreturn.cocci warnings
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 138 |
1 files changed, 91 insertions, 47 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 5a5f04d0902d..fca4ef78589c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "amdgpu_irq.h" | 52 | #include "amdgpu_irq.h" |
53 | #include "amdgpu_ucode.h" | 53 | #include "amdgpu_ucode.h" |
54 | #include "amdgpu_gds.h" | 54 | #include "amdgpu_gds.h" |
55 | #include "amd_powerplay.h" | ||
55 | 56 | ||
56 | #include "gpu_scheduler.h" | 57 | #include "gpu_scheduler.h" |
57 | 58 | ||
@@ -85,6 +86,7 @@ extern int amdgpu_enable_scheduler; | |||
85 | extern int amdgpu_sched_jobs; | 86 | extern int amdgpu_sched_jobs; |
86 | extern int amdgpu_sched_hw_submission; | 87 | extern int amdgpu_sched_hw_submission; |
87 | extern int amdgpu_enable_semaphores; | 88 | extern int amdgpu_enable_semaphores; |
89 | extern int amdgpu_powerplay; | ||
88 | 90 | ||
89 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 | 91 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 |
90 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ | 92 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ |
@@ -918,8 +920,8 @@ struct amdgpu_ring { | |||
918 | #define AMDGPU_VM_FAULT_STOP_ALWAYS 2 | 920 | #define AMDGPU_VM_FAULT_STOP_ALWAYS 2 |
919 | 921 | ||
920 | struct amdgpu_vm_pt { | 922 | struct amdgpu_vm_pt { |
921 | struct amdgpu_bo *bo; | 923 | struct amdgpu_bo_list_entry entry; |
922 | uint64_t addr; | 924 | uint64_t addr; |
923 | }; | 925 | }; |
924 | 926 | ||
925 | struct amdgpu_vm_id { | 927 | struct amdgpu_vm_id { |
@@ -981,9 +983,10 @@ struct amdgpu_vm_manager { | |||
981 | void amdgpu_vm_manager_fini(struct amdgpu_device *adev); | 983 | void amdgpu_vm_manager_fini(struct amdgpu_device *adev); |
982 | int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm); | 984 | int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm); |
983 | void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm); | 985 | void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm); |
984 | struct amdgpu_bo_list_entry *amdgpu_vm_get_bos(struct amdgpu_device *adev, | 986 | void amdgpu_vm_get_pd_bo(struct amdgpu_vm *vm, |
985 | struct amdgpu_vm *vm, | 987 | struct list_head *validated, |
986 | struct list_head *head); | 988 | struct amdgpu_bo_list_entry *entry); |
989 | void amdgpu_vm_get_pt_bos(struct amdgpu_vm *vm, struct list_head *duplicates); | ||
987 | int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, | 990 | int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, |
988 | struct amdgpu_sync *sync); | 991 | struct amdgpu_sync *sync); |
989 | void amdgpu_vm_flush(struct amdgpu_ring *ring, | 992 | void amdgpu_vm_flush(struct amdgpu_ring *ring, |
@@ -1024,11 +1027,9 @@ int amdgpu_vm_free_job(struct amdgpu_job *job); | |||
1024 | * context related structures | 1027 | * context related structures |
1025 | */ | 1028 | */ |
1026 | 1029 | ||
1027 | #define AMDGPU_CTX_MAX_CS_PENDING 16 | ||
1028 | |||
1029 | struct amdgpu_ctx_ring { | 1030 | struct amdgpu_ctx_ring { |
1030 | uint64_t sequence; | 1031 | uint64_t sequence; |
1031 | struct fence *fences[AMDGPU_CTX_MAX_CS_PENDING]; | 1032 | struct fence **fences; |
1032 | struct amd_sched_entity entity; | 1033 | struct amd_sched_entity entity; |
1033 | }; | 1034 | }; |
1034 | 1035 | ||
@@ -1037,6 +1038,7 @@ struct amdgpu_ctx { | |||
1037 | struct amdgpu_device *adev; | 1038 | struct amdgpu_device *adev; |
1038 | unsigned reset_counter; | 1039 | unsigned reset_counter; |
1039 | spinlock_t ring_lock; | 1040 | spinlock_t ring_lock; |
1041 | struct fence **fences; | ||
1040 | struct amdgpu_ctx_ring rings[AMDGPU_MAX_RINGS]; | 1042 | struct amdgpu_ctx_ring rings[AMDGPU_MAX_RINGS]; |
1041 | }; | 1043 | }; |
1042 | 1044 | ||
@@ -1047,7 +1049,7 @@ struct amdgpu_ctx_mgr { | |||
1047 | struct idr ctx_handles; | 1049 | struct idr ctx_handles; |
1048 | }; | 1050 | }; |
1049 | 1051 | ||
1050 | int amdgpu_ctx_init(struct amdgpu_device *adev, bool kernel, | 1052 | int amdgpu_ctx_init(struct amdgpu_device *adev, enum amd_sched_priority pri, |
1051 | struct amdgpu_ctx *ctx); | 1053 | struct amdgpu_ctx *ctx); |
1052 | void amdgpu_ctx_fini(struct amdgpu_ctx *ctx); | 1054 | void amdgpu_ctx_fini(struct amdgpu_ctx *ctx); |
1053 | 1055 | ||
@@ -1254,7 +1256,7 @@ struct amdgpu_cs_parser { | |||
1254 | unsigned nchunks; | 1256 | unsigned nchunks; |
1255 | struct amdgpu_cs_chunk *chunks; | 1257 | struct amdgpu_cs_chunk *chunks; |
1256 | /* relocations */ | 1258 | /* relocations */ |
1257 | struct amdgpu_bo_list_entry *vm_bos; | 1259 | struct amdgpu_bo_list_entry vm_pd; |
1258 | struct list_head validated; | 1260 | struct list_head validated; |
1259 | struct fence *fence; | 1261 | struct fence *fence; |
1260 | 1262 | ||
@@ -1300,31 +1302,7 @@ struct amdgpu_wb { | |||
1300 | int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb); | 1302 | int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb); |
1301 | void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb); | 1303 | void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb); |
1302 | 1304 | ||
1303 | /** | ||
1304 | * struct amdgpu_pm - power management datas | ||
1305 | * It keeps track of various data needed to take powermanagement decision. | ||
1306 | */ | ||
1307 | 1305 | ||
1308 | enum amdgpu_pm_state_type { | ||
1309 | /* not used for dpm */ | ||
1310 | POWER_STATE_TYPE_DEFAULT, | ||
1311 | POWER_STATE_TYPE_POWERSAVE, | ||
1312 | /* user selectable states */ | ||
1313 | POWER_STATE_TYPE_BATTERY, | ||
1314 | POWER_STATE_TYPE_BALANCED, | ||
1315 | POWER_STATE_TYPE_PERFORMANCE, | ||
1316 | /* internal states */ | ||
1317 | POWER_STATE_TYPE_INTERNAL_UVD, | ||
1318 | POWER_STATE_TYPE_INTERNAL_UVD_SD, | ||
1319 | POWER_STATE_TYPE_INTERNAL_UVD_HD, | ||
1320 | POWER_STATE_TYPE_INTERNAL_UVD_HD2, | ||
1321 | POWER_STATE_TYPE_INTERNAL_UVD_MVC, | ||
1322 | POWER_STATE_TYPE_INTERNAL_BOOT, | ||
1323 | POWER_STATE_TYPE_INTERNAL_THERMAL, | ||
1324 | POWER_STATE_TYPE_INTERNAL_ACPI, | ||
1325 | POWER_STATE_TYPE_INTERNAL_ULV, | ||
1326 | POWER_STATE_TYPE_INTERNAL_3DPERF, | ||
1327 | }; | ||
1328 | 1306 | ||
1329 | enum amdgpu_int_thermal_type { | 1307 | enum amdgpu_int_thermal_type { |
1330 | THERMAL_TYPE_NONE, | 1308 | THERMAL_TYPE_NONE, |
@@ -1606,8 +1584,8 @@ struct amdgpu_dpm { | |||
1606 | /* vce requirements */ | 1584 | /* vce requirements */ |
1607 | struct amdgpu_vce_state vce_states[AMDGPU_MAX_VCE_LEVELS]; | 1585 | struct amdgpu_vce_state vce_states[AMDGPU_MAX_VCE_LEVELS]; |
1608 | enum amdgpu_vce_level vce_level; | 1586 | enum amdgpu_vce_level vce_level; |
1609 | enum amdgpu_pm_state_type state; | 1587 | enum amd_pm_state_type state; |
1610 | enum amdgpu_pm_state_type user_state; | 1588 | enum amd_pm_state_type user_state; |
1611 | u32 platform_caps; | 1589 | u32 platform_caps; |
1612 | u32 voltage_response_time; | 1590 | u32 voltage_response_time; |
1613 | u32 backbias_response_time; | 1591 | u32 backbias_response_time; |
@@ -1660,8 +1638,13 @@ struct amdgpu_pm { | |||
1660 | const struct firmware *fw; /* SMC firmware */ | 1638 | const struct firmware *fw; /* SMC firmware */ |
1661 | uint32_t fw_version; | 1639 | uint32_t fw_version; |
1662 | const struct amdgpu_dpm_funcs *funcs; | 1640 | const struct amdgpu_dpm_funcs *funcs; |
1641 | uint32_t pcie_gen_mask; | ||
1642 | uint32_t pcie_mlw_mask; | ||
1643 | struct amd_pp_display_configuration pm_display_cfg;/* set by DAL */ | ||
1663 | }; | 1644 | }; |
1664 | 1645 | ||
1646 | void amdgpu_get_pcie_info(struct amdgpu_device *adev); | ||
1647 | |||
1665 | /* | 1648 | /* |
1666 | * UVD | 1649 | * UVD |
1667 | */ | 1650 | */ |
@@ -1829,6 +1812,8 @@ struct amdgpu_cu_info { | |||
1829 | */ | 1812 | */ |
1830 | struct amdgpu_asic_funcs { | 1813 | struct amdgpu_asic_funcs { |
1831 | bool (*read_disabled_bios)(struct amdgpu_device *adev); | 1814 | bool (*read_disabled_bios)(struct amdgpu_device *adev); |
1815 | bool (*read_bios_from_rom)(struct amdgpu_device *adev, | ||
1816 | u8 *bios, u32 length_bytes); | ||
1832 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, | 1817 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, |
1833 | u32 sh_num, u32 reg_offset, u32 *value); | 1818 | u32 sh_num, u32 reg_offset, u32 *value); |
1834 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); | 1819 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); |
@@ -2059,6 +2044,10 @@ struct amdgpu_device { | |||
2059 | /* interrupts */ | 2044 | /* interrupts */ |
2060 | struct amdgpu_irq irq; | 2045 | struct amdgpu_irq irq; |
2061 | 2046 | ||
2047 | /* powerplay */ | ||
2048 | struct amd_powerplay powerplay; | ||
2049 | bool pp_enabled; | ||
2050 | |||
2062 | /* dpm */ | 2051 | /* dpm */ |
2063 | struct amdgpu_pm pm; | 2052 | struct amdgpu_pm pm; |
2064 | u32 cg_flags; | 2053 | u32 cg_flags; |
@@ -2235,6 +2224,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2235 | #define amdgpu_asic_set_vce_clocks(adev, ev, ec) (adev)->asic_funcs->set_vce_clocks((adev), (ev), (ec)) | 2224 | #define amdgpu_asic_set_vce_clocks(adev, ev, ec) (adev)->asic_funcs->set_vce_clocks((adev), (ev), (ec)) |
2236 | #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev)) | 2225 | #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev)) |
2237 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) | 2226 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) |
2227 | #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l)) | ||
2238 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) | 2228 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) |
2239 | #define amdgpu_asic_get_cu_info(adev, info) (adev)->asic_funcs->get_cu_info((adev), (info)) | 2229 | #define amdgpu_asic_get_cu_info(adev, info) (adev)->asic_funcs->get_cu_info((adev), (info)) |
2240 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) | 2230 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) |
@@ -2276,24 +2266,78 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2276 | #define amdgpu_display_resume_mc_access(adev, s) (adev)->mode_info.funcs->resume_mc_access((adev), (s)) | 2266 | #define amdgpu_display_resume_mc_access(adev, s) (adev)->mode_info.funcs->resume_mc_access((adev), (s)) |
2277 | #define amdgpu_emit_copy_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_copy_buffer((ib), (s), (d), (b)) | 2267 | #define amdgpu_emit_copy_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_copy_buffer((ib), (s), (d), (b)) |
2278 | #define amdgpu_emit_fill_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib), (s), (d), (b)) | 2268 | #define amdgpu_emit_fill_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib), (s), (d), (b)) |
2279 | #define amdgpu_dpm_get_temperature(adev) (adev)->pm.funcs->get_temperature((adev)) | ||
2280 | #define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev)) | 2269 | #define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev)) |
2281 | #define amdgpu_dpm_set_power_state(adev) (adev)->pm.funcs->set_power_state((adev)) | 2270 | #define amdgpu_dpm_set_power_state(adev) (adev)->pm.funcs->set_power_state((adev)) |
2282 | #define amdgpu_dpm_post_set_power_state(adev) (adev)->pm.funcs->post_set_power_state((adev)) | 2271 | #define amdgpu_dpm_post_set_power_state(adev) (adev)->pm.funcs->post_set_power_state((adev)) |
2283 | #define amdgpu_dpm_display_configuration_changed(adev) (adev)->pm.funcs->display_configuration_changed((adev)) | 2272 | #define amdgpu_dpm_display_configuration_changed(adev) (adev)->pm.funcs->display_configuration_changed((adev)) |
2284 | #define amdgpu_dpm_get_sclk(adev, l) (adev)->pm.funcs->get_sclk((adev), (l)) | ||
2285 | #define amdgpu_dpm_get_mclk(adev, l) (adev)->pm.funcs->get_mclk((adev), (l)) | ||
2286 | #define amdgpu_dpm_print_power_state(adev, ps) (adev)->pm.funcs->print_power_state((adev), (ps)) | 2273 | #define amdgpu_dpm_print_power_state(adev, ps) (adev)->pm.funcs->print_power_state((adev), (ps)) |
2287 | #define amdgpu_dpm_debugfs_print_current_performance_level(adev, m) (adev)->pm.funcs->debugfs_print_current_performance_level((adev), (m)) | ||
2288 | #define amdgpu_dpm_force_performance_level(adev, l) (adev)->pm.funcs->force_performance_level((adev), (l)) | ||
2289 | #define amdgpu_dpm_vblank_too_short(adev) (adev)->pm.funcs->vblank_too_short((adev)) | 2274 | #define amdgpu_dpm_vblank_too_short(adev) (adev)->pm.funcs->vblank_too_short((adev)) |
2290 | #define amdgpu_dpm_powergate_uvd(adev, g) (adev)->pm.funcs->powergate_uvd((adev), (g)) | ||
2291 | #define amdgpu_dpm_powergate_vce(adev, g) (adev)->pm.funcs->powergate_vce((adev), (g)) | ||
2292 | #define amdgpu_dpm_enable_bapm(adev, e) (adev)->pm.funcs->enable_bapm((adev), (e)) | 2275 | #define amdgpu_dpm_enable_bapm(adev, e) (adev)->pm.funcs->enable_bapm((adev), (e)) |
2293 | #define amdgpu_dpm_set_fan_control_mode(adev, m) (adev)->pm.funcs->set_fan_control_mode((adev), (m)) | 2276 | |
2294 | #define amdgpu_dpm_get_fan_control_mode(adev) (adev)->pm.funcs->get_fan_control_mode((adev)) | 2277 | #define amdgpu_dpm_get_temperature(adev) \ |
2295 | #define amdgpu_dpm_set_fan_speed_percent(adev, s) (adev)->pm.funcs->set_fan_speed_percent((adev), (s)) | 2278 | (adev)->pp_enabled ? \ |
2296 | #define amdgpu_dpm_get_fan_speed_percent(adev, s) (adev)->pm.funcs->get_fan_speed_percent((adev), (s)) | 2279 | (adev)->powerplay.pp_funcs->get_temperature((adev)->powerplay.pp_handle) : \ |
2280 | (adev)->pm.funcs->get_temperature((adev)) | ||
2281 | |||
2282 | #define amdgpu_dpm_set_fan_control_mode(adev, m) \ | ||
2283 | (adev)->pp_enabled ? \ | ||
2284 | (adev)->powerplay.pp_funcs->set_fan_control_mode((adev)->powerplay.pp_handle, (m)) : \ | ||
2285 | (adev)->pm.funcs->set_fan_control_mode((adev), (m)) | ||
2286 | |||
2287 | #define amdgpu_dpm_get_fan_control_mode(adev) \ | ||
2288 | (adev)->pp_enabled ? \ | ||
2289 | (adev)->powerplay.pp_funcs->get_fan_control_mode((adev)->powerplay.pp_handle) : \ | ||
2290 | (adev)->pm.funcs->get_fan_control_mode((adev)) | ||
2291 | |||
2292 | #define amdgpu_dpm_set_fan_speed_percent(adev, s) \ | ||
2293 | (adev)->pp_enabled ? \ | ||
2294 | (adev)->powerplay.pp_funcs->set_fan_speed_percent((adev)->powerplay.pp_handle, (s)) : \ | ||
2295 | (adev)->pm.funcs->set_fan_speed_percent((adev), (s)) | ||
2296 | |||
2297 | #define amdgpu_dpm_get_fan_speed_percent(adev, s) \ | ||
2298 | (adev)->pp_enabled ? \ | ||
2299 | (adev)->powerplay.pp_funcs->get_fan_speed_percent((adev)->powerplay.pp_handle, (s)) : \ | ||
2300 | (adev)->pm.funcs->get_fan_speed_percent((adev), (s)) | ||
2301 | |||
2302 | #define amdgpu_dpm_get_sclk(adev, l) \ | ||
2303 | (adev)->pp_enabled ? \ | ||
2304 | (adev)->powerplay.pp_funcs->get_sclk((adev)->powerplay.pp_handle, (l)) : \ | ||
2305 | (adev)->pm.funcs->get_sclk((adev), (l)) | ||
2306 | |||
2307 | #define amdgpu_dpm_get_mclk(adev, l) \ | ||
2308 | (adev)->pp_enabled ? \ | ||
2309 | (adev)->powerplay.pp_funcs->get_mclk((adev)->powerplay.pp_handle, (l)) : \ | ||
2310 | (adev)->pm.funcs->get_mclk((adev), (l)) | ||
2311 | |||
2312 | |||
2313 | #define amdgpu_dpm_force_performance_level(adev, l) \ | ||
2314 | (adev)->pp_enabled ? \ | ||
2315 | (adev)->powerplay.pp_funcs->force_performance_level((adev)->powerplay.pp_handle, (l)) : \ | ||
2316 | (adev)->pm.funcs->force_performance_level((adev), (l)) | ||
2317 | |||
2318 | #define amdgpu_dpm_powergate_uvd(adev, g) \ | ||
2319 | (adev)->pp_enabled ? \ | ||
2320 | (adev)->powerplay.pp_funcs->powergate_uvd((adev)->powerplay.pp_handle, (g)) : \ | ||
2321 | (adev)->pm.funcs->powergate_uvd((adev), (g)) | ||
2322 | |||
2323 | #define amdgpu_dpm_powergate_vce(adev, g) \ | ||
2324 | (adev)->pp_enabled ? \ | ||
2325 | (adev)->powerplay.pp_funcs->powergate_vce((adev)->powerplay.pp_handle, (g)) : \ | ||
2326 | (adev)->pm.funcs->powergate_vce((adev), (g)) | ||
2327 | |||
2328 | #define amdgpu_dpm_debugfs_print_current_performance_level(adev, m) \ | ||
2329 | (adev)->pp_enabled ? \ | ||
2330 | (adev)->powerplay.pp_funcs->print_current_performance_level((adev)->powerplay.pp_handle, (m)) : \ | ||
2331 | (adev)->pm.funcs->debugfs_print_current_performance_level((adev), (m)) | ||
2332 | |||
2333 | #define amdgpu_dpm_get_current_power_state(adev) \ | ||
2334 | (adev)->powerplay.pp_funcs->get_current_power_state((adev)->powerplay.pp_handle) | ||
2335 | |||
2336 | #define amdgpu_dpm_get_performance_level(adev) \ | ||
2337 | (adev)->powerplay.pp_funcs->get_performance_level((adev)->powerplay.pp_handle) | ||
2338 | |||
2339 | #define amdgpu_dpm_dispatch_task(adev, event_id, input, output) \ | ||
2340 | (adev)->powerplay.pp_funcs->dispatch_tasks((adev)->powerplay.pp_handle, (event_id), (input), (output)) | ||
2297 | 2341 | ||
2298 | #define amdgpu_gds_switch(adev, r, v, d, w, a) (adev)->gds.funcs->patch_gds_switch((r), (v), (d), (w), (a)) | 2342 | #define amdgpu_gds_switch(adev, r, v, d, w, a) (adev)->gds.funcs->patch_gds_switch((r), (v), (d), (w), (a)) |
2299 | 2343 | ||