mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: flush update notifiers on suspend
If any gk20a update callback work is pending, wait for them to finish before going to suspend. Bug 200052943 Change-Id: Ib469db6e29d13ae26aaca5fceb1ccd20f18bfc3c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/601034 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
59339b4fd9
commit
cbc336a984
@@ -2093,13 +2093,18 @@ int gk20a_channel_suspend(struct gk20a *g)
|
||||
return err;
|
||||
|
||||
for (chid = 0; chid < f->num_channels; chid++) {
|
||||
if (f->channel[chid].in_use) {
|
||||
struct channel_gk20a *ch = &f->channel[chid];
|
||||
if (ch->in_use) {
|
||||
|
||||
gk20a_dbg_info("suspend channel %d", chid);
|
||||
/* disable channel */
|
||||
g->ops.fifo.disable_channel(&f->channel[chid]);
|
||||
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);
|
||||
|
||||
channels_in_use = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user