From 84f2356b13fdad636c33d1d2908ff2e977a09bf0 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 16 Aug 2017 15:12:53 -0700 Subject: gpu: nvgpu: Remove sg_phys() from GMMU code Remove the last sg_phys() call from the GMMU code and replace it with a generic nvgpu_mem API. This new API, nvgpu_mem_get_phys_addr(), returns the physical address of an nvgpu_mem struct. Also, implement this new API in the Linux specific nvgpu_mem code since it requires access to the underlying SGT/SGL. JIRA NVGPU-68 Change-Id: Idf88701a2a8515464c658c26e0de493c82ff850d Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1542964 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/mm/gmmu.c | 2 +- 1 file changed, 1 insertion(+), 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 f68dfc0a..ab9d0d41 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c @@ -212,7 +212,7 @@ u64 nvgpu_pde_phys_addr(struct gk20a *g, struct nvgpu_gmmu_pd *pd) u64 page_addr; if (g->mm.has_physical_mode) - page_addr = sg_phys(pd->mem->priv.sgt->sgl); + page_addr = nvgpu_mem_get_phys_addr(g, pd->mem); else page_addr = nvgpu_mem_get_addr(g, pd->mem); -- cgit v1.2.2