diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index d9d86b63..49f386d8 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h | |||
@@ -88,6 +88,9 @@ struct gk20a_platform { | |||
88 | /* Called to turn on the device */ | 88 | /* Called to turn on the device */ |
89 | int (*unrailgate)(struct platform_device *dev); | 89 | int (*unrailgate)(struct platform_device *dev); |
90 | 90 | ||
91 | /* Called to check state of device */ | ||
92 | bool (*is_railgated)(struct platform_device *dev); | ||
93 | |||
91 | /* Postscale callback is called after frequency change */ | 94 | /* Postscale callback is called after frequency change */ |
92 | void (*postscale)(struct platform_device *pdev, | 95 | void (*postscale)(struct platform_device *pdev, |
93 | unsigned long freq); | 96 | unsigned long freq); |
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, |