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

Commit a2941d01 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher
Browse files

drm/amd/powerplay: fix bug get wrong evv voltage of Polaris.

parent 71451bdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -716,7 +716,7 @@ int phm_get_voltage_evv_on_sclk(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
			*voltage = 1150;
	} else {
		ret = atomctrl_get_voltage_evv_on_sclk_ai(hwmgr, voltage_type, sclk, id, &vol);
		*voltage = (uint16_t)vol/100;
		*voltage = (uint16_t)(vol/100);
	}
	return ret;
}
+2 −1
Original line number Diff line number Diff line
@@ -1320,7 +1320,8 @@ int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_
	if (0 != result)
		return result;

	*voltage = le32_to_cpu(((GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_3 *)(&get_voltage_info_param_space))->ulVoltageLevel);
	*voltage = le32_to_cpu(((GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_3 *)
				(&get_voltage_info_param_space))->ulVoltageLevel);

	return result;
}