summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-10-18 16:24:53 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-10 18:46:54 -0500
commitee4970a33f41b56f2ada6a0b5ab6f9c400e39d88 (patch)
tree65d26ac7fd8667ac10cee8330a7647e9e72a745c /drivers/gpu/nvgpu/vgpu/mm_vgpu.c
parent6911b4d48c414279731580f1212e29e4b691b04c (diff)
gpu: nvgpu: Make buf alignment generic
Drastically simplify and move the aligment computation for buffers getting mapped into the SGT code. An SGT is all that is needed for computing the alignment. However, this did require that a new SGT op was added: nvgpu_sgt_iommuable() This function returns true if the passed SGT is IOMMU'able and must be implemented by an SGT implementation that has IOMMU'able buffers. If this function is left as NULL then it is assumed that the buffer is not IOMMU'able. Also cleanup the parameter ordering convention among all nvgpu_sgt functions. Previously there was a mishmash of different parameter orderings. This patch now standardizes on the gk20a first approach seen everywhere else in the driver. JIRA NVGPU-30 JIRA NVGPU-246 JIRA NVGPU-71 Change-Id: Ic4ab7b752847cf795c7cfafed5a07818217bba86 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1583985 Reviewed-by: Automatic_Commit_Validation_User 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/vgpu/mm_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/mm_vgpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
index 498a1528..a125366a 100644
--- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
@@ -107,7 +107,7 @@ u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm,
107 struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(d); 107 struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(d);
108 struct tegra_vgpu_cmd_msg msg; 108 struct tegra_vgpu_cmd_msg msg;
109 struct tegra_vgpu_as_map_params *p = &msg.params.as_map; 109 struct tegra_vgpu_as_map_params *p = &msg.params.as_map;
110 u64 addr = nvgpu_sgt_get_gpu_addr(sgt, g, sgt->sgl, NULL); 110 u64 addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, NULL);
111 u8 prot; 111 u8 prot;
112 112
113 gk20a_dbg_fn(""); 113 gk20a_dbg_fn("");