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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index b4fa8f0f..fb772ebd 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1219,7 +1219,8 @@ static bool gk20a_fifo_set_ctx_mmu_error(struct gk20a *g,
1219 if (!ch) 1219 if (!ch)
1220 return verbose; 1220 return verbose;
1221 1221
1222 if (ch->error_notifier) { 1222 mutex_lock(&ch->error_notifier_mutex);
1223 if (ch->error_notifier_ref) {
1223 u32 err = ch->error_notifier->info32; 1224 u32 err = ch->error_notifier->info32;
1224 if (ch->error_notifier->status == 0xffff) { 1225 if (ch->error_notifier->status == 0xffff) {
1225 /* If error code is already set, this mmu fault 1226 /* If error code is already set, this mmu fault
@@ -1230,10 +1231,12 @@ static bool gk20a_fifo_set_ctx_mmu_error(struct gk20a *g,
1230 if (err == NVGPU_CHANNEL_FIFO_ERROR_IDLE_TIMEOUT) 1231 if (err == NVGPU_CHANNEL_FIFO_ERROR_IDLE_TIMEOUT)
1231 verbose = ch->timeout_debug_dump; 1232 verbose = ch->timeout_debug_dump;
1232 } else { 1233 } else {
1233 gk20a_set_error_notifier(ch, 1234 gk20a_set_error_notifier_locked(ch,
1234 NVGPU_CHANNEL_FIFO_ERROR_MMU_ERR_FLT); 1235 NVGPU_CHANNEL_FIFO_ERROR_MMU_ERR_FLT);
1235 } 1236 }
1236 } 1237 }
1238 mutex_unlock(&ch->error_notifier_mutex);
1239
1237 /* mark channel as faulted */ 1240 /* mark channel as faulted */
1238 ch->has_timedout = true; 1241 ch->has_timedout = true;
1239 wmb(); 1242 wmb();