summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-08-03 16:04:38 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-15 15:23:37 -0400
commiteee2744d497213a503de927cbbfe179753f5e370 (patch)
treefd4570dfa75578c7227e00e653113b8765789e72 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent33665060728693c28ed5222a0d9004e261c63e82 (diff)
gpu: nvgpu: When powering down, abort if not idle
When trying to power down GPU the engine might be still busy. In this case delay power down by returning -EBUSY from gk20a_pm_runtime_suspend(). Bug 200224907 Change-Id: Ibad74c090add24a185bc1a7a02df367af9b95ced Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1213042 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index b4c132ce..085caec5 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -2789,16 +2789,10 @@ int gk20a_channel_suspend(struct gk20a *g)
2789 struct fifo_gk20a *f = &g->fifo; 2789 struct fifo_gk20a *f = &g->fifo;
2790 u32 chid; 2790 u32 chid;
2791 bool channels_in_use = false; 2791 bool channels_in_use = false;
2792 int err;
2793 u32 active_runlist_ids = 0; 2792 u32 active_runlist_ids = 0;
2794 2793
2795 gk20a_dbg_fn(""); 2794 gk20a_dbg_fn("");
2796 2795
2797 /* wait for engine idle */
2798 err = g->ops.fifo.wait_engine_idle(g);
2799 if (err)
2800 return err;
2801
2802 for (chid = 0; chid < f->num_channels; chid++) { 2796 for (chid = 0; chid < f->num_channels; chid++) {
2803 struct channel_gk20a *ch = &f->channel[chid]; 2797 struct channel_gk20a *ch = &f->channel[chid];
2804 if (gk20a_channel_get(ch)) { 2798 if (gk20a_channel_get(ch)) {