mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: release runlist_lock before issuing recovery
Release runlist_lock before issuing runlist update timeout recovery. Bug 2115080 Change-Id: I22cd0dd8ab6828412fcc98f587e4a5cdce907651 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1722308 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
982fcfa737
commit
25e727d997
@@ -3357,23 +3357,12 @@ static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id,
|
||||
ret = g->ops.fifo.runlist_wait_pending(g, runlist_id);
|
||||
|
||||
if (ret == -ETIMEDOUT) {
|
||||
nvgpu_err(g,
|
||||
"runlist update timeout");
|
||||
nvgpu_err(g, "runlist %d update timeout", runlist_id);
|
||||
/* trigger runlist update timeout recovery */
|
||||
return ret;
|
||||
|
||||
gk20a_fifo_runlist_reset_engines(g, runlist_id);
|
||||
|
||||
/* engine reset needs the lock. drop it */
|
||||
/* wait until the runlist is active again */
|
||||
ret = g->ops.fifo.runlist_wait_pending(g, runlist_id);
|
||||
/* get the lock back. at this point everything should
|
||||
* should be fine */
|
||||
|
||||
if (ret)
|
||||
nvgpu_err(g,
|
||||
"runlist update failed: %d", ret);
|
||||
} else if (ret == -EINTR)
|
||||
nvgpu_err(g,
|
||||
"runlist update interrupted");
|
||||
nvgpu_err(g, "runlist update interrupted");
|
||||
}
|
||||
|
||||
runlist->cur_buffer = new_buf;
|
||||
@@ -3513,7 +3502,7 @@ int gk20a_fifo_update_runlist(struct gk20a *g, u32 runlist_id, u32 chid,
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
u32 token = PMU_INVALID_MUTEX_OWNER_ID;
|
||||
u32 mutex_ret;
|
||||
u32 ret = 0;
|
||||
int ret = 0;
|
||||
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
@@ -3530,6 +3519,10 @@ int gk20a_fifo_update_runlist(struct gk20a *g, u32 runlist_id, u32 chid,
|
||||
nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token);
|
||||
|
||||
nvgpu_mutex_release(&runlist->runlist_lock);
|
||||
|
||||
if (ret == -ETIMEDOUT)
|
||||
gk20a_fifo_runlist_reset_engines(g, runlist_id);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user