summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-08-17 19:51:03 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 18:19:34 -0400
commitff9c3fc20a27444cd1ff7d9402965023e425f404 (patch)
treedbb511c48a4cc0068618c8a34a69ae8305e18747 /drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
parent59e4089278bd052b440293356605ce524e4944db (diff)
gpu: nvgpu: Reduce usage of nvgpu_vidmem_get_page_alloc
Reduce the usage of nvgpu_vidmem_get_page_alloc() and friends as much as possible. This reduces the dependency of nvgpu on Linux SGLs. SGLs still need to be used, however, since sharing buffers in userspace is done by dma_buf FD. The best way to pass the vidmem buf through the dma_buf is by SGL pointer. JIRA NVGPU-30 JIRA NVGPU-138 Change-Id: Ide0e9e5a557f00aa63b063be085042101a5b34ee Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1540709 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
index 23a1bad7..537409a8 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
@@ -39,6 +39,7 @@ struct nvgpu_sgt;
39struct gk20a; 39struct gk20a;
40struct nvgpu_allocator; 40struct nvgpu_allocator;
41struct nvgpu_gmmu_attrs; 41struct nvgpu_gmmu_attrs;
42struct nvgpu_page_alloc;
42 43
43#define NVGPU_MEM_DMA_ERROR (~0ULL) 44#define NVGPU_MEM_DMA_ERROR (~0ULL)
44 45
@@ -162,6 +163,7 @@ struct nvgpu_mem {
162 /* 163 /*
163 * Fields only populated for vidmem allocations. 164 * Fields only populated for vidmem allocations.
164 */ 165 */
166 struct nvgpu_page_alloc *vidmem_alloc;
165 struct nvgpu_allocator *allocator; 167 struct nvgpu_allocator *allocator;
166 struct nvgpu_list_node clear_list_entry; 168 struct nvgpu_list_node clear_list_entry;
167 169