summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-03-29 13:14:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-03 17:03:59 -0400
commit7aa2f44e8b53dcd29ccb58a32f299819fca83bf6 (patch)
tree6d630f51f1c7e09ef28ae71b7690640b825bfcef /drivers/gpu/nvgpu/gk20a/gk20a.c
parenta94b4bcde9b88e856d4b6f2bcb9e0e23942a69cc (diff)
gpu: nvgpu: fix vgpu shutdown code
On unbind we need to check that interrupts are complete before tearing down the interrupt threads, but on vgpu those structures are not initialized as they are managed by the server. This change makes sure we do not try to free those resources on vgpu shutdown Bug 200293510 JIRA: EASS-1753 Change-Id: I77cb8594e1ad2c53f632e18b0dfc88f784a815e4 Signed-off-by: David Nieto <dmartineznie@nvidia.com> (cherry-picked from commit 1a640fa6a3b41c3de7d63e14ee6770679e2c82af) Reviewed-on: http://git-master/r/1330766 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 1c75123f..6d80f3ba 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1126,6 +1126,9 @@ void gk20a_driver_start_unload(struct gk20a *g)
1126 g->driver_is_dying = 1; 1126 g->driver_is_dying = 1;
1127 up_write(&g->busy_lock); 1127 up_write(&g->busy_lock);
1128 1128
1129 if (gk20a_gpu_is_virtual(g->dev))
1130 return;
1131
1129 gk20a_wait_for_idle(g->dev); 1132 gk20a_wait_for_idle(g->dev);
1130 1133
1131 nvgpu_wait_for_deferred_interrupts(g); 1134 nvgpu_wait_for_deferred_interrupts(g);