mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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>
This commit is contained in:
committed by
Terje Bergstrom
parent
0dd7ffbf23
commit
71beac3de0
@@ -2778,11 +2778,10 @@ int gk20a_channel_suspend(struct gk20a *g)
|
||||
g->ops.fifo.disable_channel(ch);
|
||||
/* preempt the channel */
|
||||
g->ops.fifo.preempt_channel(g, chid);
|
||||
/* wait for channel update notifiers */
|
||||
if (ch->update_fn &&
|
||||
work_pending(&ch->update_fn_work))
|
||||
flush_work(&ch->update_fn_work);
|
||||
gk20a_channel_cancel_job_clean_up(ch, true);
|
||||
/* wait for channel update notifiers */
|
||||
if (ch->update_fn)
|
||||
cancel_work_sync(&ch->update_fn_work);
|
||||
|
||||
channels_in_use = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user