提交 0c69dd0a 编写于 作者: T Tom St Denis 提交者: Alex Deucher

drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_default_mode()

Signed-off-by: NTom St Denis <tom.stdenis@amd.com>
Reviewed-by: NRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 893c3880
......@@ -173,14 +173,13 @@ int vega10_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
if (!hwmgr->fan_ctrl_is_in_default_mode) {
cgs_write_register(hwmgr->device, reg,
(cgs_read_register(hwmgr->device, reg) &
~CG_FDO_CTRL2__FDO_PWM_MODE_MASK) |
(hwmgr->fan_ctrl_default_mode <<
CG_FDO_CTRL2__FDO_PWM_MODE__SHIFT));
CGS_REG_SET_FIELD(cgs_read_register(hwmgr->device, reg),
CG_FDO_CTRL2, FDO_PWM_MODE,
hwmgr->fan_ctrl_default_mode));
cgs_write_register(hwmgr->device, reg,
(cgs_read_register(hwmgr->device, reg) &
~CG_FDO_CTRL2__TMIN_MASK) |
(hwmgr->tmin << CG_FDO_CTRL2__TMIN__SHIFT));
CGS_REG_SET_FIELD(cgs_read_register(hwmgr->device, reg),
CG_FDO_CTRL2, TMIN,
hwmgr->tmin << CG_FDO_CTRL2__TMIN__SHIFT));
hwmgr->fan_ctrl_is_in_default_mode = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册