Lines Matching refs:wndw

50 nv50_wndw_ctxdma_new(struct nv50_wndw *wndw, struct drm_framebuffer *fb)  in nv50_wndw_ctxdma_new()  argument
71 list_for_each_entry(ctxdma, &wndw->ctxdma.list, head) { in nv50_wndw_ctxdma_new()
78 list_add(&ctxdma->head, &wndw->ctxdma.list); in nv50_wndw_ctxdma_new()
103 ret = nvif_object_ctor(wndw->ctxdma.parent, "kmsFbCtxDma", handle, in nv50_wndw_ctxdma_new()
114 nv50_wndw_wait_armed(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_wait_armed() argument
116 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_wait_armed()
118 return wndw->func->ntfy_wait_begun(disp->sync, in nv50_wndw_wait_armed()
120 wndw->wndw.base.device); in nv50_wndw_wait_armed()
126 nv50_wndw_flush_clr(struct nv50_wndw *wndw, u32 *interlock, bool flush, in nv50_wndw_flush_clr() argument
132 if (clr.sema ) wndw->func-> sema_clr(wndw); in nv50_wndw_flush_clr()
133 if (clr.ntfy ) wndw->func-> ntfy_clr(wndw); in nv50_wndw_flush_clr()
134 if (clr.xlut ) wndw->func-> xlut_clr(wndw); in nv50_wndw_flush_clr()
135 if (clr.csc ) wndw->func-> csc_clr(wndw); in nv50_wndw_flush_clr()
136 if (clr.image) wndw->func->image_clr(wndw); in nv50_wndw_flush_clr()
138 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_clr()
142 nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, in nv50_wndw_flush_set() argument
150 if (asyw->set.sema ) wndw->func->sema_set (wndw, asyw); in nv50_wndw_flush_set()
151 if (asyw->set.ntfy ) wndw->func->ntfy_set (wndw, asyw); in nv50_wndw_flush_set()
152 if (asyw->set.image) wndw->func->image_set(wndw, asyw); in nv50_wndw_flush_set()
157 nv50_lut_load(&wndw->ilut, asyw->xlut.i.buffer, in nv50_wndw_flush_set()
160 wndw->func->xlut_set(wndw, asyw); in nv50_wndw_flush_set()
163 if (asyw->set.csc ) wndw->func->csc_set (wndw, asyw); in nv50_wndw_flush_set()
164 if (asyw->set.scale) wndw->func->scale_set(wndw, asyw); in nv50_wndw_flush_set()
165 if (asyw->set.blend) wndw->func->blend_set(wndw, asyw); in nv50_wndw_flush_set()
168 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
169 interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm; in nv50_wndw_flush_set()
171 wndw->immd->point(wndw, asyw); in nv50_wndw_flush_set()
172 wndw->immd->update(wndw, interlock); in nv50_wndw_flush_set()
174 interlock[wndw->interlock.type] |= wndw->interlock.data; in nv50_wndw_flush_set()
179 nv50_wndw_ntfy_enable(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) in nv50_wndw_ntfy_enable() argument
181 struct nv50_disp *disp = nv50_disp(wndw->plane.dev); in nv50_wndw_ntfy_enable()
183 asyw->ntfy.handle = wndw->wndw.sync.handle; in nv50_wndw_ntfy_enable()
184 asyw->ntfy.offset = wndw->ntfy; in nv50_wndw_ntfy_enable()
188 wndw->func->ntfy_reset(disp->sync, wndw->ntfy); in nv50_wndw_ntfy_enable()
189 wndw->ntfy ^= 0x10; in nv50_wndw_ntfy_enable()
193 nv50_wndw_atomic_check_release(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_release() argument
197 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_release()
198 NV_ATOMIC(drm, "%s release\n", wndw->plane.name); in nv50_wndw_atomic_check_release()
199 wndw->func->release(wndw, asyw, asyh); in nv50_wndw_atomic_check_release()
268 nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, bool modeset, in nv50_wndw_atomic_check_acquire() argument
274 struct nouveau_drm *drm = nouveau_drm(wndw->plane.dev); in nv50_wndw_atomic_check_acquire()
279 NV_ATOMIC(drm, "%s acquire\n", wndw->plane.name); in nv50_wndw_atomic_check_acquire()
320 asyw->set.image = wndw->func->image_set != NULL; in nv50_wndw_atomic_check_acquire()
323 if (wndw->func->scale_set) { in nv50_wndw_atomic_check_acquire()
334 if (wndw->func->blend_set) { in nv50_wndw_atomic_check_acquire()
356 if (wndw->immd) { in nv50_wndw_atomic_check_acquire()
363 return wndw->func->acquire(wndw, asyw, asyh); in nv50_wndw_atomic_check_acquire()
367 nv50_wndw_atomic_check_lut(struct nv50_wndw *wndw, in nv50_wndw_atomic_check_lut() argument
391 if (wndw->func->ilut) in nv50_wndw_atomic_check_lut()
392 asyh->wndw.olut |= BIT(wndw->id); in nv50_wndw_atomic_check_lut()
394 asyh->wndw.olut &= ~BIT(wndw->id); in nv50_wndw_atomic_check_lut()
397 if (!ilut && wndw->func->ilut_identity && in nv50_wndw_atomic_check_lut()
406 if ((asyw->ilut = wndw->func->ilut ? ilut : NULL)) { in nv50_wndw_atomic_check_lut()
407 wndw->func->ilut(wndw, asyw, drm_color_lut_size(ilut)); in nv50_wndw_atomic_check_lut()
408 asyw->xlut.handle = wndw->wndw.vram.handle; in nv50_wndw_atomic_check_lut()
416 if (wndw->func->olut_core && in nv50_wndw_atomic_check_lut()
420 if (wndw->func->csc && asyh->state.ctm) { in nv50_wndw_atomic_check_lut()
422 wndw->func->csc(wndw, asyw, ctm); in nv50_wndw_atomic_check_lut()
442 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_atomic_check() local
443 struct nv50_wndw_atom *armw = nv50_wndw_atom(wndw->plane.state); in nv50_wndw_atomic_check()
472 if (asyw->visible && wndw->func->xlut_set && in nv50_wndw_atomic_check()
477 ret = nv50_wndw_atomic_check_lut(wndw, armw, asyw, asyh); in nv50_wndw_atomic_check()
484 ret = nv50_wndw_atomic_check_acquire(wndw, modeset, in nv50_wndw_atomic_check()
489 asyh->wndw.mask |= BIT(wndw->id); in nv50_wndw_atomic_check()
492 nv50_wndw_atomic_check_release(wndw, asyw, harm); in nv50_wndw_atomic_check()
493 harm->wndw.mask &= ~BIT(wndw->id); in nv50_wndw_atomic_check()
509 if (wndw->func->image_clr) in nv50_wndw_atomic_check()
535 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_prepare_fb() local
551 if (wndw->ctxdma.parent) { in nv50_wndw_prepare_fb()
552 ctxdma = nv50_wndw_ctxdma_new(wndw, fb); in nv50_wndw_prepare_fb()
568 if (wndw->func->prepare) { in nv50_wndw_prepare_fb()
573 wndw->func->prepare(wndw, asyh, asyw); in nv50_wndw_prepare_fb()
639 struct nv50_wndw *wndw = nv50_wndw(plane); in nv50_wndw_destroy() local
642 list_for_each_entry_safe(ctxdma, ctxtmp, &wndw->ctxdma.list, head) { in nv50_wndw_destroy()
646 nvif_notify_dtor(&wndw->notify); 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()
697 nv50_wndw_fini(struct nv50_wndw *wndw) in nv50_wndw_fini() argument
699 nvif_notify_put(&wndw->notify); in nv50_wndw_fini()
703 nv50_wndw_init(struct nv50_wndw *wndw) in nv50_wndw_init() argument
705 nvif_notify_get(&wndw->notify); in nv50_wndw_init()
723 struct nv50_wndw *wndw; in nv50_wndw_new_() local
728 if (!(wndw = *pwndw = kzalloc(sizeof(*wndw), GFP_KERNEL))) in nv50_wndw_new_()
730 wndw->func = func; in nv50_wndw_new_()
731 wndw->id = index; in nv50_wndw_new_()
732 wndw->interlock.type = interlock_type; in nv50_wndw_new_()
733 wndw->interlock.data = interlock_data; in nv50_wndw_new_()
735 wndw->ctxdma.parent = &wndw->wndw.base.user; in nv50_wndw_new_()
736 INIT_LIST_HEAD(&wndw->ctxdma.list); in nv50_wndw_new_()
745 ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, format, nformat, in nv50_wndw_new_()
753 drm_plane_helper_add(&wndw->plane, &nv50_wndw_helper); in nv50_wndw_new_()
755 if (wndw->func->ilut) { in nv50_wndw_new_()
756 ret = nv50_lut_init(disp, mmu, &wndw->ilut); in nv50_wndw_new_()
761 wndw->notify.func = nv50_wndw_notify; in nv50_wndw_new_()
763 if (wndw->func->blend_set) { in nv50_wndw_new_()
764 ret = drm_plane_create_zpos_property(&wndw->plane, in nv50_wndw_new_()
765 nv50_wndw_zpos_default(&wndw->plane), 0, 254); in nv50_wndw_new_()
769 ret = drm_plane_create_alpha_property(&wndw->plane); in nv50_wndw_new_()
773 ret = drm_plane_create_blend_mode_property(&wndw->plane, in nv50_wndw_new_()
780 ret = drm_plane_create_zpos_immutable_property(&wndw->plane, in nv50_wndw_new_()
781 nv50_wndw_zpos_default(&wndw->plane)); in nv50_wndw_new_()