diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si_dpm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si_dpm.c | 16 |
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"); | |||
67 | MODULE_FIRMWARE("radeon/hainan_k_smc.bin"); | 67 | MODULE_FIRMWARE("radeon/hainan_k_smc.bin"); |
68 | MODULE_FIRMWARE("radeon/banks_k_2_smc.bin"); | 68 | MODULE_FIRMWARE("radeon/banks_k_2_smc.bin"); |
69 | 69 | ||
70 | static const struct amd_pm_funcs si_dpm_funcs; | ||
71 | |||
70 | union power_info { | 72 | union 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 | ||
8017 | const struct amd_ip_funcs si_dpm_ip_funcs = { | 8020 | static 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 | ||
8034 | const struct amd_pm_funcs si_dpm_funcs = { | 8037 | const 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 | |||
8046 | static 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, |