diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 964ccb03..4e0e2bd1 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -3357,23 +3357,12 @@ static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | |||
3357 | ret = g->ops.fifo.runlist_wait_pending(g, runlist_id); | 3357 | ret = g->ops.fifo.runlist_wait_pending(g, runlist_id); |
3358 | 3358 | ||
3359 | if (ret == -ETIMEDOUT) { | 3359 | if (ret == -ETIMEDOUT) { |
3360 | nvgpu_err(g, | 3360 | nvgpu_err(g, "runlist %d update timeout", runlist_id); |
3361 | "runlist update timeout"); | 3361 | /* trigger runlist update timeout recovery */ |
3362 | 3362 | return ret; | |
3363 | gk20a_fifo_runlist_reset_engines(g, runlist_id); | ||
3364 | |||
3365 | /* engine reset needs the lock. drop it */ | ||
3366 | /* wait until the runlist is active again */ | ||
3367 | ret = g->ops.fifo.runlist_wait_pending(g, runlist_id); | ||
3368 | /* get the lock back. at this point everything should | ||
3369 | * should be fine */ | ||
3370 | 3363 | ||
3371 | if (ret) | ||
3372 | nvgpu_err(g, | ||
3373 | "runlist update failed: %d", ret); | ||
3374 | } else if (ret == -EINTR) | 3364 | } else if (ret == -EINTR) |
3375 | nvgpu_err(g, | 3365 | nvgpu_err(g, "runlist update interrupted"); |
3376 | "runlist update interrupted"); | ||
3377 | } | 3366 | } |
3378 | 3367 | ||
3379 | runlist->cur_buffer = new_buf; | 3368 | runlist->cur_buffer = new_buf; |
@@ -3513,7 +3502,7 @@ int gk20a_fifo_update_runlist(struct gk20a *g, u32 runlist_id, u32 chid, | |||
3513 | struct fifo_gk20a *f = &g->fifo; | 3502 | struct fifo_gk20a *f = &g->fifo; |
3514 | u32 token = PMU_INVALID_MUTEX_OWNER_ID; | 3503 | u32 token = PMU_INVALID_MUTEX_OWNER_ID; |
3515 | u32 mutex_ret; | 3504 | u32 mutex_ret; |
3516 | u32 ret = 0; | 3505 | int ret = 0; |
3517 | 3506 | ||
3518 | nvgpu_log_fn(g, " "); | 3507 | nvgpu_log_fn(g, " "); |
3519 | 3508 | ||
@@ -3530,6 +3519,10 @@ int gk20a_fifo_update_runlist(struct gk20a *g, u32 runlist_id, u32 chid, | |||
3530 | nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); | 3519 | nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); |
3531 | 3520 | ||
3532 | nvgpu_mutex_release(&runlist->runlist_lock); | 3521 | nvgpu_mutex_release(&runlist->runlist_lock); |
3522 | |||
3523 | if (ret == -ETIMEDOUT) | ||
3524 | gk20a_fifo_runlist_reset_engines(g, runlist_id); | ||
3525 | |||
3533 | return ret; | 3526 | return ret; |
3534 | } | 3527 | } |
3535 | 3528 | ||