diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-04-05 10:32:22 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-03 12:02:13 -0400 |
commit | 71beac3de01997d20f3adb2ce38a4e6f7a9cff65 (patch) | |
tree | 45b9977b4711e4e9dbcb786938ad562ca574050f /drivers/gpu/nvgpu | |
parent | 0dd7ffbf2367fa892a0730a8264077e79fd1b18c (diff) |
gpu: nvgpu: cancel clean up before update_fn_work
In gk20a_channel_suspend(), we first cancel worker
thread update_fn_work and then cancel job clean up worker
But it is possible that we re-schedule update_fn_work from
job cleanup worker after it was cancelled
And in that case worker update_fn_work might run after
we poweroff GPU
Fix this by first cancelling job clean up worker and
then update_fn_work worker
Bug 200187905
Change-Id: Ia192c515702f14becf60d92c6471d8c0e892551e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1120426
(cherry picked from commit b132b6c5aa9ab88c6733f36906f1b874114ec72d)
Reviewed-on: http://git-master/r/1134888
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index d94e12a2..9e023e16 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -2778,11 +2778,10 @@ int gk20a_channel_suspend(struct gk20a *g) | |||
2778 | g->ops.fifo.disable_channel(ch); | 2778 | g->ops.fifo.disable_channel(ch); |
2779 | /* preempt the channel */ | 2779 | /* preempt the channel */ |
2780 | g->ops.fifo.preempt_channel(g, chid); | 2780 | g->ops.fifo.preempt_channel(g, chid); |
2781 | /* wait for channel update notifiers */ | ||
2782 | if (ch->update_fn && | ||
2783 | work_pending(&ch->update_fn_work)) | ||
2784 | flush_work(&ch->update_fn_work); | ||
2785 | gk20a_channel_cancel_job_clean_up(ch, true); | 2781 | gk20a_channel_cancel_job_clean_up(ch, true); |
2782 | /* wait for channel update notifiers */ | ||
2783 | if (ch->update_fn) | ||
2784 | cancel_work_sync(&ch->update_fn_work); | ||
2786 | 2785 | ||
2787 | channels_in_use = true; | 2786 | channels_in_use = true; |
2788 | 2787 | ||