summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/module.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c
index a59ac1f1..e3667947 100644
--- a/drivers/gpu/nvgpu/os/linux/module.c
+++ b/drivers/gpu/nvgpu/os/linux/module.c
@@ -1060,6 +1060,13 @@ static int gk20a_pm_init(struct device *dev)
1060 return err; 1060 return err;
1061} 1061}
1062 1062
1063static int gk20a_pm_deinit(struct device *dev)
1064{
1065 pm_runtime_dont_use_autosuspend(dev);
1066 pm_runtime_disable(dev);
1067 return 0;
1068}
1069
1063/* 1070/*
1064 * Start the process for unloading the driver. Set NVGPU_DRIVER_IS_DYING. 1071 * Start the process for unloading the driver. Set NVGPU_DRIVER_IS_DYING.
1065 */ 1072 */
@@ -1309,9 +1316,6 @@ int nvgpu_remove(struct device *dev, struct class *class)
1309 platform->secure_buffer.destroy(g, 1316 platform->secure_buffer.destroy(g,
1310 &platform->secure_buffer); 1317 &platform->secure_buffer);
1311 1318
1312 if (pm_runtime_enabled(dev))
1313 pm_runtime_disable(dev);
1314
1315 if (platform->remove) 1319 if (platform->remove)
1316 platform->remove(dev); 1320 platform->remove(dev);
1317 1321
@@ -1332,8 +1336,11 @@ static int __exit gk20a_remove(struct platform_device *pdev)
1332 err = nvgpu_remove(dev, &nvgpu_class); 1336 err = nvgpu_remove(dev, &nvgpu_class);
1333 1337
1334 set_gk20a(pdev, NULL); 1338 set_gk20a(pdev, NULL);
1339
1335 gk20a_put(g); 1340 gk20a_put(g);
1336 1341
1342 gk20a_pm_deinit(dev);
1343
1337 return err; 1344 return err;
1338} 1345}
1339 1346