From 7aa2f44e8b53dcd29ccb58a32f299819fca83bf6 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Wed, 29 Mar 2017 10:14:16 -0700 Subject: 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 (cherry-picked from commit 1a640fa6a3b41c3de7d63e14ee6770679e2c82af) Reviewed-on: http://git-master/r/1330766 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu') 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) 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); -- cgit v1.2.2