summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2014-05-20 05:47:20 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:09:24 -0400
commit270a962c540522bceddbbc41a055b52a65dec489 (patch)
treec36df2108262f665a76e2ab27872efcd225ba6b7 /drivers/gpu/nvgpu
parent9cbddec84d375eabf392a10fade0718bf5f0ea60 (diff)
gpu: nvgpu: Disable pm runtime on shutdown
In some cases the gpu has still work pending while the device is being suspended. This patch forces pm runtime to be disabled for the device to avoid powering up the gpu unnecessarily. Bug 1515437 Change-Id: I4b57d72eb34e794f0457d7a074d26c9d096a13b3 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/411968 Reviewed-by: Riham Haidar <rhaidar@nvidia.com> Tested-by: Riham Haidar <rhaidar@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 2e406474..db018cb2 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1158,6 +1158,12 @@ static int gk20a_pm_disable_clk(struct device *dev)
1158 return 0; 1158 return 0;
1159} 1159}
1160 1160
1161static void gk20a_pm_shutdown(struct platform_device *pdev)
1162{
1163 dev_info(&pdev->dev, "shutting down");
1164 __pm_runtime_disable(&pdev->dev, false);
1165}
1166
1161#ifdef CONFIG_PM 1167#ifdef CONFIG_PM
1162const struct dev_pm_ops gk20a_pm_ops = { 1168const struct dev_pm_ops gk20a_pm_ops = {
1163#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS) 1169#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS)
@@ -1476,6 +1482,7 @@ static int __exit gk20a_remove(struct platform_device *dev)
1476static struct platform_driver gk20a_driver = { 1482static struct platform_driver gk20a_driver = {
1477 .probe = gk20a_probe, 1483 .probe = gk20a_probe,
1478 .remove = __exit_p(gk20a_remove), 1484 .remove = __exit_p(gk20a_remove),
1485 .shutdown = gk20a_pm_shutdown,
1479 .driver = { 1486 .driver = {
1480 .owner = THIS_MODULE, 1487 .owner = THIS_MODULE,
1481 .name = "gk20a", 1488 .name = "gk20a",