gpu: nvgpu: gk20a: disable devfreq before gk20a

Ensure devfreq is disabled before shutting down gk20a, to prevent
possible races with reading of gpu load, and the shutdown of gpu itself.

Bug 1492913

Change-Id: I016fdba9515120fc6cf3e771f60c61b9bf2027cb
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/394296
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Prashant Malani
2014-04-09 11:47:27 -07:00
committed by Dan Willemsen
parent b210a775cf
commit bc563de0bf

View File

@@ -1227,12 +1227,12 @@ static int gk20a_pm_suspend(struct device *dev)
if (atomic_read(&dev->power.usage_count) > 1)
return -EBUSY;
gk20a_scale_suspend(to_platform_device(dev));
ret = gk20a_pm_prepare_poweroff(dev);
if (ret)
return ret;
gk20a_scale_suspend(to_platform_device(dev));
if (platform->suspend)
platform->suspend(dev);