Skip to content

Commit

Permalink
drm/amd/powerplay: fix bug get wrong evv voltage of Polaris.
Browse files Browse the repository at this point in the history
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Rex Zhu authored and Alex Deucher committed Oct 27, 2016
1 parent 71451bd commit a2941d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a2941d0

Please sign in to comment.