Lines Matching refs:wndw
40 nv50_wndw_ctxdma_new(struct nv50_wndw *wndw, struct nouveau_framebuffer *fb) in nv50_wndw_ctxdma_new() argument
57 list_for_each_entry(ctxdma, &wndw->ctxdma.list, head) { in nv50_wndw_ctxdma_new()
64 list_add(&ctxdma->head, &wndw->ctxdma.list); in nv50_wndw_ctxdma_new()
89 ret = nvif_object_init(wndw->ctxdma.parent, handle, NV_DMA_IN_MEMORY, in nv50_wndw_ctxdma_new()
100 nv50_wndw_wait_armed(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_wait_armed() argument
102 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_wait_armed()
104 return wndw->func->ntfy_wait_begun(disp->sync, in nv50_wndw_wait_armed()
106 wndw->wndw.base.device); in nv50_wndw_wait_armed()
112 nv50_wndw_flush_clr(struct nv50_wndw *wndw, u32 *interlock, bool flush, in nv50_wndw_flush_clr() argument
118 if (clr.sema ) wndw->func-> sema_clr(wndw); in nv50_wndw_flush_clr()
119 if (clr.ntfy ) wndw->func-> ntfy_clr(wndw); in nv50_wndw_flush_clr()
120 if (clr.xlut ) wndw->func-> xlut_clr(wndw); in nv50_wndw_flush_clr()
121 if (clr.image) wndw->func->image_clr(wndw); in nv50_wndw_flush_clr()
123 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_clr()
127 nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, in nv50_wndw_flush_set() argument
135 if (asyw->set.sema ) wndw->func->sema_set (wndw, asyw); in nv50_wndw_flush_set()
136 if (asyw->set.ntfy ) wndw->func->ntfy_set (wndw, asyw); in nv50_wndw_flush_set()
137 if (asyw->set.image) wndw->func->image_set(wndw, asyw); in nv50_wndw_flush_set()
142 nv50_lut_load(&wndw->ilut, in nv50_wndw_flush_set()
147 wndw->func->xlut_set(wndw, asyw); in nv50_wndw_flush_set()
150 if (asyw->set.scale) wndw->func->scale_set(wndw, asyw); in nv50_wndw_flush_set()
153 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
154 interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data; in nv50_wndw_flush_set()
156 wndw->immd->point(wndw, asyw); in nv50_wndw_flush_set()
157 wndw->immd->update(wndw, interlock); in nv50_wndw_flush_set()
159 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
164 nv50_wndw_ntfy_enable(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_ntfy_enable() argument
166 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_ntfy_enable()
168 asyw->ntfy.handle = wndw->wndw.sync.handle; in nv50_wndw_ntfy_enable()
169 asyw->ntfy.offset = wndw->ntfy; in nv50_wndw_ntfy_enable()
173 wndw->func->ntfy_reset(disp->sync, wndw->ntfy); in nv50_wndw_ntfy_enable()
174 wndw->ntfy ^= 0x10; in nv50_wndw_ntfy_enable()
178 nv50_wndw_atomic_check_release(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_release() argument
182 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_release()
183 NV_ATOMIC(drm, "%s release\n", wndw->plane.name); in nv50_wndw_atomic_check_release()
184 wndw->func->release(wndw, asyw, asyh); in nv50_wndw_atomic_check_release()
227 nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, bool modeset, in nv50_wndw_atomic_check_acquire() argument
233 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_acquire()
236 NV_ATOMIC(drm, "%s acquire\n", wndw->plane.name); in nv50_wndw_atomic_check_acquire()
270 asyw->set.image = wndw->func->image_set != NULL; in nv50_wndw_atomic_check_acquire()
273 if (wndw->func->scale_set) { in nv50_wndw_atomic_check_acquire()
284 if (wndw->immd) { in nv50_wndw_atomic_check_acquire()
291 return wndw->func->acquire(wndw, asyw, asyh); in nv50_wndw_atomic_check_acquire()
295 nv50_wndw_atomic_check_lut(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_lut() argument
319 if (wndw->func->ilut) in nv50_wndw_atomic_check_lut()
320 asyh->wndw.olut |= BIT(wndw->id); in nv50_wndw_atomic_check_lut()
322 asyh->wndw.olut &= ~BIT(wndw->id); in nv50_wndw_atomic_check_lut()
327 if ((asyw->ilut = wndw->func->ilut ? ilut : NULL)) { in nv50_wndw_atomic_check_lut()
328 wndw->func->ilut(wndw, asyw); in nv50_wndw_atomic_check_lut()
329 asyw->xlut.handle = wndw->wndw.vram.handle; in nv50_wndw_atomic_check_lut()
335 if (wndw->func->olut_core && in nv50_wndw_atomic_check_lut()
347 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_atomic_check() local
348 struct nv50_wndw_atom *armw = nv50_wndw_atom(wndw->plane.state); in nv50_wndw_atomic_check()
377 if (asyw->visible && wndw->func->xlut_set && in nv50_wndw_atomic_check()
382 nv50_wndw_atomic_check_lut(wndw, armw, asyw, asyh); in nv50_wndw_atomic_check()
386 ret = nv50_wndw_atomic_check_acquire(wndw, modeset, in nv50_wndw_atomic_check()
391 asyh->wndw.mask |= BIT(wndw->id); in nv50_wndw_atomic_check()
394 nv50_wndw_atomic_check_release(wndw, asyw, harm); in nv50_wndw_atomic_check()
395 harm->wndw.mask &= ~BIT(wndw->id); in nv50_wndw_atomic_check()
408 if (wndw->func->image_clr) in nv50_wndw_atomic_check()
433 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_prepare_fb() local
447 if (wndw->ctxdma.parent) { in nv50_wndw_prepare_fb()
448 ctxdma = nv50_wndw_ctxdma_new(wndw, fb); in nv50_wndw_prepare_fb()
460 if (wndw->func->prepare) { in nv50_wndw_prepare_fb()
465 wndw->func->prepare(wndw, asyh, asyw); in nv50_wndw_prepare_fb()
524 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_destroy() local
527 list_for_each_entry_safe(ctxdma, ctxtmp, &wndw->ctxdma.list, head) { in nv50_wndw_destroy()
531 nvif_notify_fini(&wndw->notify); in nv50_wndw_destroy()
532 nv50_dmac_destroy(&wndw->wimm); in nv50_wndw_destroy()
533 nv50_dmac_destroy(&wndw->wndw); in nv50_wndw_destroy()
535 nv50_lut_fini(&wndw->ilut); in nv50_wndw_destroy()
537 drm_plane_cleanup(&wndw->plane); in nv50_wndw_destroy()
538 kfree(wndw); in nv50_wndw_destroy()
558 nv50_wndw_fini(struct nv50_wndw *wndw) in nv50_wndw_fini() argument
560 nvif_notify_put(&wndw->notify); in nv50_wndw_fini()
564 nv50_wndw_init(struct nv50_wndw *wndw) in nv50_wndw_init() argument
566 nvif_notify_get(&wndw->notify); in nv50_wndw_init()
579 struct nv50_wndw *wndw; in nv50_wndw_new_() local
583 if (!(wndw = *pwndw = kzalloc(sizeof(*wndw), GFP_KERNEL))) in nv50_wndw_new_()
585 wndw->func = func; in nv50_wndw_new_()
586 wndw->id = index; in nv50_wndw_new_()
587 wndw->interlock.type = interlock_type; in nv50_wndw_new_()
588 wndw->interlock.data = interlock_data; in nv50_wndw_new_()
590 wndw->ctxdma.parent = &wndw->wndw.base.user; in nv50_wndw_new_()
591 INIT_LIST_HEAD(&wndw->ctxdma.list); in nv50_wndw_new_()
595 ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, in nv50_wndw_new_()
604 drm_plane_helper_add(&wndw->plane, &nv50_wndw_helper); in nv50_wndw_new_()
606 if (wndw->func->ilut) { in nv50_wndw_new_()
607 ret = nv50_lut_init(disp, mmu, &wndw->ilut); in nv50_wndw_new_()
612 wndw->notify.func = nv50_wndw_notify; in nv50_wndw_new_()