Lines Matching refs:wndw

51 nv50_wndw_ctxdma_new(struct nv50_wndw *wndw, struct drm_framebuffer *fb)  in nv50_wndw_ctxdma_new()  argument
72 list_for_each_entry(ctxdma, &wndw->ctxdma.list, head) { in nv50_wndw_ctxdma_new()
79 list_add(&ctxdma->head, &wndw->ctxdma.list); in nv50_wndw_ctxdma_new()
104 ret = nvif_object_ctor(wndw->ctxdma.parent, "kmsFbCtxDma", handle, in nv50_wndw_ctxdma_new()
115 nv50_wndw_wait_armed(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_wait_armed() argument
117 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_wait_armed()
119 return wndw->func->ntfy_wait_begun(disp->sync, in nv50_wndw_wait_armed()
121 wndw->wndw.base.device); in nv50_wndw_wait_armed()
127 nv50_wndw_flush_clr(struct nv50_wndw *wndw, u32 *interlock, bool flush, in nv50_wndw_flush_clr() argument
133 if (clr.sema ) wndw->func-> sema_clr(wndw); in nv50_wndw_flush_clr()
134 if (clr.ntfy ) wndw->func-> ntfy_clr(wndw); in nv50_wndw_flush_clr()
135 if (clr.xlut ) wndw->func-> xlut_clr(wndw); in nv50_wndw_flush_clr()
136 if (clr.csc ) wndw->func-> csc_clr(wndw); in nv50_wndw_flush_clr()
137 if (clr.image) wndw->func->image_clr(wndw); in nv50_wndw_flush_clr()
139 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_clr()
143 nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, in nv50_wndw_flush_set() argument
151 if (asyw->set.sema ) wndw->func->sema_set (wndw, asyw); in nv50_wndw_flush_set()
152 if (asyw->set.ntfy ) wndw->func->ntfy_set (wndw, asyw); in nv50_wndw_flush_set()
153 if (asyw->set.image) wndw->func->image_set(wndw, asyw); in nv50_wndw_flush_set()
158 nv50_lut_load(&wndw->ilut, asyw->xlut.i.buffer, in nv50_wndw_flush_set()
161 wndw->func->xlut_set(wndw, asyw); in nv50_wndw_flush_set()
164 if (asyw->set.csc ) wndw->func->csc_set (wndw, asyw); in nv50_wndw_flush_set()
165 if (asyw->set.scale) wndw->func->scale_set(wndw, asyw); in nv50_wndw_flush_set()
166 if (asyw->set.blend) wndw->func->blend_set(wndw, asyw); in nv50_wndw_flush_set()
169 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
170 interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm; in nv50_wndw_flush_set()
172 wndw->immd->point(wndw, asyw); in nv50_wndw_flush_set()
173 wndw->immd->update(wndw, interlock); in nv50_wndw_flush_set()
175 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
180 nv50_wndw_ntfy_enable(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_ntfy_enable() argument
182 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_ntfy_enable()
184 asyw->ntfy.handle = wndw->wndw.sync.handle; in nv50_wndw_ntfy_enable()
185 asyw->ntfy.offset = wndw->ntfy; in nv50_wndw_ntfy_enable()
189 wndw->func->ntfy_reset(disp->sync, wndw->ntfy); in nv50_wndw_ntfy_enable()
190 wndw->ntfy ^= 0x10; in nv50_wndw_ntfy_enable()
194 nv50_wndw_atomic_check_release(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_release() argument
198 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_release()
199 NV_ATOMIC(drm, "%s release\n", wndw->plane.name); in nv50_wndw_atomic_check_release()
200 wndw->func->release(wndw, asyw, asyh); in nv50_wndw_atomic_check_release()
269 nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, bool modeset, in nv50_wndw_atomic_check_acquire() argument
275 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_acquire()
280 NV_ATOMIC(drm, "%s acquire\n", wndw->plane.name); in nv50_wndw_atomic_check_acquire()
321 asyw->set.image = wndw->func->image_set != NULL; in nv50_wndw_atomic_check_acquire()
324 if (wndw->func->scale_set) { in nv50_wndw_atomic_check_acquire()
335 if (wndw->func->blend_set) { in nv50_wndw_atomic_check_acquire()
357 if (wndw->immd) { in nv50_wndw_atomic_check_acquire()
364 return wndw->func->acquire(wndw, asyw, asyh); in nv50_wndw_atomic_check_acquire()
368 nv50_wndw_atomic_check_lut(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_lut() argument
392 if (wndw->func->ilut) in nv50_wndw_atomic_check_lut()
393 asyh->wndw.olut |= BIT(wndw->id); in nv50_wndw_atomic_check_lut()
395 asyh->wndw.olut &= ~BIT(wndw->id); in nv50_wndw_atomic_check_lut()
398 if (!ilut && wndw->func->ilut_identity && in nv50_wndw_atomic_check_lut()
407 if ((asyw->ilut = wndw->func->ilut ? ilut : NULL)) { in nv50_wndw_atomic_check_lut()
408 wndw->func->ilut(wndw, asyw, drm_color_lut_size(ilut)); in nv50_wndw_atomic_check_lut()
409 asyw->xlut.handle = wndw->wndw.vram.handle; in nv50_wndw_atomic_check_lut()
417 if (wndw->func->olut_core && in nv50_wndw_atomic_check_lut()
421 if (wndw->func->csc && asyh->state.ctm) { in nv50_wndw_atomic_check_lut()
423 wndw->func->csc(wndw, asyw, ctm); in nv50_wndw_atomic_check_lut()
443 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_atomic_check() local
444 struct nv50_wndw_atom *armw = nv50_wndw_atom(wndw->plane.state); in nv50_wndw_atomic_check()
473 if (asyw->visible && wndw->func->xlut_set && in nv50_wndw_atomic_check()
478 ret = nv50_wndw_atomic_check_lut(wndw, armw, asyw, asyh); in nv50_wndw_atomic_check()
485 ret = nv50_wndw_atomic_check_acquire(wndw, modeset, in nv50_wndw_atomic_check()
490 asyh->wndw.mask |= BIT(wndw->id); in nv50_wndw_atomic_check()
493 nv50_wndw_atomic_check_release(wndw, asyw, harm); in nv50_wndw_atomic_check()
494 harm->wndw.mask &= ~BIT(wndw->id); in nv50_wndw_atomic_check()
510 if (wndw->func->image_clr) in nv50_wndw_atomic_check()
536 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_prepare_fb() local
552 if (wndw->ctxdma.parent) { in nv50_wndw_prepare_fb()
553 ctxdma = nv50_wndw_ctxdma_new(wndw, fb); in nv50_wndw_prepare_fb()
569 if (wndw->func->prepare) { in nv50_wndw_prepare_fb()
574 wndw->func->prepare(wndw, asyh, asyw); in nv50_wndw_prepare_fb()
640 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_destroy() local
643 list_for_each_entry_safe(ctxdma, ctxtmp, &wndw->ctxdma.list, head) { in nv50_wndw_destroy()
647 nv50_dmac_destroy(&wndw->wimm); in nv50_wndw_destroy()
648 nv50_dmac_destroy(&wndw->wndw); in nv50_wndw_destroy()
650 nv50_lut_fini(&wndw->ilut); in nv50_wndw_destroy()
652 drm_plane_cleanup(&wndw->plane); in nv50_wndw_destroy()
653 kfree(wndw); in nv50_wndw_destroy()
705 struct nv50_wndw *wndw; in nv50_wndw_new_() local
710 if (!(wndw = *pwndw = kzalloc(sizeof(*wndw), GFP_KERNEL))) in nv50_wndw_new_()
712 wndw->func = func; in nv50_wndw_new_()
713 wndw->id = index; in nv50_wndw_new_()
714 wndw->interlock.type = interlock_type; in nv50_wndw_new_()
715 wndw->interlock.data = interlock_data; in nv50_wndw_new_()
717 wndw->ctxdma.parent = &wndw->wndw.base.user; in nv50_wndw_new_()
718 INIT_LIST_HEAD(&wndw->ctxdma.list); in nv50_wndw_new_()
727 ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, format, nformat, in nv50_wndw_new_()
735 drm_plane_helper_add(&wndw->plane, &nv50_wndw_helper); in nv50_wndw_new_()
737 if (wndw->func->ilut) { in nv50_wndw_new_()
738 ret = nv50_lut_init(disp, mmu, &wndw->ilut); in nv50_wndw_new_()
743 if (wndw->func->blend_set) { in nv50_wndw_new_()
744 ret = drm_plane_create_zpos_property(&wndw->plane, in nv50_wndw_new_()
745 nv50_wndw_zpos_default(&wndw->plane), 0, 254); in nv50_wndw_new_()
749 ret = drm_plane_create_alpha_property(&wndw->plane); in nv50_wndw_new_()
753 ret = drm_plane_create_blend_mode_property(&wndw->plane, in nv50_wndw_new_()
760 ret = drm_plane_create_zpos_immutable_property(&wndw->plane, in nv50_wndw_new_()
761 nv50_wndw_zpos_default(&wndw->plane)); in nv50_wndw_new_()