diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/mm_gp10b.c | 10 |
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) { |