summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h
index 517d834c..e5f5031a 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h
@@ -66,4 +66,24 @@ struct nvgpu_sgt *nvgpu_linux_sgt_create(struct gk20a *g,
66int __nvgpu_mem_create_from_pages(struct gk20a *g, struct nvgpu_mem *dest, 66int __nvgpu_mem_create_from_pages(struct gk20a *g, struct nvgpu_mem *dest,
67 struct page **pages, int nr_pages); 67 struct page **pages, int nr_pages);
68 68
69/**
70 * __nvgpu_mem_create_from_phys - Create an nvgpu_mem from physical mem.
71 *
72 * @g - The GPU.
73 * @dest - nvgpu_mem to initialize.
74 * @src_phys - start address of physical mem
75 * @nr_pages - The number of pages in phys.
76 *
77 * Create a new nvgpu_mem struct from a physical memory aperure. The physical
78 * memory aperture needs to be contiguous for requested @nr_pages. This API
79 * only works for SYSMEM.
80 *
81 * The resulting nvgpu_mem should be released with the nvgpu_dma_free() or the
82 * nvgpu_dma_unmap_free() function depending on whether or not the resulting
83 * nvgpu_mem has been mapped.
84 *
85 * Returns 0 on success, or a relevant error otherwise.
86 */
87int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest,
88 u64 src_phys, int nr_pages);
69#endif 89#endif