aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-08-11 04:51:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-19 13:22:13 -0400
commitfb044ed90c6f87dba95729a8deddcd860b16fec3 (patch)
tree990592a62d6d4af0d0282daaab6fdc1ad7b6c3d2 /drivers/gpu
parent1486022088dea351805e4db4fc76c4d7c68733d6 (diff)
drm/amd/powerplay: use smu7_hwmgr to manager tonga.
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')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/Makefile4
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c32
2 files changed, 30 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
index dffcd8af881e..69e6d156a4c3 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
@@ -4,12 +4,10 @@
4 4
5HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \ 5HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \
6 hardwaremanager.o pp_acpi.o cz_hwmgr.o \ 6 hardwaremanager.o pp_acpi.o cz_hwmgr.o \
7 cz_clockpowergating.o tonga_powertune.o\ 7 cz_clockpowergating.o pppcielanes.o\
8 process_pptables_v1_0.o ppatomctrl.o \ 8 process_pptables_v1_0.o ppatomctrl.o \
9 tonga_hwmgr.o pppcielanes.o tonga_thermal.o\
10 smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \ 9 smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \
11 smu7_clockpowergating.o iceland_hwmgr.o \ 10 smu7_clockpowergating.o iceland_hwmgr.o \
12 tonga_clockpowergating.o \
13 iceland_clockpowergating.o iceland_thermal.o \ 11 iceland_clockpowergating.o iceland_thermal.o \
14 iceland_powertune.o 12 iceland_powertune.o
15 13
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 449780cf140d..7ca8aaa88444 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
38extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr); 38extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr);
39extern int tonga_hwmgr_init(struct pp_hwmgr *hwmgr);
40extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr); 39extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr);
41 40
42static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); 41static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr);
43static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); 42static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr);
44static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); 43static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr);
45static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr); 44static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr);
45static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr);
46 46
47uint8_t convert_to_vid(uint16_t vddc) 47uint8_t convert_to_vid(uint16_t vddc)
48{ 48{
@@ -82,9 +82,11 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
82 iceland_hwmgr_init(hwmgr); 82 iceland_hwmgr_init(hwmgr);
83 break; 83 break;
84 case CHIP_TONGA: 84 case CHIP_TONGA:
85 tonga_hwmgr_init(hwmgr); 85 smu7_hwmgr_init(hwmgr);
86 tonga_set_asic_special_caps(hwmgr);
87 hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK |
88 PP_VBI_TIME_SUPPORT_MASK);
86 break; 89 break;
87
88 case CHIP_FIJI: 90 case CHIP_FIJI:
89 smu7_hwmgr_init(hwmgr); 91 smu7_hwmgr_init(hwmgr);
90 fiji_set_asic_special_caps(hwmgr); 92 fiji_set_asic_special_caps(hwmgr);
@@ -768,3 +770,27 @@ int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
768 return 0; 770 return 0;
769} 771}
770 772
773int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
774{
775 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
776 PHM_PlatformCaps_SQRamping);
777 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
778 PHM_PlatformCaps_DBRamping);
779 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
780 PHM_PlatformCaps_TDRamping);
781 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
782 PHM_PlatformCaps_TCPRamping);
783
784 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
785 PHM_PlatformCaps_UVDPowerGating);
786 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
787 PHM_PlatformCaps_VCEPowerGating);
788
789 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
790 PHM_PlatformCaps_TablelessHardwareInterface);
791
792 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
793 PHM_PlatformCaps_CAC);
794
795 return 0;
796}