Revert "gpu: nvgpu: move check_gp_put() and update_gp_get() to worker"
Vinayak Pane [Sat, 9 Jan 2016 00:02:17 +0000 (16:02 -0800)]
This reverts commit 06ee8880a37e64b6b507f8e3dd031d7bf9259e6e.

Bug 200165480

Change-Id: I38482e1a45b0adee83ca9734d8b27920f7f234f5
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/930691
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>

drivers/gpu/nvgpu/gk20a/channel_gk20a.c

index fd94667..4f6a40a 100644 (file)
@@ -1562,14 +1562,9 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
 
        trace_gk20a_channel_update(c->hw_chid);
 
-       update_gp_get(c->g, c);
        wake_up(&c->submit_wq);
 
        mutex_lock(&c->submit_lock);
-
-       /* gp_put check needs to be done inside submit lock */
-       check_gp_put(c->g, c);
-
        mutex_lock(&c->jobs_lock);
        list_for_each_entry_safe(job, n, &c->jobs, list) {
                struct gk20a *g = c->g;
@@ -1708,6 +1703,8 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
                                          flags,
                                          fence ? fence->id : 0,
                                          fence ? fence->value : 0);
+       check_gp_put(g, c);
+       update_gp_get(g, c);
 
        gk20a_dbg_info("pre-submit put %d, get %d, size %d",
                c->gpfifo.put, c->gpfifo.get, c->gpfifo.entry_num);