From 469308becaff326da02fcf791e803e812e1cf9f8 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Mon, 13 Feb 2017 11:22:59 -0800 Subject: gpu: nvgpu: fix arbiter teardown on PCI The driver is not properly tearing down the arbiter on the PCI driver unload. This change makes sure that the workqueues are drained before tearing down the driver bug 200277762 JIRA: EVLR-1023 Change-Id: If98fd00e27949ba1569dd26e2af02b75897231a7 Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1320147 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/pci.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu/pci.c') diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 69e16267..7ef626c2 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c @@ -460,6 +460,10 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) gk20a_wait_for_idle(&pdev->dev); gk20a_dbg(gpu_dbg_shutdown, "Driver idle.\n"); +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + nvgpu_clk_arb_cleanup_arbiter(g); +#endif + gk20a_user_deinit(g->dev, &nvgpu_pci_class); gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); -- cgit v1.2.2