Lines Matching refs:dmaobj
51 struct nvkm_dmaobj *dmaobj = nvkm_dmaobj(base); in nvkm_dmaobj_bind() local
52 return dmaobj->func->bind(dmaobj, gpuobj, align, pgpuobj); in nvkm_dmaobj_bind()
70 struct nvkm_dmaobj *dmaobj) in nvkm_dmaobj_ctor() argument
84 nvkm_object_ctor(&nvkm_dmaobj_func, oclass, &dmaobj->object); in nvkm_dmaobj_ctor()
85 dmaobj->func = func; in nvkm_dmaobj_ctor()
86 dmaobj->dma = dma; in nvkm_dmaobj_ctor()
94 dmaobj->target = args->v0.target; in nvkm_dmaobj_ctor()
95 dmaobj->access = args->v0.access; in nvkm_dmaobj_ctor()
96 dmaobj->start = args->v0.start; in nvkm_dmaobj_ctor()
97 dmaobj->limit = args->v0.limit; in nvkm_dmaobj_ctor()
104 if (dmaobj->start > dmaobj->limit) in nvkm_dmaobj_ctor()
107 switch (dmaobj->target) { in nvkm_dmaobj_ctor()
109 dmaobj->target = NV_MEM_TARGET_VM; in nvkm_dmaobj_ctor()
113 if (dmaobj->limit >= fb->ram->size - instmem->reserved) in nvkm_dmaobj_ctor()
118 dmaobj->target = NV_MEM_TARGET_VRAM; in nvkm_dmaobj_ctor()
123 dmaobj->target = NV_MEM_TARGET_PCI; in nvkm_dmaobj_ctor()
129 dmaobj->target = NV_MEM_TARGET_PCI_NOSNOOP; in nvkm_dmaobj_ctor()
135 switch (dmaobj->access) { in nvkm_dmaobj_ctor()
137 dmaobj->access = NV_MEM_ACCESS_VM; in nvkm_dmaobj_ctor()
140 dmaobj->access = NV_MEM_ACCESS_RO; in nvkm_dmaobj_ctor()
143 dmaobj->access = NV_MEM_ACCESS_WO; in nvkm_dmaobj_ctor()
146 dmaobj->access = NV_MEM_ACCESS_RW; in nvkm_dmaobj_ctor()