diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 |
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 | } |