diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6ef8a6cf..5b259672 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1865,6 +1865,7 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work) | |||
1865 | struct channel_gk20a_job *job; | 1865 | struct channel_gk20a_job *job; |
1866 | struct gk20a_platform *platform; | 1866 | struct gk20a_platform *platform; |
1867 | struct gk20a *g; | 1867 | struct gk20a *g; |
1868 | int job_finished = 0; | ||
1868 | 1869 | ||
1869 | c = gk20a_channel_get(c); | 1870 | c = gk20a_channel_get(c); |
1870 | if (!c) | 1871 | if (!c) |
@@ -1934,11 +1935,11 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work) | |||
1934 | mutex_unlock(&c->jobs_lock); | 1935 | mutex_unlock(&c->jobs_lock); |
1935 | 1936 | ||
1936 | kfree(job); | 1937 | kfree(job); |
1937 | 1938 | job_finished = 1; | |
1938 | gk20a_idle(g->dev); | 1939 | gk20a_idle(g->dev); |
1939 | } | 1940 | } |
1940 | 1941 | ||
1941 | if (c->update_fn) | 1942 | if (job_finished && c->update_fn) |
1942 | schedule_work(&c->update_fn_work); | 1943 | schedule_work(&c->update_fn_work); |
1943 | 1944 | ||
1944 | gk20a_channel_put(c); | 1945 | gk20a_channel_put(c); |