summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r--drivers/gpu/nvgpu/common/mm/gmmu.c2
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_mem.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c
index 53ec3029..78ec361e 100644
--- a/drivers/gpu/nvgpu/common/mm/gmmu.c
+++ b/drivers/gpu/nvgpu/common/mm/gmmu.c
@@ -501,7 +501,7 @@ 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 && !g->mm.bypass_smmu) { 504 if (attrs->aperture == APERTURE_SYSMEM && nvgpu_iommuable(g)) {
505 u64 io_addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, attrs); 505 u64 io_addr = nvgpu_sgt_get_gpu_addr(g, sgt, sgt->sgl, attrs);
506 506
507 io_addr += space_to_skip; 507 io_addr += space_to_skip;
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
index f472d2a0..73b6b2a7 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_mem.c
@@ -96,7 +96,7 @@ u64 nvgpu_sgt_alignment(struct gk20a *g, struct nvgpu_sgt *sgt)
96 * and double check length of buffer later. Also, since there's an 96 * and double check length of buffer later. Also, since there's an
97 * IOMMU we know that this DMA address is contiguous. 97 * IOMMU we know that this DMA address is contiguous.
98 */ 98 */
99 if (!g->mm.bypass_smmu && 99 if (nvgpu_iommuable(g) &&
100 nvgpu_sgt_iommuable(g, sgt) && 100 nvgpu_sgt_iommuable(g, sgt) &&
101 nvgpu_sgt_get_dma(sgt, sgt->sgl)) 101 nvgpu_sgt_get_dma(sgt, sgt->sgl))
102 return 1ULL << __ffs(nvgpu_sgt_get_dma(sgt, sgt->sgl)); 102 return 1ULL << __ffs(nvgpu_sgt_get_dma(sgt, sgt->sgl));