From f6e000a3912fb1445aa22cfaaf3b9263a13acbd1 Mon Sep 17 00:00:00 2001 From: Anshul Jain Date: Mon, 25 Jan 2016 12:42:11 -0800 Subject: gpu: nvgpu: Add support for XPU rail split Check if CPU/GPU rails are joint, disable railgating if they are. Bug 1722942 Change-Id: I002488f6418805569b0ef0fc3032b58297adeafb Signed-off-by: Anshul Jain Reviewed-on: http://git-master/r/937026 (cherry picked from commit 61617c558a379a2a0a0f034bf0ef65cbef33d913) Reviewed-on: http://git-master/r/1122047 (cherry picked from commit 2fb891988fdec15141ae227623d5525833c78052) Reviewed-on: http://git-master/r/1123747 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 468c9257..f69e12df 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -726,6 +726,7 @@ static int gk20a_tegra_probe(struct device *dev) struct device_node *np = dev->of_node; const __be32 *host1x_ptr; struct platform_device *host1x_pdev = NULL; + bool joint_xpu_rail = false; host1x_ptr = of_get_property(np, "nvidia,host1x", NULL); if (host1x_ptr) { @@ -748,6 +749,15 @@ static int gk20a_tegra_probe(struct device *dev) if (platform->g->host1x_dev) nvhost_register_dump_device(platform->g->host1x_dev, gk20a_debug_dump_device); +#ifdef CONFIG_OF + joint_xpu_rail = of_property_read_bool(of_chosen, + "nvidia,tegra-joint_xpu_rail"); +#endif + + if (joint_xpu_rail) { + gk20a_dbg_info("XPU rails are joint\n"); + platform->can_railgate = false; + } /* WAR for bug 1547668: Disable railgating and scaling irrespective of * platform data if the rework has not been made. */ -- cgit v1.2.2