From 6fc27766ed2bc24f7fc50c9a346e89f1479e60b3 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 31 Aug 2021 09:53:07 +0530 Subject: [PATCH] gpu: nvgpu: fix issues due to a previous patch 608decf gpu: nvgpu: add support for powering off gpu The above commit accidentally removed nvgpu_quiesce from nvgpu_pci_remove path. Add that back. Bug 3365659 Change-Id: I287972c426738a950ace2907610e02b774ab1eff Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2586240 Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Lakshmanan M Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/os/linux/pci.c b/drivers/gpu/nvgpu/os/linux/pci.c index 857aa819f..18f4d1191 100644 --- a/drivers/gpu/nvgpu/os/linux/pci.c +++ b/drivers/gpu/nvgpu/os/linux/pci.c @@ -762,6 +762,10 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) nvgpu_thermal_deinit(g); } + err = nvgpu_quiesce(g); + /* TODO: handle failure to idle */ + WARN(err, "gpu failed to idle during driver removal"); + nvgpu_free_irq(g); nvgpu_remove(dev);