summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-11-11 04:23:56 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:13 -0400
commitcbc336a98433b40a417dd86dcbc5d58eaa8cc105 (patch)
tree752b037e5568c7d832aabe377aa9bcfca289995d /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent59339b4fd9b0e5573a68207b9acc2561cb0174ed (diff)
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 7f179d14..0d9eb318 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -2093,13 +2093,18 @@ int gk20a_channel_suspend(struct gk20a *g)
2093 return err; 2093 return err;
2094 2094
2095 for (chid = 0; chid < f->num_channels; chid++) { 2095 for (chid = 0; chid < f->num_channels; chid++) {
2096 if (f->channel[chid].in_use) { 2096 struct channel_gk20a *ch = &f->channel[chid];
2097 if (ch->in_use) {
2097 2098
2098 gk20a_dbg_info("suspend channel %d", chid); 2099 gk20a_dbg_info("suspend channel %d", chid);
2099 /* disable channel */ 2100 /* disable channel */
2100 g->ops.fifo.disable_channel(&f->channel[chid]); 2101 g->ops.fifo.disable_channel(ch);
2101 /* preempt the channel */ 2102 /* preempt the channel */
2102 g->ops.fifo.preempt_channel(g, chid); 2103 g->ops.fifo.preempt_channel(g, chid);
2104 /* wait for channel update notifiers */
2105 if (ch->update_fn &&
2106 work_pending(&ch->update_fn_work))
2107 flush_work(&ch->update_fn_work);
2103 2108
2104 channels_in_use = true; 2109 channels_in_use = true;
2105 } 2110 }