diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2015-02-26 21:18:47 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:59:43 -0400 |
commit | 918485b5e0a7a3b8677375409b7647bcbbc63c95 (patch) | |
tree | b763ecee771d112a6257b030d1b9f0e2fdce2159 /drivers/gpu/nvgpu/gk20a | |
parent | 7290a6cbd5d03145d6f1ca4c3eacba40f6d4f93c (diff) |
gpu: nvgpu: wake-up gpu for rail gating delay setting
Currently new gpu rail gating delay is not effective
until next gpu rail gate and ungate. To make new
rail gate delay effective immediately, wakeup gpu after
setting new delay.
Change-Id: I80889687e9d3d577ea783cdf5688074c06d602cf
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/714961
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index a70ce4b2..4fea0779 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |||
@@ -228,7 +228,10 @@ static ssize_t railgate_delay_store(struct device *dev, | |||
228 | const char *buf, size_t count) | 228 | const char *buf, size_t count) |
229 | { | 229 | { |
230 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 230 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
231 | struct platform_device *ndev = to_platform_device(dev); | ||
231 | int railgate_delay = 0, ret = 0; | 232 | int railgate_delay = 0, ret = 0; |
233 | struct gk20a *g = get_gk20a(ndev); | ||
234 | int err; | ||
232 | 235 | ||
233 | if (!platform->can_railgate) { | 236 | if (!platform->can_railgate) { |
234 | dev_info(dev, "does not support power-gating\n"); | 237 | dev_info(dev, "does not support power-gating\n"); |
@@ -242,6 +245,11 @@ static ssize_t railgate_delay_store(struct device *dev, | |||
242 | pm_genpd_set_poweroff_delay(genpd, platform->railgate_delay); | 245 | pm_genpd_set_poweroff_delay(genpd, platform->railgate_delay); |
243 | } else | 246 | } else |
244 | dev_err(dev, "Invalid powergate delay\n"); | 247 | dev_err(dev, "Invalid powergate delay\n"); |
248 | /* wake-up system to make rail-gating delay effective immediately */ | ||
249 | err = gk20a_busy(g->dev); | ||
250 | if (err) | ||
251 | return err; | ||
252 | gk20a_idle(g->dev); | ||
245 | 253 | ||
246 | return count; | 254 | return count; |
247 | } | 255 | } |