From bc563de0bf6be6e6d23e0bc2e4831cd7e4014556 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Wed, 9 Apr 2014 11:47:27 -0700 Subject: 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 Reviewed-on: http://git-master/r/394296 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 853b6a3c..7e2b9afb 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -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); -- cgit v1.2.2