Lines Matching refs:dmac
195 nv50_dmac_destroy(struct nv50_dmac *dmac, struct nvif_object *disp) in nv50_dmac_destroy() argument
197 nvif_object_fini(&dmac->vram); in nv50_dmac_destroy()
198 nvif_object_fini(&dmac->sync); in nv50_dmac_destroy()
200 nv50_chan_destroy(&dmac->base); in nv50_dmac_destroy()
202 if (dmac->ptr) { in nv50_dmac_destroy()
204 pci_free_consistent(pdev, PAGE_SIZE, dmac->ptr, dmac->handle); in nv50_dmac_destroy()
211 struct nv50_dmac *dmac) in nv50_dmac_create() argument
218 mutex_init(&dmac->lock); in nv50_dmac_create()
220 dmac->ptr = pci_alloc_consistent(nvxx_device(device)->pdev, in nv50_dmac_create()
221 PAGE_SIZE, &dmac->handle); in nv50_dmac_create()
222 if (!dmac->ptr) in nv50_dmac_create()
230 .start = dmac->handle + 0x0000, in nv50_dmac_create()
231 .limit = dmac->handle + 0x0fff, in nv50_dmac_create()
236 ret = nv50_chan_create(disp, oclass, head, data, size, &dmac->base); in nv50_dmac_create()
241 ret = nvif_object_init(&dmac->base.user, NULL, 0xf0000000, in nv50_dmac_create()
249 &dmac->sync); in nv50_dmac_create()
253 ret = nvif_object_init(&dmac->base.user, NULL, 0xf0000001, in nv50_dmac_create()
261 &dmac->vram); in nv50_dmac_create()
415 struct nv50_dmac *dmac = evoc; in evo_wait() local
416 u32 put = nvif_rd32(&dmac->base.user, 0x0000) / 4; in evo_wait()
418 mutex_lock(&dmac->lock); in evo_wait()
420 dmac->ptr[put] = 0x20000000; in evo_wait()
422 nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); in evo_wait()
423 if (!nvxx_wait(&dmac->base.user, 0x0004, ~0, 0x00000000)) { in evo_wait()
424 mutex_unlock(&dmac->lock); in evo_wait()
425 nv_error(nvxx_object(&dmac->base.user), "channel stalled\n"); in evo_wait()
432 return dmac->ptr + put; in evo_wait()
438 struct nv50_dmac *dmac = evoc; in evo_kick() local
439 nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2); in evo_kick()
440 mutex_unlock(&dmac->lock); in evo_kick()