mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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>
This commit is contained in:
committed by
Dan Willemsen
parent
cd9f8553ad
commit
2ad53bb4ca
@@ -88,6 +88,9 @@ struct gk20a_platform {
|
|||||||
/* Called to turn on the device */
|
/* Called to turn on the device */
|
||||||
int (*unrailgate)(struct platform_device *dev);
|
int (*unrailgate)(struct platform_device *dev);
|
||||||
|
|
||||||
|
/* Called to check state of device */
|
||||||
|
bool (*is_railgated)(struct platform_device *dev);
|
||||||
|
|
||||||
/* Postscale callback is called after frequency change */
|
/* Postscale callback is called after frequency change */
|
||||||
void (*postscale)(struct platform_device *pdev,
|
void (*postscale)(struct platform_device *pdev,
|
||||||
unsigned long freq);
|
unsigned long freq);
|
||||||
|
|||||||
@@ -304,6 +304,17 @@ void gk20a_tegra_calibrate_emc(struct gk20a_emc_params *emc_params,
|
|||||||
emc_params->emc_dip_offset -= correction;
|
emc_params->emc_dip_offset -= correction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* gk20a_tegra_is_railgated()
|
||||||
|
*
|
||||||
|
* Check status of gk20a power rail
|
||||||
|
*/
|
||||||
|
|
||||||
|
static bool gk20a_tegra_is_railgated(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
return !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* gk20a_tegra_railgate()
|
* gk20a_tegra_railgate()
|
||||||
*
|
*
|
||||||
@@ -504,6 +515,7 @@ struct gk20a_platform t132_gk20a_tegra_platform = {
|
|||||||
.suspend = gk20a_tegra_suspend,
|
.suspend = gk20a_tegra_suspend,
|
||||||
.railgate = gk20a_tegra_railgate,
|
.railgate = gk20a_tegra_railgate,
|
||||||
.unrailgate = gk20a_tegra_unrailgate,
|
.unrailgate = gk20a_tegra_unrailgate,
|
||||||
|
.is_railgated = gk20a_tegra_is_railgated,
|
||||||
|
|
||||||
/* frequency scaling configuration */
|
/* frequency scaling configuration */
|
||||||
.prescale = gk20a_tegra_prescale,
|
.prescale = gk20a_tegra_prescale,
|
||||||
@@ -530,6 +542,7 @@ struct gk20a_platform gk20a_tegra_platform = {
|
|||||||
.suspend = gk20a_tegra_suspend,
|
.suspend = gk20a_tegra_suspend,
|
||||||
.railgate = gk20a_tegra_railgate,
|
.railgate = gk20a_tegra_railgate,
|
||||||
.unrailgate = gk20a_tegra_unrailgate,
|
.unrailgate = gk20a_tegra_unrailgate,
|
||||||
|
.is_railgated = gk20a_tegra_is_railgated,
|
||||||
|
|
||||||
/* frequency scaling configuration */
|
/* frequency scaling configuration */
|
||||||
.prescale = gk20a_tegra_prescale,
|
.prescale = gk20a_tegra_prescale,
|
||||||
|
|||||||
Reference in New Issue
Block a user