From 338c99b4ecacfb3ebd7cc67a81a4c04d6193145e Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 8 Feb 2018 15:08:23 -0800 Subject: gpu: nvgpu: When NVLINK is enabled use phys addresses When NVLINK is enabled we need to use phys addresses from the SGT since NVLINK bypasses the SMMU. JIRA EVLR-2333 Change-Id: Ibfc0454fa7616056761f8626f2a611749775d091 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1654561 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/gmmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/mm') diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 78ec361e..5a61ac51 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c @@ -501,7 +501,9 @@ static int __nvgpu_gmmu_do_update_page_table(struct vm_gk20a *vm, * mapping is simple since the "physical" address is actually a virtual * IO address and will be contiguous. */ - if (attrs->aperture == APERTURE_SYSMEM && nvgpu_iommuable(g)) { + if (attrs->aperture == APERTURE_SYSMEM && + nvgpu_iommuable(g) && + nvgpu_sgt_iommuable(g, sgt)) { u64 io_addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, attrs); io_addr += space_to_skip; -- cgit v1.2.2