mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
005ff07153
commit
03bcab9730
@@ -533,7 +533,8 @@ static int __nvgpu_gmmu_do_update_page_table(struct vm_gk20a *vm,
|
||||
continue;
|
||||
}
|
||||
|
||||
phys_addr = nvgpu_sgt_get_phys(sgt, sgl) + space_to_skip;
|
||||
phys_addr = g->ops.mm.gpu_phys_addr(g, attrs,
|
||||
nvgpu_sgt_get_phys(sgt, sgl)) + space_to_skip;
|
||||
chunk_length = min(length,
|
||||
nvgpu_sgt_get_length(sgt, sgl) - space_to_skip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user