From bc10e7e47af667c1afa7499e01070a595b006ef6 Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Thu, 18 Sep 2014 11:38:08 +0300 Subject: gpu: nvgpu: gm20b: Require rework for DVFS and rg Boards require a rework to make railgating and DVFS work realiably. The information whether the board has been reworked or not will be available on DTS. This patch adds a DTS check to the GPU driver initialisation. If the rework information is not available (or the rework has been marked as disabled), railgating and DVFS are disabled. Bug 1555485 Change-Id: Ie86fe35fb94377403472faffcbcaec645b6e40d9 Signed-off-by: Arto Merilainen Reviewed-on: http://git-master/r/500218 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 5dd30e31..bbbbccb4 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -440,6 +440,18 @@ static int gk20a_tegra_probe(struct platform_device *dev) *platform = t132_gk20a_tegra_platform; } + /* WAR for bug 1547668: Disable railgating and scaling irrespective of + * platform data if the rework has not been made. */ + + if (tegra_get_chipid() == TEGRA_CHIPID_TEGRA21) { + np = of_find_node_by_path("/gpu-dvfs-rework"); + if (!(np && of_device_is_available(np))) { + platform->can_railgate = false; + platform->devfreq_governor = ""; + dev_warn(&dev->dev, "board does not support scaling or powergating"); + } + } + gk20a_tegra_get_clocks(dev); return 0; -- cgit v1.2.2