Lines Matching refs:wndw

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