summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-09-12 04:59:21 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:19 -0500
commitf107ff488c8f1ccd225cdd4c40c82f79c45136c7 (patch)
treebcc99c288ece9c716f8fdf2abf5b6c3d6a787cb7 /drivers/gpu/nvgpu/gp10b/mm_gp10b.c
parentbb6923908a2873b079ad67d22c9fcb014c00af28 (diff)
gpu: nvgpu: fix pde0 target bit programming
Use entry->mem for determining the target aperture bits of the memory block represented by entry->mem in update_gmmu_pde0_locked(), instead of pte->mem that holds the parent memory where this bit is written to. Previously this has worked because all page tables have been in the same aperture, but really large userspace allocations may push a part of them suddendly to sysmem. Bug 1809939 Change-Id: I3372487c6ae9793018ce44552ded3fb1ba4d145a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1218636 (cherry picked from commit a92596f6e8e621e51b6afae9ab7e62044d6311eb) Reviewed-on: http://git-master/r/1220525 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
index 048a4662..03bab121 100644
--- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -242,7 +242,7 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
242 242
243 if (small_valid) { 243 if (small_valid) {
244 pde_v[2] |= gmmu_new_dual_pde_address_small_sys_f(pte_addr_small); 244 pde_v[2] |= gmmu_new_dual_pde_address_small_sys_f(pte_addr_small);
245 pde_v[2] |= gk20a_aperture_mask(g, &pte->mem, 245 pde_v[2] |= gk20a_aperture_mask(g, &entry->mem,
246 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(), 246 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(),
247 gmmu_new_dual_pde_aperture_small_video_memory_f()); 247 gmmu_new_dual_pde_aperture_small_video_memory_f());
248 pde_v[2] |= gmmu_new_dual_pde_vol_small_true_f(); 248 pde_v[2] |= gmmu_new_dual_pde_vol_small_true_f();
@@ -252,7 +252,7 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
252 if (big_valid) { 252 if (big_valid) {
253 pde_v[0] |= gmmu_new_dual_pde_address_big_sys_f(pte_addr_big); 253 pde_v[0] |= gmmu_new_dual_pde_address_big_sys_f(pte_addr_big);
254 pde_v[0] |= gmmu_new_dual_pde_vol_big_true_f(); 254 pde_v[0] |= gmmu_new_dual_pde_vol_big_true_f();
255 pde_v[0] |= gk20a_aperture_mask(g, &pte->mem, 255 pde_v[0] |= gk20a_aperture_mask(g, &entry->mem,
256 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(), 256 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(),
257 gmmu_new_dual_pde_aperture_big_video_memory_f()); 257 gmmu_new_dual_pde_aperture_big_video_memory_f());
258 pde_v[1] |= pte_addr_big >> 28; 258 pde_v[1] |= pte_addr_big >> 28;