diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-04-12 14:19:09 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-25 17:26:00 -0400 |
commit | aff9d46c00a2a82c93d6cc43d790584e7e474d0e (patch) | |
tree | dd86be88334529cf4b109c68e477a9e5c0e6b8b6 /drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | |
parent | 5714f5eaaf4715c9989e5c2bf732cdb9136b0fbe (diff) |
gpu: nvgpu: Add __nvgpu_mem_create_from_pages()
Add a function to create a nvgpu_mem from a list of arbitrary pages.
This API is useful for pages not necessarily allocated by the Linux
page allocator. It is useful for making nvgpu_mems that represent
carveouts or other things like that.
JIRA NVGPU-12
JIRA NVGPU-30
Change-Id: Ibcb6432f077a6b0ecf9d183248e47a1f9ecb3ddd
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1464080
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h index b01fbec5..66d04ab8 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | |||
@@ -68,6 +68,16 @@ struct nvgpu_mem { | |||
68 | * therefor zeroed (to prevent leaking information in VIDMEM buffers). | 68 | * therefor zeroed (to prevent leaking information in VIDMEM buffers). |
69 | */ | 69 | */ |
70 | #define NVGPU_MEM_FLAG_USER_MEM (1 << 2) | 70 | #define NVGPU_MEM_FLAG_USER_MEM (1 << 2) |
71 | |||
72 | /* | ||
73 | * Internal flag that specifies this struct has not been made with DMA | ||
74 | * memory and as a result should not try to use the DMA routines for | ||
75 | * freeing the backing memory. | ||
76 | * | ||
77 | * However, this will not stop the DMA API from freeing other parts of | ||
78 | * nvgpu_mem in a system specific way. | ||
79 | */ | ||
80 | #define __NVGPU_MEM_FLAG_NO_DMA (1 << 3) | ||
71 | unsigned long mem_flags; | 81 | unsigned long mem_flags; |
72 | 82 | ||
73 | /* | 83 | /* |