summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-06-05 19:40:50 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:08 -0400
commit7a5d498a711833990a9d8fc3f5d3f3e26bee301c (patch)
tree8fd4d77ea3835bd7c61681eeb90bd5c9f4df1cf9 /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parentd6c9f9f170a1d7a6bedbf5f7e2f1ec5cf4c9a3f1 (diff)
gpu: nvgpu: handle replayable mmu fault during waiting for SM lockdown
outstanding replayable mmu fault will prevent SM from lockdown, so handle the replayable mmu fault while polling lockdown status. Jira EVLR-2643 Bug 200405202 Change-Id: I811f16ef4394a6cc42a5f37a17e426dd749c5652 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1741997 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 378bdc13..9bd48fdc 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -48,6 +48,7 @@
48#include "gv11b/subctx_gv11b.h" 48#include "gv11b/subctx_gv11b.h"
49#include "gv11b/gv11b.h" 49#include "gv11b/gv11b.h"
50#include "gv11b/gr_pri_gv11b.h" 50#include "gv11b/gr_pri_gv11b.h"
51#include "gv11b/fb_gv11b.h"
51 52
52#include <nvgpu/hw/gv11b/hw_gr_gv11b.h> 53#include <nvgpu/hw/gv11b/hw_gr_gv11b.h>
53#include <nvgpu/hw/gv11b/hw_fifo_gv11b.h> 54#include <nvgpu/hw/gv11b/hw_fifo_gv11b.h>
@@ -3735,15 +3736,19 @@ int gv11b_gr_wait_for_sm_lock_down(struct gk20a *g,
3735 return 0; 3736 return 0;
3736 } 3737 }
3737 3738
3738 /* if an mmu fault is pending and mmu debug mode is not 3739 if (mmu_debug_mode_enabled) {
3739 * enabled, the sm will never lock down. 3740 gv11b_fb_handle_replayable_mmu_fault(g);
3740 */ 3741 } else {
3741 if (!mmu_debug_mode_enabled && 3742 /* if an mmu fault is pending and mmu debug mode is not
3742 (g->ops.mm.mmu_fault_pending(g))) { 3743 * enabled, the sm will never lock down.
3743 nvgpu_err(g, 3744 */
3744 "GPC%d TPC%d: mmu fault pending," 3745 if (g->ops.mm.mmu_fault_pending(g)) {
3745 " SM%d will never lock down!", gpc, tpc, sm); 3746 nvgpu_err(g,
3746 return -EFAULT; 3747 "GPC%d TPC%d: mmu fault pending,"
3748 " SM%d will never lock down!",
3749 gpc, tpc, sm);
3750 return -EFAULT;
3751 }
3747 } 3752 }
3748 3753
3749 nvgpu_usleep_range(delay, delay * 2); 3754 nvgpu_usleep_range(delay, delay * 2);