diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-06-05 15:53:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-22 13:04:16 -0400 |
commit | 840e039d57d4acfb2be2a82c4b95a6d25c7aacd4 (patch) | |
tree | a4a358cf6bb5d005e8f6db159d1b3b03ddbf94df /drivers/gpu/nvgpu/include | |
parent | 46666ed101847d9b87ea60cd432dea97afbef0b1 (diff) |
gpu: nvgpu: Update Linux side VM code for API solidification
Update the Linux specific code to match the MM API docs in the
previous patch. The user passed page size is plumbed through
the Linux VM mapping calls but is ultimately ignored once the
core VM code is called. This will be handled in the next
patch.
This also adds some code to make the CDE page size picking
happen semi-intelligently. In many cases the CDE buffers can
be mapped with large pages.
Bug 2011640
Change-Id: I20e78e7d5a841e410864b474179e71da1c2482f4
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1740610
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h index 97b8334b..6f3beaa9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | |||
@@ -54,8 +54,9 @@ struct nvgpu_mapped_buf_priv { | |||
54 | /* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ | 54 | /* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ |
55 | int nvgpu_vm_map_linux(struct vm_gk20a *vm, | 55 | int nvgpu_vm_map_linux(struct vm_gk20a *vm, |
56 | struct dma_buf *dmabuf, | 56 | struct dma_buf *dmabuf, |
57 | u64 offset_align, | 57 | u64 map_addr, |
58 | u32 flags, | 58 | u32 flags, |
59 | u32 page_size, | ||
59 | s16 compr_kind, | 60 | s16 compr_kind, |
60 | s16 incompr_kind, | 61 | s16 incompr_kind, |
61 | int rw_flag, | 62 | int rw_flag, |
@@ -71,8 +72,9 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm, | |||
71 | */ | 72 | */ |
72 | int nvgpu_vm_map_buffer(struct vm_gk20a *vm, | 73 | int nvgpu_vm_map_buffer(struct vm_gk20a *vm, |
73 | int dmabuf_fd, | 74 | int dmabuf_fd, |
74 | u64 *offset_align, | 75 | u64 *map_addr, |
75 | u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */ | 76 | u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */ |
77 | u32 page_size, | ||
76 | s16 compr_kind, | 78 | s16 compr_kind, |
77 | s16 incompr_kind, | 79 | s16 incompr_kind, |
78 | u64 buffer_offset, | 80 | u64 buffer_offset, |