Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4309526 authored by Junwei Zhang's avatar Junwei Zhang Committed by Alex Deucher
Browse files

drm/amdgpu/powerplay: add Polaris12 support

parent c4642a47
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -98,6 +98,7 @@ static int amdgpu_pp_early_init(void *handle)
	switch (adev->asic_type) {
	switch (adev->asic_type) {
	case CHIP_POLARIS11:
	case CHIP_POLARIS11:
	case CHIP_POLARIS10:
	case CHIP_POLARIS10:
	case CHIP_POLARIS12:
	case CHIP_TONGA:
	case CHIP_TONGA:
	case CHIP_FIJI:
	case CHIP_FIJI:
	case CHIP_TOPAZ:
	case CHIP_TOPAZ:
+2 −1
Original line number Original line Diff line number Diff line
@@ -95,6 +95,7 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
			break;
			break;
		case CHIP_POLARIS11:
		case CHIP_POLARIS11:
		case CHIP_POLARIS10:
		case CHIP_POLARIS10:
		case CHIP_POLARIS12:
			polaris_set_asic_special_caps(hwmgr);
			polaris_set_asic_special_caps(hwmgr);
			hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK);
			hwmgr->feature_mask &= ~(PP_UVD_HANDSHAKE_MASK);
			break;
			break;
@@ -745,7 +746,7 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
				PHM_PlatformCaps_TablelessHardwareInterface);
				PHM_PlatformCaps_TablelessHardwareInterface);


	if (hwmgr->chip_id == CHIP_POLARIS11)
	if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12))
		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
					PHM_PlatformCaps_SPLLShutdownSupport);
					PHM_PlatformCaps_SPLLShutdownSupport);
	return 0;
	return 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -521,7 +521,7 @@ int smu7_enable_didt_config(struct pp_hwmgr *hwmgr)
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
				result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris10);
				result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris10);
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
			} else if (hwmgr->chip_id == CHIP_POLARIS11) {
			} else if ((hwmgr->chip_id == CHIP_POLARIS11) || (hwmgr->chip_id == CHIP_POLARIS12)) {
				result = smu7_program_pt_config_registers(hwmgr, GCCACConfig_Polaris11);
				result = smu7_program_pt_config_registers(hwmgr, GCCACConfig_Polaris11);
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
				PP_ASSERT_WITH_CODE((result == 0), "DIDT Config failed.", return result);
				result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris11);
				result = smu7_program_pt_config_registers(hwmgr, DIDTConfig_Polaris11);
+1 −0
Original line number Original line Diff line number Diff line
@@ -65,6 +65,7 @@ int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
			break;
			break;
		case CHIP_POLARIS11:
		case CHIP_POLARIS11:
		case CHIP_POLARIS10:
		case CHIP_POLARIS10:
		case CHIP_POLARIS12:
			polaris10_smum_init(smumgr);
			polaris10_smum_init(smumgr);
			break;
			break;
		default:
		default: