mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amd/pp: Add a helper to convert VID to voltage value
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>
This commit is contained in:
parent
64b9342f31
commit
9bd2bae13d
@ -60,6 +60,11 @@ uint8_t convert_to_vid(uint16_t vddc)
|
||||
return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25);
|
||||
}
|
||||
|
||||
uint16_t convert_to_vddc(uint8_t vid)
|
||||
{
|
||||
return (uint16_t) ((6200 - (vid * 25)) / VOLTAGE_SCALE);
|
||||
}
|
||||
|
||||
static int phm_get_pci_bus_devfn(struct pp_hwmgr *hwmgr,
|
||||
struct cgs_system_info *sys_info)
|
||||
{
|
||||
|
@ -42,6 +42,7 @@ struct pp_atomctrl_voltage_table;
|
||||
#define VOLTAGE_SCALE 4
|
||||
|
||||
uint8_t convert_to_vid(uint16_t vddc);
|
||||
uint16_t convert_to_vddc(uint8_t vid);
|
||||
|
||||
enum DISPLAY_GAP {
|
||||
DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */
|
||||
|
Loading…
Reference in New Issue
Block a user