Lines Matching refs:st
329 static void wf_smu_sys_fans_tick(struct wf_smu_sys_fans_state *st) in wf_smu_sys_fans_tick() argument
334 if (--st->ticks != 0) { in wf_smu_sys_fans_tick()
339 st->ticks = WF_SMU_SYS_FANS_INTERVAL; in wf_smu_sys_fans_tick()
352 if (temp > (st->pid.param.itarget + 0x50000)) in wf_smu_sys_fans_tick()
355 new_setpoint = wf_pid_run(&st->pid, temp); in wf_smu_sys_fans_tick()
359 scaled = ((((s64)new_setpoint) * (s64)st->scale0) >> 12) + st->offset0; in wf_smu_sys_fans_tick()
364 cputarget = ((((s64)cputarget) * (s64)st->scale1) >> 12) + st->offset1; in wf_smu_sys_fans_tick()
366 scaled = max(scaled, st->pid.param.min); in wf_smu_sys_fans_tick()
367 scaled = min(scaled, st->pid.param.max); in wf_smu_sys_fans_tick()
371 if (st->sys_setpoint == scaled && new_setpoint == st->hd_setpoint) in wf_smu_sys_fans_tick()
373 st->sys_setpoint = scaled; in wf_smu_sys_fans_tick()
374 st->hd_setpoint = new_setpoint; in wf_smu_sys_fans_tick()
377 rc = wf_control_set(fan_system, st->sys_setpoint); in wf_smu_sys_fans_tick()
385 rc = wf_control_set(fan_hd, st->hd_setpoint); in wf_smu_sys_fans_tick()
473 static void wf_smu_cpu_fans_tick(struct wf_smu_cpu_fans_state *st) in wf_smu_cpu_fans_tick() argument
478 if (--st->ticks != 0) { in wf_smu_cpu_fans_tick()
483 st->ticks = WF_SMU_CPU_FANS_INTERVAL; in wf_smu_cpu_fans_tick()
508 if (temp > st->pid.param.tmax) in wf_smu_cpu_fans_tick()
511 new_setpoint = wf_cpu_pid_run(&st->pid, power, temp); in wf_smu_cpu_fans_tick()
516 systarget = ((((s64)systarget) * (s64)st->scale) >> 12) in wf_smu_cpu_fans_tick()
517 + st->offset; in wf_smu_cpu_fans_tick()
519 new_setpoint = max(new_setpoint, st->pid.param.min); in wf_smu_cpu_fans_tick()
520 new_setpoint = min(new_setpoint, st->pid.param.max); in wf_smu_cpu_fans_tick()
524 if (st->cpu_setpoint == new_setpoint) in wf_smu_cpu_fans_tick()
526 st->cpu_setpoint = new_setpoint; in wf_smu_cpu_fans_tick()
529 rc = wf_control_set(fan_cpu_main, st->cpu_setpoint); in wf_smu_cpu_fans_tick()
709 struct smu_sdbp_sensortree *st = in wf_init_pm() local
711 wf_smu_mach_model = st->model_id; in wf_init_pm()