summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorAllen Yu <alleny@nvidia.com>2014-06-09 05:37:22 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:07 -0400
commit4d278fdfd70082da3c020a15ba0dd722f9da1b3b (patch)
tree5a854982e9761ff2f8586862b80b5f39632ef0f0 /drivers/gpu/nvgpu/gk20a/gk20a.c
parent131bcbcea9da30247dc84bbdc653a7f2a0d482ad (diff)
gpu: nvgpu: Turn on scaling when powered
This patch reorders scaling resume to happen always when we power on the GPU, so as to balance the scaling suspend when we power off GPU. bug 200010911 Change-Id: I9fde817fbf9fed7d90c48ea06050db4b82e670a8 Signed-off-by: Allen Yu <alleny@nvidia.com> Reviewed-on: http://git-master/r/421541 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index e303dcd6..f9b28156 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -748,7 +748,7 @@ static int gk20a_pm_prepare_poweroff(struct device *dev)
748 748
749 gk20a_dbg_fn(""); 749 gk20a_dbg_fn("");
750 750
751 gk20a_scale_suspend(to_platform_device(dev)); 751 gk20a_scale_suspend(pdev);
752 752
753 if (!g->power_on) 753 if (!g->power_on)
754 return 0; 754 return 0;
@@ -917,6 +917,8 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
917 gk20a_channel_resume(g); 917 gk20a_channel_resume(g);
918 set_user_nice(current, nice_value); 918 set_user_nice(current, nice_value);
919 919
920 gk20a_scale_resume(pdev);
921
920 trace_gk20a_finalize_poweron_done(dev_name(dev)); 922 trace_gk20a_finalize_poweron_done(dev_name(dev));
921 923
922done: 924done:
@@ -1242,15 +1244,7 @@ static int gk20a_pm_suspend(struct device *dev)
1242 1244
1243static int gk20a_pm_resume(struct device *dev) 1245static int gk20a_pm_resume(struct device *dev)
1244{ 1246{
1245 int ret = 0; 1247 return gk20a_pm_finalize_poweron(dev);
1246
1247 ret = gk20a_pm_finalize_poweron(dev);
1248 if (ret)
1249 return ret;
1250
1251 gk20a_scale_resume(to_platform_device(dev));
1252
1253 return 0;
1254} 1248}
1255 1249
1256static int gk20a_pm_initialise_domain(struct platform_device *pdev) 1250static int gk20a_pm_initialise_domain(struct platform_device *pdev)