diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 7bcf5281..abb53e66 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics | 2 | * GK20A Graphics |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -8851,6 +8851,10 @@ int gr_gk20a_wait_for_pause(struct gk20a *g, struct nvgpu_warpstate *w_state) | |||
8851 | u32 gpc, tpc, sm, sm_id; | 8851 | u32 gpc, tpc, sm, sm_id; |
8852 | u32 global_mask; | 8852 | u32 global_mask; |
8853 | 8853 | ||
8854 | if (!g->ops.gr.get_sm_no_lock_down_hww_global_esr_mask || | ||
8855 | !g->ops.gr.lock_down_sm || !g->ops.gr.bpt_reg_info) | ||
8856 | return -EINVAL; | ||
8857 | |||
8854 | /* Wait for the SMs to reach full stop. This condition is: | 8858 | /* Wait for the SMs to reach full stop. This condition is: |
8855 | * 1) All SMs with valid warps must be in the trap handler (SM_IN_TRAP_MODE) | 8859 | * 1) All SMs with valid warps must be in the trap handler (SM_IN_TRAP_MODE) |
8856 | * 2) All SMs in the trap handler must have equivalent VALID and PAUSED warp | 8860 | * 2) All SMs in the trap handler must have equivalent VALID and PAUSED warp |
@@ -8908,6 +8912,9 @@ int gr_gk20a_clear_sm_errors(struct gk20a *g) | |||
8908 | u32 global_esr; | 8912 | u32 global_esr; |
8909 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); | 8913 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); |
8910 | 8914 | ||
8915 | if (!g->ops.gr.get_sm_hww_global_esr || !g->ops.gr.clear_sm_hww) | ||
8916 | return -EINVAL; | ||
8917 | |||
8911 | for (gpc = 0; gpc < gr->gpc_count; gpc++) { | 8918 | for (gpc = 0; gpc < gr->gpc_count; gpc++) { |
8912 | 8919 | ||
8913 | /* check if any tpc has an exception */ | 8920 | /* check if any tpc has an exception */ |