summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
index 9f66c21f..190dc7f6 100644
--- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -160,12 +160,13 @@ 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;
163 164
164 gk20a_dbg_fn(""); 165 gk20a_dbg_fn("");
165 166
166 pte_addr = virt_to_phys(pte->cpu_va) 167 pte_addr = g->ops.mm.get_iova_addr(g, pte->sgt->sgl, 0)
167 >> gmmu_new_pde_address_shift_v(); 168 >> gmmu_new_pde_address_shift_v();
168 pde_addr = virt_to_phys(parent->cpu_va); 169 pde_addr = g->ops.mm.get_iova_addr(g, parent->sgt->sgl, 0);
169 170
170 pde_v[0] |= gmmu_new_pde_aperture_video_memory_f(); 171 pde_v[0] |= gmmu_new_pde_aperture_video_memory_f();
171 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr)); 172 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr));
@@ -202,6 +203,7 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
202 struct gk20a_mm_entry *entry = pte->entries + i; 203 struct gk20a_mm_entry *entry = pte->entries + i;
203 u32 pde_v[4] = {0, 0, 0, 0}; 204 u32 pde_v[4] = {0, 0, 0, 0};
204 u32 *pde; 205 u32 *pde;
206 struct gk20a *g = vm->mm->g;
205 207
206 gk20a_dbg_fn(""); 208 gk20a_dbg_fn("");
207 209
@@ -209,11 +211,11 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
209 big_valid = entry->size && entry->pgsz == gmmu_page_size_big; 211 big_valid = entry->size && entry->pgsz == gmmu_page_size_big;
210 212
211 if (small_valid) 213 if (small_valid)
212 pte_addr_small = virt_to_phys(entry->cpu_va) 214 pte_addr_small = g->ops.mm.get_iova_addr(g, entry->sgt->sgl, 0)
213 >> gmmu_new_dual_pde_address_shift_v(); 215 >> gmmu_new_dual_pde_address_shift_v();
214 216
215 if (big_valid) 217 if (big_valid)
216 pte_addr_big = virt_to_phys(entry->cpu_va) 218 pte_addr_big = g->ops.mm.get_iova_addr(g, entry->sgt->sgl, 0)
217 >> gmmu_new_dual_pde_address_big_shift_v(); 219 >> gmmu_new_dual_pde_address_big_shift_v();
218 220
219 if (small_valid) { 221 if (small_valid) {