aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-08-16 08:00:49 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-19 13:22:12 -0400
commitb859c2070354ad8a2512e1524533d9f3291174c7 (patch)
tree5a496cfb41ddbe563996dc12c8ca5911f28b567b /drivers/gpu
parent18edef19ea44f4379e635bd32b553e58e23bba95 (diff)
drm/amd/powerplay: use smu7 hwmgr to manager fiji
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@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/Makefile3
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c28
2 files changed, 27 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
index 95a3cf10b111..dffcd8af881e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
@@ -7,10 +7,9 @@ HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \
7 cz_clockpowergating.o tonga_powertune.o\ 7 cz_clockpowergating.o tonga_powertune.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\ 9 tonga_hwmgr.o pppcielanes.o tonga_thermal.o\
10 fiji_powertune.o fiji_hwmgr.o tonga_clockpowergating.o \
11 fiji_clockpowergating.o fiji_thermal.o \
12 smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \ 10 smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \
13 smu7_clockpowergating.o iceland_hwmgr.o \ 11 smu7_clockpowergating.o iceland_hwmgr.o \
12 tonga_clockpowergating.o \
14 iceland_clockpowergating.o iceland_thermal.o \ 13 iceland_clockpowergating.o iceland_thermal.o \
15 iceland_powertune.o 14 iceland_powertune.o
16 15
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 78ccbecd7591..449780cf140d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@ -37,12 +37,12 @@
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); 39extern int tonga_hwmgr_init(struct pp_hwmgr *hwmgr);
40extern int fiji_hwmgr_init(struct pp_hwmgr *hwmgr);
41extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr); 40extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr);
42 41
43static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); 42static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr);
44static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); 43static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr);
45static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); 44static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr);
45static int fiji_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{
@@ -84,8 +84,13 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
84 case CHIP_TONGA: 84 case CHIP_TONGA:
85 tonga_hwmgr_init(hwmgr); 85 tonga_hwmgr_init(hwmgr);
86 break; 86 break;
87
87 case CHIP_FIJI: 88 case CHIP_FIJI:
88 fiji_hwmgr_init(hwmgr); 89 smu7_hwmgr_init(hwmgr);
90 fiji_set_asic_special_caps(hwmgr);
91 hwmgr->feature_mask &= ~(PP_SMC_VOLTAGE_CONTROL_MASK |
92 PP_VBI_TIME_SUPPORT_MASK |
93 PP_ENABLE_GFX_CG_THRU_SMU);
89 break; 94 break;
90 case CHIP_POLARIS11: 95 case CHIP_POLARIS11:
91 case CHIP_POLARIS10: 96 case CHIP_POLARIS10:
@@ -744,3 +749,22 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
744 return 0; 749 return 0;
745} 750}
746 751
752int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
753{
754 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
755 PHM_PlatformCaps_SQRamping);
756 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
757 PHM_PlatformCaps_DBRamping);
758 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
759 PHM_PlatformCaps_TDRamping);
760 phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
761 PHM_PlatformCaps_TCPRamping);
762
763 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
764 PHM_PlatformCaps_TablelessHardwareInterface);
765
766 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
767 PHM_PlatformCaps_CAC);
768 return 0;
769}
770