gpu: nvgpu: gv11b: fix get ptr update for mmu fault buffer

Skipping the last entry makes get ptr 0.
This causes HW to think that buffer overflow has happened,
but it really hasn't. Due to this issue no further progress
is possible as all FB entries beyond get ptr are invalid.

Bug 200300788

Change-Id: I7373dfa087cdb7c307aacacf62ef4ca8a0214cf2
Signed-off-by: Ashish Srivastava <assrivastava@nvidia.com>
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1528070
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Ashish Srivastava
2017-07-27 18:59:03 +05:30
committed by mobile promotions
parent b859393ffe
commit 7c2b4d70ec

View File

@@ -1107,11 +1107,7 @@ static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
gv11b_fb_copy_from_hw_fault_buf(g, mem, offset, mmfault);
/* Extra 1 in buffer size is to detect buffer full.
* Actual number of entries for faults to be snapped are
* one less than number in fault_buffer_size_val
*/
get_indx = (get_indx + 1) % (entries - 1);
get_indx = (get_indx + 1) % entries;
nvgpu_log(g, gpu_dbg_intr, "new get index = %d", get_indx);
gv11b_fb_fault_buffer_get_ptr_update(g, index, get_indx);