diff options
author | Santosh Katvate <skatvate@nvidia.com> | 2014-05-15 15:39:51 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:25 -0400 |
commit | 3899f3b997b2d770e6689cde938a359f28172c27 (patch) | |
tree | 206e989193d939a4b389c9d4ebd59c9c02b4b0a6 | |
parent | 8144bf64163f23844bae958fbe4d7df3ccc7c66a (diff) |
gpu: nvgpu: Turn off scaling when not powered
This far the scaling has been disabled only when we suspend the
system and therefore we unnecessarily keep gpu workers running even
if the gpu itself would be railgated. This is not proper behaviour
and it causes a race in suspend sequence.
This patch reorders scaling disable to happen always when we turn off
the GPU.
Bug 200004860
Change-Id: Ief0bfd89378d5a7ced26c3ef29094dd5c378b01a
Signed-off-by: Santosh Katvate <skatvate@nvidia.com>
Reviewed-on: http://git-master/r/410443
(cherry picked from commit bcae65bea24be2a1e0abe42522d99ba70c94cbe2)
Reviewed-on: http://git-master/r/413249
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index db018cb2..19880da4 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -747,6 +747,8 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
747 | 747 | ||
748 | gk20a_dbg_fn(""); | 748 | gk20a_dbg_fn(""); |
749 | 749 | ||
750 | gk20a_scale_suspend(to_platform_device(dev)); | ||
751 | |||
750 | if (!g->power_on) | 752 | if (!g->power_on) |
751 | return 0; | 753 | return 0; |
752 | 754 | ||
@@ -1205,8 +1207,6 @@ static int gk20a_pm_suspend(struct device *dev) | |||
1205 | if (atomic_read(&dev->power.usage_count) > 1) | 1207 | if (atomic_read(&dev->power.usage_count) > 1) |
1206 | return -EBUSY; | 1208 | return -EBUSY; |
1207 | 1209 | ||
1208 | gk20a_scale_suspend(to_platform_device(dev)); | ||
1209 | |||
1210 | ret = gk20a_pm_prepare_poweroff(dev); | 1210 | ret = gk20a_pm_prepare_poweroff(dev); |
1211 | if (ret) | 1211 | if (ret) |
1212 | return ret; | 1212 | return ret; |