summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-02-08 18:08:23 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-21 01:17:48 -0500
commit338c99b4ecacfb3ebd7cc67a81a4c04d6193145e (patch)
tree04f2a4be1c5c9ed638aa8fad96e641ce83384535 /drivers/gpu/nvgpu/common/mm
parent98e87ca10ce780ee33fd7b61679536156cf637ea (diff)
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 <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1654561 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r--drivers/gpu/nvgpu/common/mm/gmmu.c4
1 files changed, 3 insertions, 1 deletions
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,
501 * mapping is simple since the "physical" address is actually a virtual 501 * mapping is simple since the "physical" address is actually a virtual
502 * IO address and will be contiguous. 502 * IO address and will be contiguous.
503 */ 503 */
504 if (attrs->aperture == APERTURE_SYSMEM && nvgpu_iommuable(g)) { 504 if (attrs->aperture == APERTURE_SYSMEM &&
505 nvgpu_iommuable(g) &&
506 nvgpu_sgt_iommuable(g, sgt)) {
505 u64 io_addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, attrs); 507 u64 io_addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, attrs);
506 508
507 io_addr += space_to_skip; 509 io_addr += space_to_skip;