Lines Matching refs:ctxdma
43 nv50_wndw_ctxdma_del(struct nv50_wndw_ctxdma *ctxdma) in nv50_wndw_ctxdma_del() argument
45 nvif_object_dtor(&ctxdma->object); in nv50_wndw_ctxdma_del()
46 list_del(&ctxdma->head); in nv50_wndw_ctxdma_del()
47 kfree(ctxdma); in nv50_wndw_ctxdma_del()
54 struct nv50_wndw_ctxdma *ctxdma; in nv50_wndw_ctxdma_new() local
72 list_for_each_entry(ctxdma, &wndw->ctxdma.list, head) { in nv50_wndw_ctxdma_new()
73 if (ctxdma->object.handle == handle) in nv50_wndw_ctxdma_new()
74 return ctxdma; in nv50_wndw_ctxdma_new()
77 if (!(ctxdma = kzalloc(sizeof(*ctxdma), GFP_KERNEL))) 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()
105 NV_DMA_IN_MEMORY, &args, argc, &ctxdma->object); in nv50_wndw_ctxdma_new()
107 nv50_wndw_ctxdma_del(ctxdma); in nv50_wndw_ctxdma_new()
111 return ctxdma; in nv50_wndw_ctxdma_new()
540 struct nv50_wndw_ctxdma *ctxdma; 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()
554 if (IS_ERR(ctxdma)) { in nv50_wndw_prepare_fb()
556 return PTR_ERR(ctxdma); in nv50_wndw_prepare_fb()
560 asyw->image.handle[0] = ctxdma->object.handle; in nv50_wndw_prepare_fb()
641 struct nv50_wndw_ctxdma *ctxdma, *ctxtmp; in nv50_wndw_destroy() local
643 list_for_each_entry_safe(ctxdma, ctxtmp, &wndw->ctxdma.list, head) { in nv50_wndw_destroy()
644 nv50_wndw_ctxdma_del(ctxdma); in nv50_wndw_destroy()
717 wndw->ctxdma.parent = &wndw->wndw.base.user; in nv50_wndw_new_()
718 INIT_LIST_HEAD(&wndw->ctxdma.list); in nv50_wndw_new_()