/linux-6.1.9/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ |
D | vega20_thermal.c | 121 uint32_t duty100, duty; in vega20_fan_ctrl_get_fan_speed_pwm() local 124 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in vega20_fan_ctrl_get_fan_speed_pwm() 129 if (!duty100) in vega20_fan_ctrl_get_fan_speed_pwm() 133 do_div(tmp64, duty100); in vega20_fan_ctrl_get_fan_speed_pwm() 143 uint32_t duty100; in vega20_fan_ctrl_set_fan_speed_pwm() local 152 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in vega20_fan_ctrl_set_fan_speed_pwm() 155 if (duty100 == 0) in vega20_fan_ctrl_set_fan_speed_pwm() 158 tmp64 = (uint64_t)speed * duty100; in vega20_fan_ctrl_set_fan_speed_pwm()
|
D | smu7_thermal.c | 57 uint32_t duty100; in smu7_fan_ctrl_get_fan_speed_pwm() local 64 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in smu7_fan_ctrl_get_fan_speed_pwm() 69 if (duty100 == 0) in smu7_fan_ctrl_get_fan_speed_pwm() 74 do_div(tmp64, duty100); in smu7_fan_ctrl_get_fan_speed_pwm() 206 uint32_t duty100; in smu7_fan_ctrl_set_fan_speed_pwm() local 218 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in smu7_fan_ctrl_set_fan_speed_pwm() 221 if (duty100 == 0) in smu7_fan_ctrl_set_fan_speed_pwm() 224 tmp64 = (uint64_t)speed * duty100; in smu7_fan_ctrl_set_fan_speed_pwm()
|
D | vega10_thermal.c | 71 uint32_t duty100, duty; in vega10_fan_ctrl_get_fan_speed_pwm() local 74 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in vega10_fan_ctrl_get_fan_speed_pwm() 79 if (!duty100) in vega10_fan_ctrl_get_fan_speed_pwm() 83 do_div(tmp64, duty100); in vega10_fan_ctrl_get_fan_speed_pwm() 251 uint32_t duty100; in vega10_fan_ctrl_set_fan_speed_pwm() local 263 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in vega10_fan_ctrl_set_fan_speed_pwm() 266 if (duty100 == 0) in vega10_fan_ctrl_set_fan_speed_pwm() 269 tmp64 = (uint64_t)speed * duty100; in vega10_fan_ctrl_set_fan_speed_pwm()
|
/linux-6.1.9/drivers/gpu/drm/amd/pm/swsmu/smu11/ |
D | smu_v11_0.c | 1199 uint32_t duty100, duty; in smu_v11_0_set_fan_speed_pwm() local 1204 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in smu_v11_0_set_fan_speed_pwm() 1206 if (!duty100) in smu_v11_0_set_fan_speed_pwm() 1209 tmp64 = (uint64_t)speed * duty100; in smu_v11_0_set_fan_speed_pwm() 1254 uint32_t duty100, duty; in smu_v11_0_get_fan_speed_pwm() local 1268 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1), in smu_v11_0_get_fan_speed_pwm() 1272 if (!duty100) in smu_v11_0_get_fan_speed_pwm() 1276 do_div(tmp64, duty100); in smu_v11_0_get_fan_speed_pwm()
|
D | arcturus_ppt.c | 1244 uint32_t duty100, duty; in arcturus_set_fan_speed_pwm() local 1249 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1_ARCT), in arcturus_set_fan_speed_pwm() 1251 if (!duty100) in arcturus_set_fan_speed_pwm() 1254 tmp64 = (uint64_t)speed * duty100; in arcturus_set_fan_speed_pwm() 1289 uint32_t duty100, duty; in arcturus_get_fan_speed_pwm() local 1303 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, mmCG_FDO_CTRL1_ARCT), in arcturus_get_fan_speed_pwm() 1308 if (duty100) { in arcturus_get_fan_speed_pwm() 1310 do_div(tmp64, duty100); in arcturus_get_fan_speed_pwm()
|
/linux-6.1.9/drivers/gpu/drm/amd/pm/powerplay/smumgr/ |
D | fiji_smumgr.c | 2133 uint32_t duty100; in fiji_thermal_setup_fan_table() local 2152 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_thermal_setup_fan_table() 2155 if (duty100 == 0) { in fiji_thermal_setup_fan_table() 2162 usPWMMin * duty100; in fiji_thermal_setup_fan_table() 2176 slope1 = (uint16_t)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in fiji_thermal_setup_fan_table() 2177 slope2 = (uint16_t)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in fiji_thermal_setup_fan_table() 2206 fan_table.FdoMax = cpu_to_be16((uint16_t)duty100); in fiji_thermal_setup_fan_table()
|
D | iceland_smumgr.c | 2089 uint32_t duty100; in iceland_thermal_setup_fan_table() local 2110 …duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_FDO_CTRL1, FMAX_DUTY100… in iceland_thermal_setup_fan_table() 2112 if (0 == duty100) { in iceland_thermal_setup_fan_table() 2117 tmp64 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin * duty100; in iceland_thermal_setup_fan_table() 2127 slope1 = (uint16_t)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in iceland_thermal_setup_fan_table() 2128 slope2 = (uint16_t)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in iceland_thermal_setup_fan_table() 2151 fan_table.FdoMax = cpu_to_be16((uint16_t)duty100); in iceland_thermal_setup_fan_table()
|
D | polaris10_smumgr.c | 2171 uint32_t duty100; in polaris10_thermal_setup_fan_table() local 2190 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in polaris10_thermal_setup_fan_table() 2193 if (duty100 == 0) { in polaris10_thermal_setup_fan_table() 2204 usPWMMin * duty100; in polaris10_thermal_setup_fan_table() 2218 slope1 = (uint16_t)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in polaris10_thermal_setup_fan_table() 2219 slope2 = (uint16_t)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in polaris10_thermal_setup_fan_table() 2248 fan_table.FdoMax = cpu_to_be16((uint16_t)duty100); in polaris10_thermal_setup_fan_table()
|
D | ci_smumgr.c | 2130 uint32_t duty100; in ci_thermal_setup_fan_table() local 2151 …duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_FDO_CTRL1, FMAX_DUTY100… in ci_thermal_setup_fan_table() 2153 if (0 == duty100) { in ci_thermal_setup_fan_table() 2158 tmp64 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin * duty100; in ci_thermal_setup_fan_table() 2168 slope1 = (uint16_t)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in ci_thermal_setup_fan_table() 2169 slope2 = (uint16_t)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in ci_thermal_setup_fan_table() 2192 fan_table.FdoMax = cpu_to_be16((uint16_t)duty100); in ci_thermal_setup_fan_table()
|
D | tonga_smumgr.c | 2465 uint32_t duty100; in tonga_thermal_setup_fan_table() local 2488 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, in tonga_thermal_setup_fan_table() 2492 if (0 == duty100) { in tonga_thermal_setup_fan_table() 2498 tmp64 = hwmgr->thermal_controller.advanceFanControlParameters.usPWMMin * duty100; in tonga_thermal_setup_fan_table() 2512 slope1 = (uint16_t)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in tonga_thermal_setup_fan_table() 2513 slope2 = (uint16_t)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in tonga_thermal_setup_fan_table() 2536 fan_table.FdoMax = cpu_to_be16((uint16_t)duty100); in tonga_thermal_setup_fan_table()
|
/linux-6.1.9/drivers/gpu/drm/radeon/ |
D | si_dpm.c | 6014 u32 duty100; in si_thermal_setup_fan_table() local 6026 duty100 = (RREG32(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in si_thermal_setup_fan_table() 6028 if (duty100 == 0) { in si_thermal_setup_fan_table() 6033 tmp64 = (u64)rdev->pm.dpm.fan.pwm_min * duty100; in si_thermal_setup_fan_table() 6043 slope1 = (u16)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in si_thermal_setup_fan_table() 6044 slope2 = (u16)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in si_thermal_setup_fan_table() 6068 fan_table.fdo_max = cpu_to_be16((u16)duty100); in si_thermal_setup_fan_table() 6119 u32 duty, duty100; in si_fan_ctrl_get_fan_speed_percent() local 6125 duty100 = (RREG32(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in si_fan_ctrl_get_fan_speed_percent() 6128 if (duty100 == 0) in si_fan_ctrl_get_fan_speed_percent() [all …]
|
D | ci_dpm.c | 936 u32 duty100; in ci_thermal_setup_fan_table() local 948 duty100 = (RREG32_SMC(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in ci_thermal_setup_fan_table() 950 if (duty100 == 0) { in ci_thermal_setup_fan_table() 955 tmp64 = (u64)rdev->pm.dpm.fan.pwm_min * duty100; in ci_thermal_setup_fan_table() 965 slope1 = (u16)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in ci_thermal_setup_fan_table() 966 slope2 = (u16)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in ci_thermal_setup_fan_table() 990 fan_table.FdoMax = cpu_to_be16((u16)duty100); in ci_thermal_setup_fan_table() 1053 u32 duty, duty100; in ci_fan_ctrl_get_fan_speed_percent() local 1059 duty100 = (RREG32_SMC(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in ci_fan_ctrl_get_fan_speed_percent() 1062 if (duty100 == 0) in ci_fan_ctrl_get_fan_speed_percent() [all …]
|
/linux-6.1.9/drivers/gpu/drm/amd/pm/legacy-dpm/ |
D | si_dpm.c | 6488 u32 duty100; in si_thermal_setup_fan_table() local 6500 duty100 = (RREG32(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in si_thermal_setup_fan_table() 6502 if (duty100 == 0) { in si_thermal_setup_fan_table() 6507 tmp64 = (u64)adev->pm.dpm.fan.pwm_min * duty100; in si_thermal_setup_fan_table() 6517 slope1 = (u16)((50 + ((16 * duty100 * pwm_diff1) / t_diff1)) / 100); in si_thermal_setup_fan_table() 6518 slope2 = (u16)((50 + ((16 * duty100 * pwm_diff2) / t_diff2)) / 100); in si_thermal_setup_fan_table() 6534 fan_table.fdo_max = cpu_to_be16((u16)duty100); in si_thermal_setup_fan_table() 6585 u32 duty, duty100; in si_dpm_get_fan_speed_pwm() local 6595 duty100 = (RREG32(CG_FDO_CTRL1) & FMAX_DUTY100_MASK) >> FMAX_DUTY100_SHIFT; in si_dpm_get_fan_speed_pwm() 6598 if (duty100 == 0) in si_dpm_get_fan_speed_pwm() [all …]
|
/linux-6.1.9/drivers/gpu/drm/amd/pm/swsmu/smu13/ |
D | smu_v13_0.c | 1208 uint32_t duty100, duty; in smu_v13_0_set_fan_speed_pwm() local 1216 duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0, regCG_FDO_CTRL1), in smu_v13_0_set_fan_speed_pwm() 1218 if (!duty100) in smu_v13_0_set_fan_speed_pwm() 1221 tmp64 = (uint64_t)speed * duty100; in smu_v13_0_set_fan_speed_pwm()
|