diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-05-27 10:20:09 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:58 -0400 |
commit | 2ad53bb4ca3877694853ac517c351ed1a9825772 (patch) | |
tree | e24a1d98864cafa43266d76b817fd4ca353a11fa /drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | |
parent | cd9f8553ad1e6e03e8a3a70cb8d08edd3513fb66 (diff) |
gpu: nvgpu: add is_railgated() callback
Add is_railgated() platform callback to check status
of gk20a power rail
Bug 1376916
Bug 1487804
Change-Id: Ia0d909210dc409ab684eb6f20528b81500aecd5c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 3a739cb6..813053e0 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | |||
@@ -305,6 +305,17 @@ void gk20a_tegra_calibrate_emc(struct gk20a_emc_params *emc_params, | |||
305 | } | 305 | } |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * gk20a_tegra_is_railgated() | ||
309 | * | ||
310 | * Check status of gk20a power rail | ||
311 | */ | ||
312 | |||
313 | static bool gk20a_tegra_is_railgated(struct platform_device *pdev) | ||
314 | { | ||
315 | return !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU); | ||
316 | } | ||
317 | |||
318 | /* | ||
308 | * gk20a_tegra_railgate() | 319 | * gk20a_tegra_railgate() |
309 | * | 320 | * |
310 | * Gate (disable) gk20a power rail | 321 | * Gate (disable) gk20a power rail |
@@ -504,6 +515,7 @@ struct gk20a_platform t132_gk20a_tegra_platform = { | |||
504 | .suspend = gk20a_tegra_suspend, | 515 | .suspend = gk20a_tegra_suspend, |
505 | .railgate = gk20a_tegra_railgate, | 516 | .railgate = gk20a_tegra_railgate, |
506 | .unrailgate = gk20a_tegra_unrailgate, | 517 | .unrailgate = gk20a_tegra_unrailgate, |
518 | .is_railgated = gk20a_tegra_is_railgated, | ||
507 | 519 | ||
508 | /* frequency scaling configuration */ | 520 | /* frequency scaling configuration */ |
509 | .prescale = gk20a_tegra_prescale, | 521 | .prescale = gk20a_tegra_prescale, |
@@ -530,6 +542,7 @@ struct gk20a_platform gk20a_tegra_platform = { | |||
530 | .suspend = gk20a_tegra_suspend, | 542 | .suspend = gk20a_tegra_suspend, |
531 | .railgate = gk20a_tegra_railgate, | 543 | .railgate = gk20a_tegra_railgate, |
532 | .unrailgate = gk20a_tegra_unrailgate, | 544 | .unrailgate = gk20a_tegra_unrailgate, |
545 | .is_railgated = gk20a_tegra_is_railgated, | ||
533 | 546 | ||
534 | /* frequency scaling configuration */ | 547 | /* frequency scaling configuration */ |
535 | .prescale = gk20a_tegra_prescale, | 548 | .prescale = gk20a_tegra_prescale, |