summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index c6b444f9..4a32194c 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1401,7 +1401,6 @@ static bool gk20a_fifo_handle_mmu_fault(
1401 struct channel_gk20a *ch = NULL; 1401 struct channel_gk20a *ch = NULL;
1402 struct tsg_gk20a *tsg = NULL; 1402 struct tsg_gk20a *tsg = NULL;
1403 struct channel_gk20a *referenced_channel = NULL; 1403 struct channel_gk20a *referenced_channel = NULL;
1404 bool was_reset;
1405 /* read and parse engine status */ 1404 /* read and parse engine status */
1406 u32 status = gk20a_readl(g, fifo_engine_status_r(engine_id)); 1405 u32 status = gk20a_readl(g, fifo_engine_status_r(engine_id));
1407 u32 ctx_status = fifo_engine_status_ctx_status_v(status); 1406 u32 ctx_status = fifo_engine_status_ctx_status_v(status);
@@ -1486,13 +1485,12 @@ static bool gk20a_fifo_handle_mmu_fault(
1486 "sm debugger attached," 1485 "sm debugger attached,"
1487 " deferring channel recovery to channel free"); 1486 " deferring channel recovery to channel free");
1488 } else if (engine_id != FIFO_INVAL_ENGINE_ID) { 1487 } else if (engine_id != FIFO_INVAL_ENGINE_ID) {
1489 was_reset = mutex_is_locked(&g->fifo.gr_reset_mutex);
1490 mutex_lock(&g->fifo.gr_reset_mutex);
1491 /* if lock is already taken, a reset is taking place 1488 /* if lock is already taken, a reset is taking place
1492 so no need to repeat */ 1489 so no need to repeat */
1493 if (!was_reset) 1490 if (mutex_trylock(&g->fifo.gr_reset_mutex)) {
1494 gk20a_fifo_reset_engine(g, engine_id); 1491 gk20a_fifo_reset_engine(g, engine_id);
1495 mutex_unlock(&g->fifo.gr_reset_mutex); 1492 mutex_unlock(&g->fifo.gr_reset_mutex);
1493 }
1496 } 1494 }
1497 1495
1498 if (ch) 1496 if (ch)