diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-12-19 07:59:37 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-12-21 14:24:12 -0500 |
commit | 03bcab9730b57e0ea4c121576fa3da6036d20a00 (patch) | |
tree | 954f785ff8c8662afb00b4dc878200c9c1acd035 | |
parent | 005ff07153efdc70e84c8ec006407d1acc979da3 (diff) |
gpu: nvgpu: fix non-IOMMU mappings
In __nvgpu_gmmu_do_update_page_table(), and in case of non-IOMMU mappings,
we call nvgpu_sgt_get_phys() to get physical address
But this API ignores mapping attributes including l3_alloc attribute
specified by user space, and this breaks L3 cache allocations
Fix this by using g->ops.mm.gpu_phys_addr() which also considers the
mapping attributes and returns appropriate physical address
Jira GPUT19X-10
Bug 200279508
Change-Id: Ibc0d29f7cb576a9d6893a97b1912d9ff4bc78e02
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1621245
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 22f73083..1455822c 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -533,7 +533,8 @@ static int __nvgpu_gmmu_do_update_page_table(struct vm_gk20a *vm, | |||
533 | continue; | 533 | continue; |
534 | } | 534 | } |
535 | 535 | ||
536 | phys_addr = nvgpu_sgt_get_phys(sgt, sgl) + space_to_skip; | 536 | phys_addr = g->ops.mm.gpu_phys_addr(g, attrs, |
537 | nvgpu_sgt_get_phys(sgt, sgl)) + space_to_skip; | ||
537 | chunk_length = min(length, | 538 | chunk_length = min(length, |
538 | nvgpu_sgt_get_length(sgt, sgl) - space_to_skip); | 539 | nvgpu_sgt_get_length(sgt, sgl) - space_to_skip); |
539 | 540 | ||