summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c7
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c13
2 files changed, 4 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 78e52c62..c43798b5 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1414,10 +1414,8 @@ static int gk20a_channel_add_job(struct channel_gk20a *c,
1414 1414
1415void gk20a_channel_update(struct channel_gk20a *c, int nr_completed) 1415void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
1416{ 1416{
1417 struct gk20a *g = c->g;
1418 struct vm_gk20a *vm = c->vm; 1417 struct vm_gk20a *vm = c->vm;
1419 struct channel_gk20a_job *job, *n; 1418 struct channel_gk20a_job *job, *n;
1420 int i;
1421 1419
1422 wake_up(&c->submit_wq); 1420 wake_up(&c->submit_wq);
1423 1421
@@ -1442,7 +1440,7 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
1442 1440
1443 list_del_init(&job->list); 1441 list_del_init(&job->list);
1444 kfree(job); 1442 kfree(job);
1445 gk20a_idle(g->dev); 1443 gk20a_idle(c->g->dev);
1446 } 1444 }
1447 1445
1448 /* 1446 /*
@@ -1460,9 +1458,6 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
1460 } 1458 }
1461 mutex_unlock(&c->jobs_lock); 1459 mutex_unlock(&c->jobs_lock);
1462 mutex_unlock(&c->submit_lock); 1460 mutex_unlock(&c->submit_lock);
1463
1464 for (i = 0; i < nr_completed; i++)
1465 gk20a_idle(c->g->dev);
1466} 1461}
1467 1462
1468void add_wait_cmd(u32 *ptr, u32 id, u32 thresh) 1463void add_wait_cmd(u32 *ptr, u32 id, u32 thresh)
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 677c4b49..a6ca8214 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -233,16 +233,9 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
233 thresh = nvhost_syncpt_incr_max_ext(sp->host1x_pdev, sp->id, 1); 233 thresh = nvhost_syncpt_incr_max_ext(sp->host1x_pdev, sp->id, 1);
234 234
235 if (register_irq) { 235 if (register_irq) {
236 /* nvhost action_gpfifo_submit_complete releases this ref. */ 236 err = nvhost_intr_register_notifier(sp->host1x_pdev,
237 err = gk20a_busy(c->g->dev); 237 sp->id, thresh,
238 238 gk20a_channel_syncpt_update, c);
239 if (!err) {
240 err = nvhost_intr_register_notifier(sp->host1x_pdev,
241 sp->id, thresh,
242 gk20a_channel_syncpt_update, c);
243 if (err)
244 gk20a_idle(c->g->dev);
245 }
246 239
247 /* Adding interrupt action should never fail. A proper error 240 /* Adding interrupt action should never fail. A proper error
248 * handling here would require us to decrement the syncpt max 241 * handling here would require us to decrement the syncpt max