Lines Matching refs:pmu
51 gk20a_pmu_dvfs_target(struct gk20a_pmu *pmu, int *state) in gk20a_pmu_dvfs_target() argument
53 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_target()
59 gk20a_pmu_dvfs_get_cur_state(struct gk20a_pmu *pmu, int *state) in gk20a_pmu_dvfs_get_cur_state() argument
61 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_get_cur_state()
67 gk20a_pmu_dvfs_get_target_state(struct gk20a_pmu *pmu, in gk20a_pmu_dvfs_get_target_state() argument
70 struct gk20a_pmu_dvfs_data *data = pmu->data; in gk20a_pmu_dvfs_get_target_state()
71 struct nvkm_clk *clk = pmu->base.subdev.device->clk; in gk20a_pmu_dvfs_get_target_state()
86 nvkm_trace(&pmu->base.subdev, "cur level = %d, new level = %d\n", in gk20a_pmu_dvfs_get_target_state()
95 gk20a_pmu_dvfs_get_dev_status(struct gk20a_pmu *pmu, in gk20a_pmu_dvfs_get_dev_status() argument
98 struct nvkm_falcon *falcon = &pmu->base.falcon; in gk20a_pmu_dvfs_get_dev_status()
105 gk20a_pmu_dvfs_reset_dev_status(struct gk20a_pmu *pmu) in gk20a_pmu_dvfs_reset_dev_status() argument
107 struct nvkm_falcon *falcon = &pmu->base.falcon; in gk20a_pmu_dvfs_reset_dev_status()
116 struct gk20a_pmu *pmu = in gk20a_pmu_dvfs_work() local
118 struct gk20a_pmu_dvfs_data *data = pmu->data; in gk20a_pmu_dvfs_work()
120 struct nvkm_subdev *subdev = &pmu->base.subdev; in gk20a_pmu_dvfs_work()
135 gk20a_pmu_dvfs_get_dev_status(pmu, &status); in gk20a_pmu_dvfs_work()
145 gk20a_pmu_dvfs_get_cur_state(pmu, &state); in gk20a_pmu_dvfs_work()
147 if (gk20a_pmu_dvfs_get_target_state(pmu, &state, data->avg_load)) { in gk20a_pmu_dvfs_work()
149 gk20a_pmu_dvfs_target(pmu, &state); in gk20a_pmu_dvfs_work()
153 gk20a_pmu_dvfs_reset_dev_status(pmu); in gk20a_pmu_dvfs_work()
158 gk20a_pmu_fini(struct nvkm_pmu *pmu) in gk20a_pmu_fini() argument
160 struct gk20a_pmu *gpmu = gk20a_pmu(pmu); in gk20a_pmu_fini()
161 nvkm_timer_alarm(pmu->subdev.device->timer, 0, &gpmu->alarm); in gk20a_pmu_fini()
163 nvkm_falcon_put(&pmu->falcon, &pmu->subdev); in gk20a_pmu_fini()
167 gk20a_pmu_init(struct nvkm_pmu *pmu) in gk20a_pmu_init() argument
169 struct gk20a_pmu *gpmu = gk20a_pmu(pmu); in gk20a_pmu_init()
170 struct nvkm_subdev *subdev = &pmu->subdev; in gk20a_pmu_init()
171 struct nvkm_device *device = pmu->subdev.device; in gk20a_pmu_init()
172 struct nvkm_falcon *falcon = &pmu->falcon; in gk20a_pmu_init()
216 struct gk20a_pmu *pmu; in gk20a_pmu_new() local
219 if (!(pmu = kzalloc(sizeof(*pmu), GFP_KERNEL))) in gk20a_pmu_new()
221 *ppmu = &pmu->base; in gk20a_pmu_new()
223 ret = nvkm_pmu_ctor(gk20a_pmu_fwif, device, type, inst, &pmu->base); in gk20a_pmu_new()
227 pmu->data = &gk20a_dvfs_data; in gk20a_pmu_new()
228 nvkm_alarm_init(&pmu->alarm, gk20a_pmu_dvfs_work); in gk20a_pmu_new()