From d69e51813a57dfae204daf87767652685117daf1 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 21 Sep 2017 16:24:04 -0700 Subject: gpu: nvgpu: gv11b: fix faulted channel's id/type Teardown function should be passed appropriate id and id_type. E.g. if a channel is marked as tsg, channel teardown/rc function should be passed it's tsgid as id and type_tsg as id_type Bug 200277163 Change-Id: I2e83561c03d515fac28cbb8ce75a9f2c7bf746ac Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1557296 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 9301ebc6..75045800 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c @@ -1376,6 +1376,7 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g, unsigned int id_type; u32 num_lce, act_eng_bitmask = 0; int err = 0; + u32 id = ((u32)~0); if (!mmfault->valid) return; @@ -1417,10 +1418,13 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g, nvgpu_log(g, gpu_dbg_intr, "UNBOUND INST BLOCK MMU FAULT"); } else if (mmfault->refch) { - if (gk20a_is_channel_marked_as_tsg(mmfault->refch)) + if (gk20a_is_channel_marked_as_tsg(mmfault->refch)) { + id = mmfault->refch->tsgid; id_type = ID_TYPE_TSG; - else + } else { + id = mmfault->chid; id_type = ID_TYPE_CHANNEL; + } } else { id_type = ID_TYPE_UNKNOWN; } @@ -1428,7 +1432,7 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g, 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); + id, id_type, RC_TYPE_MMU_FAULT, mmfault); } else { err = gv11b_fb_fix_page_fault(g, mmfault); if (err) { -- cgit v1.2.2