summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index b7bd55ea..d52e3f7e 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1419,6 +1419,19 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
1419 kfree(job); 1419 kfree(job);
1420 gk20a_idle(g->dev); 1420 gk20a_idle(g->dev);
1421 } 1421 }
1422
1423 /*
1424 * If job list is empty then channel is idle and we can free
1425 * the syncpt here (given aggressive_destroy flag is set)
1426 * Note: if WFI is already scheduled on some other path
1427 * then syncpt is still required to check for idle
1428 */
1429 if (list_empty(&c->jobs) && !c->last_submit_fence.wfi) {
1430 if (c->sync && c->sync->syncpt_aggressive_destroy) {
1431 c->sync->destroy(c->sync);
1432 c->sync = NULL;
1433 }
1434 }
1422 mutex_unlock(&c->jobs_lock); 1435 mutex_unlock(&c->jobs_lock);
1423 mutex_unlock(&c->submit_lock); 1436 mutex_unlock(&c->submit_lock);
1424 1437