summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-07-18 18:17:22 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-19 02:42:08 -0400
commit357e3d4d388bef0556239412ab46dd01c3bbac2e (patch)
tree4cd9f36978abedaf404dcbbd136dc0fcfe69c370 /drivers/gpu/nvgpu/gv11b/fb_gv11b.c
parent7ab28a41842df2045533b0836233db3563cd531f (diff)
gpu: nvgpu: gv11b: fix for replay fault addr equal to 0
fault_addr "0" is not supposed to be fixed ever. For the first time when prev = 0, next = 0 and fault addr is also 0 then handle_mmu_fault_common will not be called. Fix by checking fault_addr not equal to 0 Bug 200277163 Change-Id: I532bca54a85e540415b9f5f5e71daec9cf0e0619 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1522653 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fb_gv11b.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
index 0ec6c9dd..6626344c 100644
--- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
@@ -1075,14 +1075,17 @@ static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
1075 struct nvgpu_mem *mem; 1075 struct nvgpu_mem *mem;
1076 struct mmu_fault_info *mmfault; 1076 struct mmu_fault_info *mmfault;
1077 u32 invalidate_replay_val = 0; 1077 u32 invalidate_replay_val = 0;
1078 u64 prev_fault_addr = 0; 1078 u64 prev_fault_addr = 0ULL;
1079 u64 next_fault_addr = 0; 1079 u64 next_fault_addr = 0ULL;
1080 1080
1081 if (gv11b_fb_is_fault_buffer_empty(g, index, &get_indx)) { 1081 if (gv11b_fb_is_fault_buffer_empty(g, index, &get_indx)) {
1082 nvgpu_log(g, gpu_dbg_intr, 1082 nvgpu_log(g, gpu_dbg_intr,
1083 "SPURIOUS mmu fault: reg index:%d", index); 1083 "SPURIOUS mmu fault: reg index:%d", index);
1084 return; 1084 return;
1085 } 1085 }
1086 nvgpu_info(g, "%s MMU FAULT" ,
1087 index == REPLAY_REG_INDEX ? "REPLAY" : "NON-REPLAY");
1088
1086 nvgpu_log(g, gpu_dbg_intr, "get ptr = %d", get_indx); 1089 nvgpu_log(g, gpu_dbg_intr, "get ptr = %d", get_indx);
1087 1090
1088 mem = &g->mm.hw_fault_buf[index]; 1091 mem = &g->mm.hw_fault_buf[index];
@@ -1119,10 +1122,16 @@ static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
1119 rd32_val = nvgpu_mem_rd32(g, mem, 1122 rd32_val = nvgpu_mem_rd32(g, mem,
1120 offset + gmmu_fault_buf_entry_valid_w()); 1123 offset + gmmu_fault_buf_entry_valid_w());
1121 1124
1122 if (index == REPLAY_REG_INDEX) { 1125 if (index == REPLAY_REG_INDEX && mmfault->fault_addr != 0ULL) {
1126 /* fault_addr "0" is not supposed to be fixed ever.
1127 * For the first time when prev = 0, next = 0 and
1128 * fault addr is also 0 then handle_mmu_fault_common will
1129 * not be called. Fix by checking fault_addr not equal to 0
1130 */
1123 prev_fault_addr = next_fault_addr; 1131 prev_fault_addr = next_fault_addr;
1124 next_fault_addr = mmfault->fault_addr; 1132 next_fault_addr = mmfault->fault_addr;
1125 if (prev_fault_addr == next_fault_addr) { 1133 if (prev_fault_addr == next_fault_addr) {
1134 nvgpu_log(g, gpu_dbg_intr, "pte is fixed");
1126 if (mmfault->refch) 1135 if (mmfault->refch)
1127 gk20a_channel_put(mmfault->refch); 1136 gk20a_channel_put(mmfault->refch);
1128 /* pte already fixed for this addr */ 1137 /* pte already fixed for this addr */