Lines Matching refs:pmu
32 struct nvkm_pmu *pmu = device->pmu; in nvkm_pmu_fan_controlled() local
37 if (pmu && pmu->func->code.size) in nvkm_pmu_fan_controlled()
48 nvkm_pmu_pgob(struct nvkm_pmu *pmu, bool enable) in nvkm_pmu_pgob() argument
50 if (pmu && pmu->func->pgob) in nvkm_pmu_pgob()
51 pmu->func->pgob(pmu, enable); in nvkm_pmu_pgob()
57 struct nvkm_pmu *pmu = container_of(work, typeof(*pmu), recv.work); in nvkm_pmu_recv() local
58 return pmu->func->recv(pmu); in nvkm_pmu_recv()
62 nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2], in nvkm_pmu_send() argument
65 if (!pmu || !pmu->func->send) in nvkm_pmu_send()
67 return pmu->func->send(pmu, reply, process, message, data0, data1); in nvkm_pmu_send()
73 struct nvkm_pmu *pmu = nvkm_pmu(subdev); in nvkm_pmu_intr() local
74 if (!pmu->func->intr) in nvkm_pmu_intr()
76 pmu->func->intr(pmu); in nvkm_pmu_intr()
82 struct nvkm_pmu *pmu = nvkm_pmu(subdev); in nvkm_pmu_fini() local
87 if (pmu->func->fini) in nvkm_pmu_fini()
88 pmu->func->fini(pmu); in nvkm_pmu_fini()
96 struct nvkm_pmu *pmu = nvkm_pmu(subdev); in nvkm_pmu_init() local
98 if (!pmu->func->init) in nvkm_pmu_init()
101 return pmu->func->init(pmu); in nvkm_pmu_init()
107 struct nvkm_pmu *pmu = nvkm_pmu(subdev); in nvkm_pmu_dtor() local
108 nvkm_falcon_msgq_del(&pmu->msgq); in nvkm_pmu_dtor()
109 nvkm_falcon_cmdq_del(&pmu->lpq); in nvkm_pmu_dtor()
110 nvkm_falcon_cmdq_del(&pmu->hpq); in nvkm_pmu_dtor()
111 nvkm_falcon_qmgr_del(&pmu->qmgr); in nvkm_pmu_dtor()
112 nvkm_falcon_dtor(&pmu->falcon); in nvkm_pmu_dtor()
113 mutex_destroy(&pmu->send.mutex); in nvkm_pmu_dtor()
127 enum nvkm_subdev_type type, int inst, struct nvkm_pmu *pmu) in nvkm_pmu_ctor() argument
131 nvkm_subdev_ctor(&nvkm_pmu, device, type, inst, &pmu->subdev); in nvkm_pmu_ctor()
133 mutex_init(&pmu->send.mutex); in nvkm_pmu_ctor()
135 INIT_WORK(&pmu->recv.work, nvkm_pmu_recv); in nvkm_pmu_ctor()
136 init_waitqueue_head(&pmu->recv.wait); in nvkm_pmu_ctor()
138 fwif = nvkm_firmware_load(&pmu->subdev, fwif, "Pmu", pmu); in nvkm_pmu_ctor()
142 pmu->func = fwif->func; in nvkm_pmu_ctor()
144 ret = nvkm_falcon_ctor(pmu->func->flcn, &pmu->subdev, pmu->subdev.name, in nvkm_pmu_ctor()
145 0x10a000, &pmu->falcon); in nvkm_pmu_ctor()
149 if ((ret = nvkm_falcon_qmgr_new(&pmu->falcon, &pmu->qmgr)) || in nvkm_pmu_ctor()
150 (ret = nvkm_falcon_cmdq_new(pmu->qmgr, "hpq", &pmu->hpq)) || in nvkm_pmu_ctor()
151 (ret = nvkm_falcon_cmdq_new(pmu->qmgr, "lpq", &pmu->lpq)) || in nvkm_pmu_ctor()
152 (ret = nvkm_falcon_msgq_new(pmu->qmgr, "msgq", &pmu->msgq))) in nvkm_pmu_ctor()
155 init_completion(&pmu->wpr_ready); in nvkm_pmu_ctor()
163 struct nvkm_pmu *pmu; in nvkm_pmu_new_() local
164 if (!(pmu = *ppmu = kzalloc(sizeof(*pmu), GFP_KERNEL))) in nvkm_pmu_new_()