Lines Matching full:args

50 	} *args = argv;  in nvkm_uvmm_mthd_pfnclr()  local
55 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { in nvkm_uvmm_mthd_pfnclr()
56 addr = args->v0.addr; in nvkm_uvmm_mthd_pfnclr()
57 size = args->v0.size; in nvkm_uvmm_mthd_pfnclr()
78 } *args = argv; in nvkm_uvmm_mthd_pfnmap() local
84 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, true))) { in nvkm_uvmm_mthd_pfnmap()
85 page = args->v0.page; in nvkm_uvmm_mthd_pfnmap()
86 addr = args->v0.addr; in nvkm_uvmm_mthd_pfnmap()
87 size = args->v0.size; in nvkm_uvmm_mthd_pfnmap()
88 phys = args->v0.phys; in nvkm_uvmm_mthd_pfnmap()
89 if (argc != (size >> page) * sizeof(args->v0.phys[0])) in nvkm_uvmm_mthd_pfnmap()
111 } *args = argv; in nvkm_uvmm_mthd_unmap() local
117 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { in nvkm_uvmm_mthd_unmap()
118 addr = args->v0.addr; in nvkm_uvmm_mthd_unmap()
156 } *args = argv; in nvkm_uvmm_mthd_map() local
163 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, true))) { in nvkm_uvmm_mthd_map()
164 addr = args->v0.addr; in nvkm_uvmm_mthd_map()
165 size = args->v0.size; in nvkm_uvmm_mthd_map()
166 handle = args->v0.memory; in nvkm_uvmm_mthd_map()
167 offset = args->v0.offset; in nvkm_uvmm_mthd_map()
236 } *args = argv; in nvkm_uvmm_mthd_put() local
242 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { in nvkm_uvmm_mthd_put()
243 addr = args->v0.addr; in nvkm_uvmm_mthd_put()
248 vma = nvkm_vmm_node_search(vmm, args->v0.addr); in nvkm_uvmm_mthd_put()
272 } *args = argv; in nvkm_uvmm_mthd_get() local
280 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { in nvkm_uvmm_mthd_get()
281 getref = args->v0.type == NVIF_VMM_GET_V0_PTES; in nvkm_uvmm_mthd_get()
282 mapref = args->v0.type == NVIF_VMM_GET_V0_ADDR; in nvkm_uvmm_mthd_get()
283 sparse = args->v0.sparse; in nvkm_uvmm_mthd_get()
284 page = args->v0.page; in nvkm_uvmm_mthd_get()
285 align = args->v0.align; in nvkm_uvmm_mthd_get()
286 size = args->v0.size; in nvkm_uvmm_mthd_get()
297 args->v0.addr = vma->addr; in nvkm_uvmm_mthd_get()
306 } *args = argv; in nvkm_uvmm_mthd_page() local
314 if (!(nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { in nvkm_uvmm_mthd_page()
315 if ((index = args->v0.index) >= nr) in nvkm_uvmm_mthd_page()
318 args->v0.shift = page[index].shift; in nvkm_uvmm_mthd_page()
319 args->v0.sparse = !!(type & NVKM_VMM_PAGE_SPARSE); in nvkm_uvmm_mthd_page()
320 args->v0.vram = !!(type & NVKM_VMM_PAGE_VRAM); in nvkm_uvmm_mthd_page()
321 args->v0.host = !!(type & NVKM_VMM_PAGE_HOST); in nvkm_uvmm_mthd_page()
322 args->v0.comp = !!(type & NVKM_VMM_PAGE_COMP); in nvkm_uvmm_mthd_page()
354 nvkm_uvmm_mthd_raw_get(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args) in nvkm_uvmm_mthd_raw_get() argument
360 if (!nvkm_vmm_in_managed_range(vmm, args->addr, args->size)) in nvkm_uvmm_mthd_raw_get()
363 ret = nvkm_uvmm_page_index(uvmm, args->size, args->shift, &refd); in nvkm_uvmm_mthd_raw_get()
367 return nvkm_vmm_raw_get(vmm, args->addr, args->size, refd); in nvkm_uvmm_mthd_raw_get()
371 nvkm_uvmm_mthd_raw_put(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args) in nvkm_uvmm_mthd_raw_put() argument
377 if (!nvkm_vmm_in_managed_range(vmm, args->addr, args->size)) in nvkm_uvmm_mthd_raw_put()
380 ret = nvkm_uvmm_page_index(uvmm, args->size, args->shift, &refd); in nvkm_uvmm_mthd_raw_put()
384 nvkm_vmm_raw_put(vmm, args->addr, args->size, refd); in nvkm_uvmm_mthd_raw_put()
390 nvkm_uvmm_mthd_raw_map(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args) in nvkm_uvmm_mthd_raw_map() argument
395 .addr = args->addr, in nvkm_uvmm_mthd_raw_map()
396 .size = args->size, in nvkm_uvmm_mthd_raw_map()
402 void *argv = (void *)(uintptr_t)args->argv; in nvkm_uvmm_mthd_raw_map()
403 unsigned int argc = args->argc; in nvkm_uvmm_mthd_raw_map()
404 u64 handle = args->memory; in nvkm_uvmm_mthd_raw_map()
408 if (!nvkm_vmm_in_managed_range(vmm, args->addr, args->size)) in nvkm_uvmm_mthd_raw_map()
411 ret = nvkm_uvmm_page_index(uvmm, args->size, args->shift, &refd); in nvkm_uvmm_mthd_raw_map()
417 memory = nvkm_umem_search(client, args->memory); in nvkm_uvmm_mthd_raw_map()
423 ret = nvkm_memory_map(memory, args->offset, vmm, &vma, argv, argc); in nvkm_uvmm_mthd_raw_map()
431 nvkm_uvmm_mthd_raw_unmap(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args) in nvkm_uvmm_mthd_raw_unmap() argument
437 if (!nvkm_vmm_in_managed_range(vmm, args->addr, args->size)) in nvkm_uvmm_mthd_raw_unmap()
440 ret = nvkm_uvmm_page_index(uvmm, args->size, args->shift, &refd); in nvkm_uvmm_mthd_raw_unmap()
444 nvkm_vmm_raw_unmap(vmm, args->addr, args->size, in nvkm_uvmm_mthd_raw_unmap()
445 args->sparse, refd); in nvkm_uvmm_mthd_raw_unmap()
451 nvkm_uvmm_mthd_raw_sparse(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args) in nvkm_uvmm_mthd_raw_sparse() argument
455 if (!nvkm_vmm_in_managed_range(vmm, args->addr, args->size)) in nvkm_uvmm_mthd_raw_sparse()
458 return nvkm_vmm_raw_sparse(vmm, args->addr, args->size, args->ref); in nvkm_uvmm_mthd_raw_sparse()
466 } *args = argv; in nvkm_uvmm_mthd_raw() local
472 if ((ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, true))) in nvkm_uvmm_mthd_raw()
475 switch (args->v0.op) { in nvkm_uvmm_mthd_raw()
477 return nvkm_uvmm_mthd_raw_get(uvmm, &args->v0); in nvkm_uvmm_mthd_raw()
479 return nvkm_uvmm_mthd_raw_put(uvmm, &args->v0); in nvkm_uvmm_mthd_raw()
481 return nvkm_uvmm_mthd_raw_map(uvmm, &args->v0); in nvkm_uvmm_mthd_raw()
483 return nvkm_uvmm_mthd_raw_unmap(uvmm, &args->v0); in nvkm_uvmm_mthd_raw()
485 return nvkm_uvmm_mthd_raw_sparse(uvmm, &args->v0); in nvkm_uvmm_mthd_raw()
539 } *args = argv; in nvkm_uvmm_new() local
546 if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, more))) { in nvkm_uvmm_new()
547 managed = args->v0.type == NVIF_VMM_V0_TYPE_MANAGED; in nvkm_uvmm_new()
548 raw = args->v0.type == NVIF_VMM_V0_TYPE_RAW; in nvkm_uvmm_new()
549 addr = args->v0.addr; in nvkm_uvmm_new()
550 size = args->v0.size; in nvkm_uvmm_new()
582 args->v0.page_nr = 0; in nvkm_uvmm_new()
584 args->v0.page_nr++; in nvkm_uvmm_new()
585 args->v0.addr = uvmm->vmm->start; in nvkm_uvmm_new()
586 args->v0.size = uvmm->vmm->limit; in nvkm_uvmm_new()