summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorAshutosh Jain <ashutoshj@nvidia.com>2016-01-20 09:36:23 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-01-29 11:59:07 -0500
commit5cb995c7510e0290956a3aa221c6a77d4020b3ff (patch)
tree70eb5fcf27482e72118ec27437698a4973c748b2 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent766506d6e0d406ac312b75f709abfdb9d8ae2b2a (diff)
gpu: nvgpu: Fix wait for sm lock down.
global_esr and warp_esr are edge-triggered and are cleared in kernel isr so skip checking them when wait_for_pause is called from UMD via ioctl. Bug 1619430 Change-Id: I2ae54f23ba5c8bfaab35a476f88ccca0bbb10202 Signed-off-by: Ashutosh Jain <ashutoshj@nvidia.com> Reviewed-on: http://git-master/r/935808 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Cory Perry <cperry@nvidia.com> Tested-by: Cory Perry <cperry@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index bf7a3fa7..6e2ea548 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5187,7 +5187,8 @@ unlock:
5187} 5187}
5188 5188
5189int gk20a_gr_lock_down_sm(struct gk20a *g, 5189int gk20a_gr_lock_down_sm(struct gk20a *g,
5190 u32 gpc, u32 tpc, u32 global_esr_mask) 5190 u32 gpc, u32 tpc, u32 global_esr_mask,
5191 bool check_errors)
5191{ 5192{
5192 u32 offset = 5193 u32 offset =
5193 proj_gpc_stride_v() * gpc + proj_tpc_in_gpc_stride_v() * tpc; 5194 proj_gpc_stride_v() * gpc + proj_tpc_in_gpc_stride_v() * tpc;
@@ -5204,7 +5205,7 @@ int gk20a_gr_lock_down_sm(struct gk20a *g,
5204 gr_gpc0_tpc0_sm_dbgr_control0_r() + offset, dbgr_control0); 5205 gr_gpc0_tpc0_sm_dbgr_control0_r() + offset, dbgr_control0);
5205 5206
5206 return gk20a_gr_wait_for_sm_lock_down(g, gpc, tpc, global_esr_mask, 5207 return gk20a_gr_wait_for_sm_lock_down(g, gpc, tpc, global_esr_mask,
5207 true); 5208 check_errors);
5208} 5209}
5209 5210
5210bool gk20a_gr_sm_debugger_attached(struct gk20a *g) 5211bool gk20a_gr_sm_debugger_attached(struct gk20a *g)
@@ -5306,7 +5307,7 @@ static int gk20a_gr_handle_sm_exception(struct gk20a *g, u32 gpc, u32 tpc,
5306 } 5307 }
5307 5308
5308 if (do_warp_sync) { 5309 if (do_warp_sync) {
5309 ret = gk20a_gr_lock_down_sm(g, gpc, tpc, global_mask); 5310 ret = gk20a_gr_lock_down_sm(g, gpc, tpc, global_mask, true);
5310 if (ret) { 5311 if (ret) {
5311 gk20a_err(dev_from_gk20a(g), "sm did not lock down!\n"); 5312 gk20a_err(dev_from_gk20a(g), "sm did not lock down!\n");
5312 return ret; 5313 return ret;