diff options
Diffstat (limited to 'drivers/gpu/nvgpu/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 114e9af7..a7899f7e 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c | |||
@@ -393,6 +393,11 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, | |||
393 | } | 393 | } |
394 | disable_irq(g->irq_stall); | 394 | disable_irq(g->irq_stall); |
395 | 395 | ||
396 | /* | ||
397 | * is_fmodel needs to be in gk20a struct for deferred teardown | ||
398 | */ | ||
399 | g->is_fmodel = platform->is_fmodel; | ||
400 | |||
396 | err = nvgpu_pci_init_support(pdev); | 401 | err = nvgpu_pci_init_support(pdev); |
397 | if (err) | 402 | if (err) |
398 | return err; | 403 | return err; |
@@ -426,7 +431,6 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
426 | struct gk20a *g = get_gk20a(&pdev->dev); | 431 | struct gk20a *g = get_gk20a(&pdev->dev); |
427 | 432 | ||
428 | gk20a_dbg(gpu_dbg_shutdown, "Removing nvgpu driver!\n"); | 433 | gk20a_dbg(gpu_dbg_shutdown, "Removing nvgpu driver!\n"); |
429 | gk20a_driver_start_unload(g); | ||
430 | 434 | ||
431 | if (g->irqs_enabled) | 435 | if (g->irqs_enabled) |
432 | disable_irq(g->irq_stall); | 436 | disable_irq(g->irq_stall); |
@@ -445,7 +449,7 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
445 | * Wait for the driver to finish up all the IOCTLs it's working on | 449 | * Wait for the driver to finish up all the IOCTLs it's working on |
446 | * before cleaning up the driver's data structures. | 450 | * before cleaning up the driver's data structures. |
447 | */ | 451 | */ |
448 | gk20a_wait_for_idle(&pdev->dev); | 452 | gk20a_driver_start_unload(g); |
449 | gk20a_dbg(gpu_dbg_shutdown, "Driver idle.\n"); | 453 | gk20a_dbg(gpu_dbg_shutdown, "Driver idle.\n"); |
450 | 454 | ||
451 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 455 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
@@ -455,9 +459,6 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
455 | gk20a_user_deinit(g->dev, &nvgpu_pci_class); | 459 | gk20a_user_deinit(g->dev, &nvgpu_pci_class); |
456 | gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); | 460 | gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); |
457 | 461 | ||
458 | if (g->remove_support) | ||
459 | g->remove_support(g->dev); | ||
460 | |||
461 | debugfs_remove_recursive(platform->debugfs); | 462 | debugfs_remove_recursive(platform->debugfs); |
462 | debugfs_remove_recursive(platform->debugfs_alias); | 463 | debugfs_remove_recursive(platform->debugfs_alias); |
463 | 464 | ||