From d9ee7aff0455ad79caf395cedd53c3e092d2538c Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Tue, 28 Mar 2017 14:36:02 -0700 Subject: gpu: nvgpu: gv11b: fifo recovery for nonreplay fault Host will no longer receive replayable or non-replayable fault requests. MMU will handle both types of fault reporting. This means that Host will no longer automatically disable scheduling or preempt a PBDMA when an engine page faults. After fault happens, engine will stall on its own fault and will not context switch until the fault is serviced JIRA GPUT19X-7 Change-Id: I8039e6f50d87f43e101d1372faa5ca6fb739036e Signed-off-by: Seema Khowala Reviewed-on: https://git-master/r/1493417 Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 6d1fbca9..f9532d66 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c @@ -966,6 +966,9 @@ static void gv11b_fb_copy_from_hw_fault_buf(struct gk20a *g, static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g, struct mmu_fault_info *mmfault) { + unsigned int id_type; + u32 act_eng_bitmask = 0; + if (!mmfault->valid) return; @@ -977,13 +980,23 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g, * instance block, the fault cannot be isolated to a * single context so we need to reset the entire runlist */ - nvgpu_log(g, gpu_dbg_intr, "UNBOUND INST"); + id_type = ID_TYPE_UNKNOWN; + nvgpu_log(g, gpu_dbg_intr, "UNBOUND INST BLOCK MMU FAULT"); + + } else if (mmfault->refch) { + if (gk20a_is_channel_marked_as_tsg(mmfault->refch)) + id_type = ID_TYPE_TSG; + else + id_type = ID_TYPE_CHANNEL; + } else { + id_type = ID_TYPE_UNKNOWN; } - if (mmfault->refch) { - gk20a_channel_put(mmfault->refch); - mmfault->refch = NULL; - } + if (mmfault->faulted_engine != FIFO_INVAL_ENGINE_ID) + act_eng_bitmask = BIT(mmfault->faulted_engine); + + g->ops.fifo.teardown_ch_tsg(g, act_eng_bitmask, mmfault->chid, + id_type, RC_TYPE_MMU_FAULT, mmfault); } static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g, -- cgit v1.2.2