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>
This commit is contained in:
David Nieto
2017-03-29 10:14:16 -07:00
committed by mobile promotions
parent a94b4bcde9
commit 7aa2f44e8b

View File

@@ -1126,6 +1126,9 @@ void gk20a_driver_start_unload(struct gk20a *g)
g->driver_is_dying = 1;
up_write(&g->busy_lock);
if (gk20a_gpu_is_virtual(g->dev))
return;
gk20a_wait_for_idle(g->dev);
nvgpu_wait_for_deferred_interrupts(g);