summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Katragadda <dkatraga@codeaurora.org>2016-01-27 17:01:20 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:19:39 -0700
commitfd2f6e135ad1d45641be047bca942e0e2672153b (patch)
tree5d9af68dd5733b4f6aea4a0021ed9a0cb447f9b9
parent20c5a70a258c5b8e0db5d964fb2915a180a88b25 (diff)
clk: msm: clock: Keep the graphics clock peripheral memory always on
Due to an issue with the RBBM perf counter being corrupted after NAP state, force turn on the gfx3d_clk peripheral memory at probe and leave it enabled. CRs-Fixed: 933216 Change-Id: I707b44c56e5e6d3ec9056dded9fe488163be276c Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
-rw-r--r--arch/arm/boot/dts/qcom/msm-gdsc-cobalt.dtsi3
-rw-r--r--drivers/clk/msm/clock-gpu-cobalt.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/boot/dts/qcom/msm-gdsc-cobalt.dtsi b/arch/arm/boot/dts/qcom/msm-gdsc-cobalt.dtsi
index 6dcb2d0d54a8..f735febed364 100644
--- a/arch/arm/boot/dts/qcom/msm-gdsc-cobalt.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-gdsc-cobalt.dtsi
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -142,6 +142,7 @@
<0x5065130 0x4>,
<0x5066090 0x4>;
reg-names = "base", "domain_addr", "sw_reset";
+ qcom,retain-periph;
status = "disabled";
};
};
diff --git a/drivers/clk/msm/clock-gpu-cobalt.c b/drivers/clk/msm/clock-gpu-cobalt.c
index c1bf686474db..f28f6cbaef26 100644
--- a/drivers/clk/msm/clock-gpu-cobalt.c
+++ b/drivers/clk/msm/clock-gpu-cobalt.c
@@ -510,6 +510,12 @@ int msm_gpucc_cobalt_probe(struct platform_device *pdev)
udelay(1);
clk_disable_unprepare(&gpucc_gfx3d_clk.c);
+ /*
+ * Force periph logic to be ON since after NAP, the value of the perf
+ * counter might be corrupted frequently.
+ */
+ clk_set_flags(&gpucc_gfx3d_clk.c, CLKFLAG_RETAIN_PERIPH);
+
dev_info(&pdev->dev, "Registered GPU clocks\n");
return 0;
}