summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-02-27 12:34:21 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-23 20:14:09 -0400
commit855d8f2379f3a157977c17ba125a422b9f74c365 (patch)
treed9f0278d61b9abd82e4b8d5f618ce4bf94ba9370 /drivers/gpu/nvgpu/include
parente9a6d179a42e7bdd6bb4876fb14f4ff7ab0df852 (diff)
gpu: nvgpu: Check for all sysmem apertures in GMMU
Allow a potential IOMMU'ed GMMU mapping for all SYSMEM buffers inlcuding coherent sysmem. Typically this won't actually happen since IO coherent mappings will also often be accessed over NVLINK which is physically addressed. Also update the comments surrounding this code to take into account the new NVLINK nuances. Since NVLINK buffers are directly mapped even when the IOMMU is enabled this is very deserving of a comment explaining what's going on. Lastly add some simple functions for checking if an nvgpu_mem (or a particular aperture field) is a sysmem aperture. Currently this includes SYSMEM and SYSMEM_COH. JIRA EVLR-2333 Change-Id: I992d3c25d433778eaad9eef338aa5aa42afe597e Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1665185 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> 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/nvgpu_mem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
index 302f7287..c5e3e752 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
@@ -217,6 +217,9 @@ static inline const char *nvgpu_aperture_str(struct gk20a *g,
217 return "UNKNOWN"; 217 return "UNKNOWN";
218} 218}
219 219
220bool nvgpu_aperture_is_sysmem(enum nvgpu_aperture ap);
221bool nvgpu_mem_is_sysmem(struct nvgpu_mem *mem);
222
220/* 223/*
221 * Returns true if the passed nvgpu_mem has been allocated (i.e it's valid for 224 * Returns true if the passed nvgpu_mem has been allocated (i.e it's valid for
222 * subsequent use). 225 * subsequent use).