Lines Matching refs:dmac
202 nv50_dmac_destroy(struct nv50_dmac *dmac, struct nvif_object *disp) in nv50_dmac_destroy() argument
204 struct nvif_device *device = dmac->base.device; in nv50_dmac_destroy()
206 nvif_object_fini(&dmac->vram); in nv50_dmac_destroy()
207 nvif_object_fini(&dmac->sync); in nv50_dmac_destroy()
209 nv50_chan_destroy(&dmac->base); in nv50_dmac_destroy()
211 if (dmac->ptr) { in nv50_dmac_destroy()
213 dma_free_coherent(dev, PAGE_SIZE, dmac->ptr, dmac->handle); in nv50_dmac_destroy()
220 struct nv50_dmac *dmac) in nv50_dmac_create() argument
226 mutex_init(&dmac->lock); in nv50_dmac_create()
228 dmac->ptr = dma_alloc_coherent(nvxx_device(device)->dev, PAGE_SIZE, in nv50_dmac_create()
229 &dmac->handle, GFP_KERNEL); in nv50_dmac_create()
230 if (!dmac->ptr) in nv50_dmac_create()
237 .start = dmac->handle + 0x0000, in nv50_dmac_create()
238 .limit = dmac->handle + 0x0fff, in nv50_dmac_create()
246 &dmac->base); in nv50_dmac_create()
251 ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY, in nv50_dmac_create()
258 &dmac->sync); in nv50_dmac_create()
262 ret = nvif_object_init(&dmac->base.user, 0xf0000001, NV_DMA_IN_MEMORY, in nv50_dmac_create()
269 &dmac->vram); in nv50_dmac_create()
424 struct nv50_dmac *dmac = evoc; in evo_wait() local
425 struct nvif_device *device = dmac->base.device; in evo_wait()
426 u32 put = nvif_rd32(&dmac->base.user, 0x0000) / 4; in evo_wait()
428 mutex_lock(&dmac->lock); in evo_wait()
430 dmac->ptr[put] = 0x20000000; in evo_wait()
432 nvif_wr32(&dmac->base.user, 0x0000, 0x00000000); in evo_wait()
434 if (!nvif_rd32(&dmac->base.user, 0x0004)) in evo_wait()
437 mutex_unlock(&dmac->lock); in evo_wait()
445 return dmac->ptr + put; in evo_wait()
451 struct nv50_dmac *dmac = evoc; in evo_kick() local
452 nvif_wr32(&dmac->base.user, 0x0000, (push - dmac->ptr) << 2); in evo_kick()
453 mutex_unlock(&dmac->lock); in evo_kick()