mdss: display: Add support for dynamic FPS
Add sysfs entry for dynamic FPS update mode. Add support to
change FPS in the following scenarios:
1. Store the FPS and change the clocks only when Suspend/resume
happens. This is the default configuration.
2. Change the FPS immediately by updating the clocks. Video
mode engine is disabled and then enabled when clock rate
is updated.
CRs-Fixed: 488453
Change-Id: I1722d54d9fbfdfbd7d22e02d8776a0f60dc86141
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-mdss-8974.c b/arch/arm/mach-msm/clock-mdss-8974.c
index 3bb4c57..cf2df18 100644
--- a/arch/arm/mach-msm/clock-mdss-8974.c
+++ b/arch/arm/mach-msm/clock-mdss-8974.c
@@ -1398,7 +1398,8 @@
{
int rc = 0;
- if (vco_cached_rate != 0) {
+ if ((vco_cached_rate != 0)
+ && (vco_cached_rate == c->rate)) {
rc = vco_set_rate(c, vco_cached_rate);
if (rc) {
pr_err("%s: vco_set_rate failed. rc=%d\n",