diff options
author | Arto Merilainen <amerilainen@nvidia.com> | 2014-08-06 02:30:11 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:45 -0400 |
commit | b33020008b727d75827d670ca7a6c969769ca1a0 (patch) | |
tree | 387fd7b91d0bad4e287d939e75babba2b3abdb80 /drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |
parent | 273f754cb518c8133c1c19d23d58fab533b1cf0a (diff) |
gpu: nvgpu: Add sw shadow for load value
Reading the load value may increase CPU power consumption
temprorarily. In most cases we are ok with a value that
was read a moment earlier.
This patch introduces a software shadow for gpu load. The shadow
is updated before starting scaling and all scaling code paths use
the sw shadow.
Change-Id: I53d2ccb8e7f83147f411a14d3104d890dd9af9a3
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/453347
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index 8a92828f..d09a18f8 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |||
@@ -192,6 +192,9 @@ static void gk20a_scale_notify(struct platform_device *pdev, bool busy) | |||
192 | struct gk20a_scale_profile *profile = g->scale_profile; | 192 | struct gk20a_scale_profile *profile = g->scale_profile; |
193 | struct devfreq *devfreq = g->devfreq; | 193 | struct devfreq *devfreq = g->devfreq; |
194 | 194 | ||
195 | /* update the software shadow */ | ||
196 | gk20a_pmu_load_update(g); | ||
197 | |||
195 | /* inform edp about new constraint */ | 198 | /* inform edp about new constraint */ |
196 | if (platform->prescale) | 199 | if (platform->prescale) |
197 | platform->prescale(pdev); | 200 | platform->prescale(pdev); |