Lines Matching full:disp
41 struct nvkm_disp *disp = container_of(event, typeof(*disp), vblank); in nvkm_disp_vblank_fini() local
42 struct nvkm_head *head = nvkm_head_find(disp, id); in nvkm_disp_vblank_fini()
50 struct nvkm_disp *disp = container_of(event, typeof(*disp), vblank); in nvkm_disp_vblank_init() local
51 struct nvkm_head *head = nvkm_head_find(disp, id); in nvkm_disp_vblank_init()
63 nvkm_disp_vblank(struct nvkm_disp *disp, int head) in nvkm_disp_vblank() argument
65 nvkm_event_ntfy(&disp->vblank, head, NVKM_DISP_HEAD_EVENT_VBLANK); in nvkm_disp_vblank()
85 struct nvkm_disp *disp = nvkm_disp(oclass->engine); in nvkm_disp_class_get() local
87 oclass->base = disp->func->root; in nvkm_disp_class_get()
97 struct nvkm_disp *disp = nvkm_disp(engine); in nvkm_disp_intr() local
98 disp->func->intr(disp); in nvkm_disp_intr()
104 struct nvkm_disp *disp = nvkm_disp(engine); in nvkm_disp_fini() local
107 if (disp->func->fini) in nvkm_disp_fini()
108 disp->func->fini(disp, suspend); in nvkm_disp_fini()
110 list_for_each_entry(outp, &disp->outps, head) { in nvkm_disp_fini()
121 struct nvkm_disp *disp = nvkm_disp(engine); in nvkm_disp_init() local
125 list_for_each_entry(outp, &disp->outps, head) { in nvkm_disp_init()
130 if (disp->func->init) { in nvkm_disp_init()
131 int ret = disp->func->init(disp); in nvkm_disp_init()
139 list_for_each_entry(ior, &disp->iors, head) { in nvkm_disp_init()
150 struct nvkm_disp *disp = nvkm_disp(engine); in nvkm_disp_oneinit() local
151 struct nvkm_subdev *subdev = &disp->engine.subdev; in nvkm_disp_oneinit()
155 if (disp->func->oneinit) { in nvkm_disp_oneinit()
156 ret = disp->func->oneinit(disp); in nvkm_disp_oneinit()
162 list_for_each_entry(head, &disp->heads, head) in nvkm_disp_oneinit()
165 return nvkm_event_init(&nvkm_disp_vblank_func, subdev, 1, i, &disp->vblank); in nvkm_disp_oneinit()
171 struct nvkm_disp *disp = nvkm_disp(engine); in nvkm_disp_dtor() local
176 void *data = disp; in nvkm_disp_dtor()
178 nvkm_ramht_del(&disp->ramht); in nvkm_disp_dtor()
179 nvkm_gpuobj_del(&disp->inst); in nvkm_disp_dtor()
181 nvkm_event_fini(&disp->uevent); in nvkm_disp_dtor()
183 if (disp->super.wq) { in nvkm_disp_dtor()
184 destroy_workqueue(disp->super.wq); in nvkm_disp_dtor()
185 mutex_destroy(&disp->super.mutex); in nvkm_disp_dtor()
188 nvkm_event_fini(&disp->vblank); in nvkm_disp_dtor()
190 while (!list_empty(&disp->conns)) { in nvkm_disp_dtor()
191 conn = list_first_entry(&disp->conns, typeof(*conn), head); in nvkm_disp_dtor()
196 while (!list_empty(&disp->outps)) { in nvkm_disp_dtor()
197 outp = list_first_entry(&disp->outps, typeof(*outp), head); in nvkm_disp_dtor()
202 while (!list_empty(&disp->iors)) { in nvkm_disp_dtor()
203 ior = list_first_entry(&disp->iors, typeof(*ior), head); in nvkm_disp_dtor()
207 while (!list_empty(&disp->heads)) { in nvkm_disp_dtor()
208 head = list_first_entry(&disp->heads, typeof(*head), head); in nvkm_disp_dtor()
212 if (disp->func && disp->func->dtor) in nvkm_disp_dtor()
213 disp->func->dtor(disp); in nvkm_disp_dtor()
232 struct nvkm_disp *disp; in nvkm_disp_new_() local
235 if (!(disp = *pdisp = kzalloc(sizeof(**pdisp), GFP_KERNEL))) in nvkm_disp_new_()
238 disp->func = func; in nvkm_disp_new_()
239 INIT_LIST_HEAD(&disp->heads); in nvkm_disp_new_()
240 INIT_LIST_HEAD(&disp->iors); in nvkm_disp_new_()
241 INIT_LIST_HEAD(&disp->outps); in nvkm_disp_new_()
242 INIT_LIST_HEAD(&disp->conns); in nvkm_disp_new_()
243 spin_lock_init(&disp->client.lock); in nvkm_disp_new_()
245 ret = nvkm_engine_ctor(&nvkm_disp, device, type, inst, true, &disp->engine); in nvkm_disp_new_()
247 disp->func = NULL; in nvkm_disp_new_()
252 disp->super.wq = create_singlethread_workqueue("nvkm-disp"); in nvkm_disp_new_()
253 if (!disp->super.wq) in nvkm_disp_new_()
256 INIT_WORK(&disp->super.work, func->super); in nvkm_disp_new_()
257 mutex_init(&disp->super.mutex); in nvkm_disp_new_()
260 return nvkm_event_init(func->uevent, &disp->engine.subdev, 1, ARRAY_SIZE(disp->chan), in nvkm_disp_new_()
261 &disp->uevent); in nvkm_disp_new_()