gpu: nvgpu: return from worker if gpu is not up

During GPU shutdown path, it is possible that we
shut down the GPU while worker thread is still
running gk20a_channel_update()

Hence before accessing gp_put/get, check if GPU
is up or not

Bug 200166139

Change-Id: Iba3ec173041a84527c4700a93f20564a842cfb01
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/935193
(cherry picked from commit c81ea5fe383c44e872754b363968af57d84225ac)
Reviewed-on: http://git-master/r/1121917
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Deepak Nibade
2016-04-07 18:20:50 +05:30
committed by Terje Bergstrom
parent fb7c8c756c
commit caed43e0a2

View File

@@ -1871,6 +1871,11 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work)
if (!c)
return;
if (!c->g->power_on) { /* shutdown case */
gk20a_channel_put(c);
return;
}
vm = c->vm;
g = c->g;
platform = gk20a_get_platform(g->dev);
@@ -1951,6 +1956,11 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed)
if (!c)
return;
if (!c->g->power_on) { /* shutdown case */
gk20a_channel_put(c);
return;
}
update_gp_get(c->g, c);
wake_up(&c->submit_wq);