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

Commit 28a48884 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amd/powerplay: modify VddcPhase value for polaris kicker

parent 5d7213b0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -494,6 +494,7 @@ static int polaris10_populate_ulv_level(struct pp_hwmgr *hwmgr,
	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
	struct phm_ppt_v1_information *table_info =
			(struct phm_ppt_v1_information *)(hwmgr->pptable);
	struct pp_smumgr *smumgr = hwmgr->smumgr;

	state->CcPwrDynRm = 0;
	state->CcPwrDynRm1 = 0;
@@ -502,6 +503,9 @@ static int polaris10_populate_ulv_level(struct pp_hwmgr *hwmgr,
	state->VddcOffsetVid = (uint8_t)(table_info->us_ulv_voltage_offset *
			VOLTAGE_VID_OFFSET_SCALE2 / VOLTAGE_VID_OFFSET_SCALE1);

	if (smumgr->is_kicker)
		state->VddcPhase = data->vddc_phase_shed_control ^ 0x3;
	else
		state->VddcPhase = (data->vddc_phase_shed_control) ? 0 : 1;

	CONVERT_FROM_HOST_TO_SMC_UL(state->CcPwrDynRm);