diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-03-14 07:47:04 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-21 18:01:47 -0400 |
commit | 8f3875393e7a6bd0fc03afdb1fa99b7e33b71576 (patch) | |
tree | 7ee7b2da741fae7d06eeb367db2b14d8f78f0f55 /drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |
parent | 79658ac5cb22cc68a2d24d964379a606086c8b39 (diff) |
gpu: nvgpu: abstract away dma alloc attrs
Don't use enum dma_attr in the gk20a_gmmu_alloc_attr* functions, but
define nvgpu-internal flags for no kernel mapping, force contiguous, and
read only modes. Store the flags in the allocated struct mem_desc and
only use gk20a_gmmu_free, remove gk20a_gmmu_free_attr. This helps in OS
abstraction. Rename the notion of attr to flags.
Add implicit NVGPU_DMA_NO_KERNEL_MAPPING to all vidmem buffers
allocated via gk20a_gmmu_alloc_vid for consistency.
Fix a bug in gk20a_gmmu_alloc_map_attr that dropped the attr
parameter accidentally.
Bug 1853519
Change-Id: I1ff67dff9fc425457ae445ce4976a780eb4dcc9f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1321101
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index b23d0091..99ea1bb7 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define _GK20A_PLATFORM_H_ | 17 | #define _GK20A_PLATFORM_H_ |
18 | 18 | ||
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/dma-attrs.h> | ||
21 | #include <linux/version.h> | 20 | #include <linux/version.h> |
22 | 21 | ||
23 | #include <nvgpu/lock.h> | 22 | #include <nvgpu/lock.h> |
@@ -33,7 +32,6 @@ struct secure_page_buffer { | |||
33 | void (*destroy)(struct device *, struct secure_page_buffer *); | 32 | void (*destroy)(struct device *, struct secure_page_buffer *); |
34 | size_t size; | 33 | size_t size; |
35 | u64 iova; | 34 | u64 iova; |
36 | struct dma_attrs attrs; | ||
37 | }; | 35 | }; |
38 | 36 | ||
39 | struct gk20a_platform { | 37 | struct gk20a_platform { |