summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-06-17 08:45:38 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:18 -0500
commitbc45c8ef2ba7836eba3ffd7a911905322ed17ab4 (patch)
tree9eebfb503cb52edcb0d66a71995d0a43d2f8a30a
parentd6730d5214a941451a298a22a037e5bcc4fb9ea4 (diff)
gpu: nvgpu: gp10x: support in-kernel vidmem mappings
Propagate the buffer aperture flag in gk20a_locked_gmmu_map up so that buffers represented as a mem_desc and present in vidmem can be mapped to gpu. JIRA DNVGPU-18 JIRA DNVGPU-76 Change-Id: Icd675e83e3c28836f0ed8880425748697713bb0a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1169296 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index 88893886..6f5016cb 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -836,7 +836,8 @@ int gr_gp10b_alloc_buffer(struct vm_gk20a *vm, size_t size,
836 size, 836 size,
837 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 837 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE,
838 gk20a_mem_flag_none, 838 gk20a_mem_flag_none,
839 false); 839 false,
840 mem->aperture);
840 841
841 if (!mem->gpu_va) { 842 if (!mem->gpu_va) {
842 err = -ENOMEM; 843 err = -ENOMEM;
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
index 3a286249..1b6003b3 100644
--- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
+++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
@@ -51,7 +51,8 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
51 bool clear_ctags, 51 bool clear_ctags,
52 bool sparse, 52 bool sparse,
53 bool priv, 53 bool priv,
54 struct vm_gk20a_mapping_batch *batch) 54 struct vm_gk20a_mapping_batch *batch,
55 enum gk20a_aperture aperture)
55{ 56{
56 int err = 0; 57 int err = 0;
57 struct device *d = dev_from_vm(vm); 58 struct device *d = dev_from_vm(vm);