From 7c2b4d70ec98f9da123744ffddb413a606cbbd2b Mon Sep 17 00:00:00 2001 From: Ashish Srivastava Date: Thu, 27 Jul 2017 18:59:03 +0530 Subject: 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 Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1528070 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 6626344c..fd63e9ff 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c @@ -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); -- cgit v1.2.2