summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_scale.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
index 82e24535..65772d3b 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
@@ -190,18 +190,10 @@ void gk20a_scale_resume(struct platform_device *pdev)
190 190
191static void gk20a_scale_notify(struct platform_device *pdev, bool busy) 191static void gk20a_scale_notify(struct platform_device *pdev, bool busy)
192{ 192{
193 struct gk20a_platform *platform = platform_get_drvdata(pdev);
194 struct gk20a *g = get_gk20a(pdev); 193 struct gk20a *g = get_gk20a(pdev);
195 struct gk20a_scale_profile *profile = g->scale_profile; 194 struct gk20a_scale_profile *profile = g->scale_profile;
196 struct devfreq *devfreq = g->devfreq; 195 struct devfreq *devfreq = g->devfreq;
197 196
198 /* update the software shadow */
199 gk20a_pmu_load_update(g);
200
201 /* inform edp about new constraint */
202 if (platform->prescale)
203 platform->prescale(pdev);
204
205 /* Is the device profile initialised? */ 197 /* Is the device profile initialised? */
206 if (!(profile && devfreq)) 198 if (!(profile && devfreq))
207 return; 199 return;
@@ -237,6 +229,13 @@ static int gk20a_scale_get_dev_status(struct device *dev,
237 struct platform_device *pdev = to_platform_device(dev); 229 struct platform_device *pdev = to_platform_device(dev);
238 struct gk20a_platform *platform = platform_get_drvdata(pdev); 230 struct gk20a_platform *platform = platform_get_drvdata(pdev);
239 231
232 /* update the software shadow */
233 gk20a_pmu_load_update(g);
234
235 /* inform edp about new constraint */
236 if (platform->prescale)
237 platform->prescale(pdev);
238
240 /* Make sure there are correct values for the current frequency */ 239 /* Make sure there are correct values for the current frequency */
241 profile->dev_stat.current_frequency = 240 profile->dev_stat.current_frequency =
242 platform->clk_get_rate(profile->pdev); 241 platform->clk_get_rate(profile->pdev);