From 3e3d83aff1688cb4e5560799de3deb68bd3617c4 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Fri, 15 May 2015 17:03:18 +0530 Subject: gpu: nvgpu: enable gp10b rail calls to bpmp Bug 200086985 Change-Id: I9eaa135b96629636a6b949ae1e3874dd3abd5138 Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/794723 Reviewed-on: http://git-master/r/743217 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b') diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index efecb1e3..44b27fe7 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c @@ -63,17 +63,28 @@ static int gp10b_tegra_late_probe(struct platform_device *pdev) static bool gp10b_tegra_is_railgated(struct platform_device *pdev) { - return false; + bool ret = false; + + if (!tegra_platform_is_linsim()) + ret = !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU); + + return ret; } static int gp10b_tegra_railgate(struct platform_device *pdev) { + if (!tegra_platform_is_linsim() && + tegra_powergate_is_powered(TEGRA_POWERGATE_GPU)) + tegra_powergate_partition(TEGRA_POWERGATE_GPU); return 0; } static int gp10b_tegra_unrailgate(struct platform_device *pdev) { - return 0; + int ret = 0; + if (!tegra_platform_is_linsim()) + ret = tegra_unpowergate_partition(TEGRA_POWERGATE_GPU); + return ret; } static int gp10b_tegra_suspend(struct device *dev) @@ -85,6 +96,11 @@ struct gk20a_platform t18x_gpu_tegra_platform = { .has_syncpoints = true, /* power management configuration */ + .railgate_delay = 500, + .clockgate_delay = 50, + + /* power management configuration */ + .can_railgate = false, .enable_elpg = false, .probe = gp10b_tegra_probe, -- cgit v1.2.2