Lines Matching refs:devfreq

23 	unsigned long old_clk_rate = pfdev->devfreq.cur_freq;  in panfrost_devfreq_target()
56 regulator_set_voltage(pfdev->regulator, pfdev->devfreq.cur_volt, in panfrost_devfreq_target()
57 pfdev->devfreq.cur_volt); in panfrost_devfreq_target()
68 pfdev->devfreq.cur_freq = target_rate; in panfrost_devfreq_target()
69 pfdev->devfreq.cur_volt = target_volt; in panfrost_devfreq_target()
80 pfdev->devfreq.slot[i].busy_time = 0; in panfrost_devfreq_reset()
81 pfdev->devfreq.slot[i].idle_time = 0; in panfrost_devfreq_reset()
82 pfdev->devfreq.slot[i].time_last_update = now; in panfrost_devfreq_reset()
97 status->total_time = ktime_to_ns(ktime_add(pfdev->devfreq.slot[0].busy_time, in panfrost_devfreq_get_dev_status()
98 pfdev->devfreq.slot[0].idle_time)); in panfrost_devfreq_get_dev_status()
102 status->busy_time += ktime_to_ns(pfdev->devfreq.slot[i].busy_time); in panfrost_devfreq_get_dev_status()
122 *freq = pfdev->devfreq.cur_freq; in panfrost_devfreq_get_cur_freq()
147 pfdev->devfreq.cur_freq = clk_get_rate(pfdev->clock); in panfrost_devfreq_init()
149 opp = devfreq_recommended_opp(&pfdev->pdev->dev, &pfdev->devfreq.cur_freq, 0); in panfrost_devfreq_init()
153 panfrost_devfreq_profile.initial_freq = pfdev->devfreq.cur_freq; in panfrost_devfreq_init()
156 pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev, in panfrost_devfreq_init()
159 if (IS_ERR(pfdev->devfreq.devfreq)) { in panfrost_devfreq_init()
161 ret = PTR_ERR(pfdev->devfreq.devfreq); in panfrost_devfreq_init()
162 pfdev->devfreq.devfreq = NULL; in panfrost_devfreq_init()
179 if (!pfdev->devfreq.devfreq) in panfrost_devfreq_resume()
184 pfdev->devfreq.slot[i].busy = false; in panfrost_devfreq_resume()
186 devfreq_resume_device(pfdev->devfreq.devfreq); in panfrost_devfreq_resume()
191 if (!pfdev->devfreq.devfreq) in panfrost_devfreq_suspend()
194 devfreq_suspend_device(pfdev->devfreq.devfreq); in panfrost_devfreq_suspend()
199 struct panfrost_devfreq_slot *devfreq_slot = &pfdev->devfreq.slot[slot]; in panfrost_devfreq_update_utilization()
203 if (!pfdev->devfreq.devfreq) in panfrost_devfreq_update_utilization()
207 last = pfdev->devfreq.slot[slot].time_last_update; in panfrost_devfreq_update_utilization()
211 pfdev->devfreq.slot[slot].busy_time += ktime_sub(now, last); in panfrost_devfreq_update_utilization()
213 pfdev->devfreq.slot[slot].idle_time += ktime_sub(now, last); in panfrost_devfreq_update_utilization()
215 pfdev->devfreq.slot[slot].time_last_update = now; in panfrost_devfreq_update_utilization()
221 struct panfrost_devfreq_slot *devfreq_slot = &pfdev->devfreq.slot[slot]; in panfrost_devfreq_record_transition()