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/1330770
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
This commit is contained in:
David Nieto
2017-03-29 10:14:16 -07:00
committed by mobile promotions
parent 7809c16221
commit 9eef737acf

View File

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