aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/si_dpm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-03-20 21:46:05 -0400
committerDave Airlie <airlied@redhat.com>2018-03-20 21:46:05 -0400
commit287d2ac36b6f2830ea4ef66c110abc0f47a9a658 (patch)
tree04214f156461a95c2f7ca5a8821063cad7fc515e /drivers/gpu/drm/amd/amdgpu/si_dpm.c
parent963976cfe9c54d4d9e725e61c90c47a4af6b5ea2 (diff)
parent6da2b9332c572fcda94de9631f8fa514f574388a (diff)
Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next
- Continued cleanup and restructuring of powerplay - Fetch VRAM type from vbios rather than hardcoding for SOC15 asics - Allow ttm to drop its backing store when drivers don't need it - DC bandwidth calc updates - Enable DC backlight control pre-DCE11 asics - Enable DC on all supported asics - DC Fixes for planes due to the way our hw is ordered vs what drm expects - DC CTM/regamma fixes - Misc cleanup and bug fixes * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (89 commits) amdgpu/dm: Default PRE_VEGA ASIC support to 'y' drm/amd/pp: Remove the cgs wrapper for notify smu version on APU drm/amd/display: fix dereferencing possible ERR_PTR() drm/amd/display: Refine disable VGA drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel drm/radeon: Don't turn off DP sink when disconnected drm/amd/pp: Rename file name cz_* to smu8_* drm/amd/pp: Replace function/struct name cz_* with smu8_* drm/amd/pp: Remove unneeded void * casts in cz_hwmgr.c/cz_smumgr.c drm/amd/pp: Mv cz uvd/vce pg/dpm functions to cz_hwmgr.c drm/amd/pp: Remove dead header file pp_asicblocks.h drm/amd/pp: Delete dead code on cz_clockpowergating.c drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c drm/amdgpu: Remove wrapper layer of smu ip functions drm/amdgpu: Don't compared ip_block_type with ip_block_index drm/amdgpu: Plus NULL function pointer check drm/amd/pp: Move helper functions to smu_help.c drm/amd/pp: Replace rv_* with smu10_* drm/amd/pp: Fix function parameter not correct drm/amd/pp: Add rv_copy_table_from/to_smc to smu backend function table ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dpm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index 8137c02fd16a..3bfcf0d257ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -67,6 +67,8 @@ MODULE_FIRMWARE("radeon/hainan_smc.bin");
67MODULE_FIRMWARE("radeon/hainan_k_smc.bin"); 67MODULE_FIRMWARE("radeon/hainan_k_smc.bin");
68MODULE_FIRMWARE("radeon/banks_k_2_smc.bin"); 68MODULE_FIRMWARE("radeon/banks_k_2_smc.bin");
69 69
70static const struct amd_pm_funcs si_dpm_funcs;
71
70union power_info { 72union power_info {
71 struct _ATOM_POWERPLAY_INFO info; 73 struct _ATOM_POWERPLAY_INFO info;
72 struct _ATOM_POWERPLAY_INFO_V2 info_2; 74 struct _ATOM_POWERPLAY_INFO_V2 info_2;
@@ -7914,6 +7916,7 @@ static int si_dpm_early_init(void *handle)
7914 7916
7915 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 7917 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7916 7918
7919 adev->powerplay.pp_funcs = &si_dpm_funcs;
7917 si_dpm_set_irq_funcs(adev); 7920 si_dpm_set_irq_funcs(adev);
7918 return 0; 7921 return 0;
7919} 7922}
@@ -8014,7 +8017,7 @@ static int si_dpm_read_sensor(void *handle, int idx,
8014 } 8017 }
8015} 8018}
8016 8019
8017const struct amd_ip_funcs si_dpm_ip_funcs = { 8020static const struct amd_ip_funcs si_dpm_ip_funcs = {
8018 .name = "si_dpm", 8021 .name = "si_dpm",
8019 .early_init = si_dpm_early_init, 8022 .early_init = si_dpm_early_init,
8020 .late_init = si_dpm_late_init, 8023 .late_init = si_dpm_late_init,
@@ -8031,7 +8034,16 @@ const struct amd_ip_funcs si_dpm_ip_funcs = {
8031 .set_powergating_state = si_dpm_set_powergating_state, 8034 .set_powergating_state = si_dpm_set_powergating_state,
8032}; 8035};
8033 8036
8034const struct amd_pm_funcs si_dpm_funcs = { 8037const struct amdgpu_ip_block_version si_smu_ip_block =
8038{
8039 .type = AMD_IP_BLOCK_TYPE_SMC,
8040 .major = 6,
8041 .minor = 0,
8042 .rev = 0,
8043 .funcs = &si_dpm_ip_funcs,
8044};
8045
8046static const struct amd_pm_funcs si_dpm_funcs = {
8035 .pre_set_power_state = &si_dpm_pre_set_power_state, 8047 .pre_set_power_state = &si_dpm_pre_set_power_state,
8036 .set_power_state = &si_dpm_set_power_state, 8048 .set_power_state = &si_dpm_set_power_state,
8037 .post_set_power_state = &si_dpm_post_set_power_state, 8049 .post_set_power_state = &si_dpm_post_set_power_state,