summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-06-15 14:33:35 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:06 -0500
commit8d354418ec1ee46e7fcc6489ec26f4b1e6ef9572 (patch)
treebff4629119b9d1deb18aa8d0fdc469f52a94261d /drivers/gpu/nvgpu/gp10b/mm_gp10b.c
parent4b806879d582d41b20c17cc1739b537dbd41cb9a (diff)
gpu: nvgpu: gp10b: Phys addresses for page tables
Use always physical addresses for page tables. In gp10b new format each level fits in one page, so we do not need SMMU translation. Change-Id: Ie46b2bce0f7a4e8d2904d74b1df616e389874141 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/758181 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
index bcdee9fc..5371605f 100644
--- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -160,13 +160,12 @@ static int update_gmmu_pde3_locked(struct vm_gk20a *vm,
160 struct gk20a_mm_entry *pte = parent->entries + i; 160 struct gk20a_mm_entry *pte = parent->entries + i;
161 u32 pde_v[2] = {0, 0}; 161 u32 pde_v[2] = {0, 0};
162 u32 *pde; 162 u32 *pde;
163 struct gk20a *g = vm->mm->g;
164 163
165 gk20a_dbg_fn(""); 164 gk20a_dbg_fn("");
166 165
167 pte_addr = g->ops.mm.get_iova_addr(g, pte->sgt->sgl, 0) 166 pte_addr = virt_to_phys(pte->cpu_va)
168 >> gmmu_new_pde_address_shift_v(); 167 >> gmmu_new_pde_address_shift_v();
169 pde_addr = g->ops.mm.get_iova_addr(g, parent->sgt->sgl, 0); 168 pde_addr = virt_to_phys(parent->cpu_va);
170 169
171 pde_v[0] |= gmmu_new_pde_aperture_video_memory_f(); 170 pde_v[0] |= gmmu_new_pde_aperture_video_memory_f();
172 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr)); 171 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr));
@@ -203,7 +202,6 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
203 struct gk20a_mm_entry *entry = pte->entries + i; 202 struct gk20a_mm_entry *entry = pte->entries + i;
204 u32 pde_v[4] = {0, 0, 0, 0}; 203 u32 pde_v[4] = {0, 0, 0, 0};
205 u32 *pde; 204 u32 *pde;
206 struct gk20a *g = vm->mm->g;
207 205
208 gk20a_dbg_fn(""); 206 gk20a_dbg_fn("");
209 207
@@ -211,11 +209,11 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
211 big_valid = entry->size && entry->pgsz == gmmu_page_size_big; 209 big_valid = entry->size && entry->pgsz == gmmu_page_size_big;
212 210
213 if (small_valid) 211 if (small_valid)
214 pte_addr_small = g->ops.mm.get_iova_addr(g, entry->sgt->sgl, 0) 212 pte_addr_small = virt_to_phys(entry->cpu_va)
215 >> gmmu_new_dual_pde_address_shift_v(); 213 >> gmmu_new_dual_pde_address_shift_v();
216 214
217 if (big_valid) 215 if (big_valid)
218 pte_addr_big = g->ops.mm.get_iova_addr(g, entry->sgt->sgl, 0) 216 pte_addr_big = virt_to_phys(entry->cpu_va)
219 >> gmmu_new_dual_pde_address_big_shift_v(); 217 >> gmmu_new_dual_pde_address_big_shift_v();
220 218
221 if (small_valid) { 219 if (small_valid) {