diff options
| author | Rex Zhu <Rex.Zhu@amd.com> | 2016-08-25 08:08:03 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-19 13:22:17 -0400 |
| commit | ab4f06d3adcc5165b13ed2e657050fd1808f319b (patch) | |
| tree | 94b2ae664126e742760efd6129160a0f48e3ec48 /drivers/gpu/drm/amd/powerplay | |
| parent | 18aafc59b1067185f80597fc3331e5117c63834d (diff) | |
drm/amd/powerplay: use smu7 hwmgr to manager iceland
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
| -rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 33 |
2 files changed, 27 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile index 69e6d156a4c3..5fff1d636ab7 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | |||
| @@ -7,9 +7,7 @@ HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \ | |||
| 7 | cz_clockpowergating.o pppcielanes.o\ | 7 | cz_clockpowergating.o pppcielanes.o\ |
| 8 | process_pptables_v1_0.o ppatomctrl.o \ | 8 | process_pptables_v1_0.o ppatomctrl.o \ |
| 9 | smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \ | 9 | smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \ |
| 10 | smu7_clockpowergating.o iceland_hwmgr.o \ | 10 | smu7_clockpowergating.o |
| 11 | iceland_clockpowergating.o iceland_thermal.o \ | ||
| 12 | iceland_powertune.o | ||
| 13 | 11 | ||
| 14 | 12 | ||
| 15 | AMD_PP_HWMGR = $(addprefix $(AMD_PP_PATH)/hwmgr/,$(HARDWARE_MGR)) | 13 | AMD_PP_HWMGR = $(addprefix $(AMD_PP_PATH)/hwmgr/,$(HARDWARE_MGR)) |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 7ca8aaa88444..1167205057b3 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | |||
| @@ -36,13 +36,13 @@ | |||
| 36 | #include "amd_acpi.h" | 36 | #include "amd_acpi.h" |
| 37 | 37 | ||
| 38 | extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr); | 38 | extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr); |
| 39 | extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr); | ||
| 40 | 39 | ||
| 41 | static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); | 40 | static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); |
| 42 | static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); | 41 | static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); |
| 43 | static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); | 42 | static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); |
| 44 | static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr); | 43 | static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr); |
| 45 | static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr); | 44 | static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr); |
| 45 | static int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr); | ||
| 46 | 46 | ||
| 47 | uint8_t convert_to_vid(uint16_t vddc) | 47 | uint8_t convert_to_vid(uint16_t vddc) |
| 48 | { | 48 | { |
| @@ -79,16 +79,18 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle) | |||
| 79 | case AMDGPU_FAMILY_VI: | 79 | case AMDGPU_FAMILY_VI: |
| 80 | switch (hwmgr->chip_id) { | 80 | switch (hwmgr->chip_id) { |
| 81 | case CHIP_TOPAZ: | 81 | case CHIP_TOPAZ: |
| 82 | iceland_hwmgr_init(hwmgr); | 82 | topaz_set_asic_special_caps(hwmgr); |
| 83 | hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK | | ||
| 84 | PP_VBI_TIME_SUPPORT_MASK | | ||
| 85 | PP_ENABLE_GFX_CG_THRU_SMU); | ||
| 86 | hwmgr->pp_table_version = PP_TABLE_V0; | ||
| 83 | break; | 87 | break; |
| 84 | case CHIP_TONGA: | 88 | case CHIP_TONGA: |
| 85 | smu7_hwmgr_init(hwmgr); | ||
| 86 | tonga_set_asic_special_caps(hwmgr); | 89 | tonga_set_asic_special_caps(hwmgr); |
| 87 | hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK | | 90 | hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK | |
| 88 | PP_VBI_TIME_SUPPORT_MASK); | 91 | PP_VBI_TIME_SUPPORT_MASK); |
| 89 | break; | 92 | break; |
| 90 | case CHIP_FIJI: | 93 | case CHIP_FIJI: |
| 91 | smu7_hwmgr_init(hwmgr); | ||
| 92 | fiji_set_asic_special_caps(hwmgr); | 94 | fiji_set_asic_special_caps(hwmgr); |
| 93 | hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK | | 95 | hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK | |
| 94 | PP_VBI_TIME_SUPPORT_MASK | | 96 | PP_VBI_TIME_SUPPORT_MASK | |
| @@ -96,13 +98,13 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle) | |||
| 96 | break; | 98 | break; |
| 97 | case CHIP_POLARIS11: | 99 | case CHIP_POLARIS11: |
| 98 | case CHIP_POLARIS10: | 100 | case CHIP_POLARIS10: |
| 99 | smu7_hwmgr_init(hwmgr); | ||
| 100 | polaris_set_asic_special_caps(hwmgr); | 101 | polaris_set_asic_special_caps(hwmgr); |
| 101 | hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK); | 102 | hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK); |
| 102 | break; | 103 | break; |
| 103 | default: | 104 | default: |
| 104 | return -EINVAL; | 105 | return -EINVAL; |
| 105 | } | 106 | } |
| 107 | smu7_hwmgr_init(hwmgr); | ||
| 106 | break; | 108 | break; |
| 107 | default: | 109 | default: |
| 108 | return -EINVAL; | 110 | return -EINVAL; |
| @@ -215,8 +217,6 @@ int phm_wait_on_register(struct pp_hwmgr *hwmgr, uint32_t index, | |||
| 215 | } | 217 | } |
| 216 | 218 | ||
| 217 | 219 | ||
| 218 | |||
| 219 | |||
| 220 | /** | 220 | /** |
| 221 | * Returns once the part of the register indicated by the mask has | 221 | * Returns once the part of the register indicated by the mask has |
| 222 | * reached the given value.The indirect space is described by giving | 222 | * reached the given value.The indirect space is described by giving |
| @@ -794,3 +794,22 @@ int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr) | |||
| 794 | 794 | ||
| 795 | return 0; | 795 | return 0; |
| 796 | } | 796 | } |
| 797 | |||
| 798 | int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr) | ||
| 799 | { | ||
| 800 | phm_cap_unset(hwmgr->platform_descriptor.platformCaps, | ||
| 801 | PHM_PlatformCaps_SQRamping); | ||
| 802 | phm_cap_unset(hwmgr->platform_descriptor.platformCaps, | ||
| 803 | PHM_PlatformCaps_DBRamping); | ||
| 804 | phm_cap_unset(hwmgr->platform_descriptor.platformCaps, | ||
| 805 | PHM_PlatformCaps_TDRamping); | ||
| 806 | phm_cap_unset(hwmgr->platform_descriptor.platformCaps, | ||
| 807 | PHM_PlatformCaps_TCPRamping); | ||
| 808 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | ||
| 809 | PHM_PlatformCaps_TablelessHardwareInterface); | ||
| 810 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | ||
| 811 | PHM_PlatformCaps_CAC); | ||
| 812 | phm_cap_set(hwmgr->platform_descriptor.platformCaps, | ||
| 813 | PHM_PlatformCaps_EVV); | ||
| 814 | return 0; | ||
| 815 | } | ||
