display: Add support for dynamic refresh rate
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo
Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
diff --git a/libqdutils/mdp_version.cpp b/libqdutils/mdp_version.cpp
index 575a97c..b0a8d7d 100644
--- a/libqdutils/mdp_version.cpp
+++ b/libqdutils/mdp_version.cpp
@@ -226,6 +226,19 @@
mPanelInfo.mNeedsROIMerge = atoi(tokens[1]);
ALOGI("Needs ROI Merge: %d", mPanelInfo.mNeedsROIMerge);
}
+ if(!strncmp(tokens[0], "dyn_fps_en", strlen("dyn_fps_en"))) {
+ mPanelInfo.mDynFpsSupported = atoi(tokens[1]);
+ ALOGI("Dynamic Fps: %s", mPanelInfo.mDynFpsSupported ?
+ "Enabled" : "Disabled");
+ }
+ if(!strncmp(tokens[0], "min_fps", strlen("min_fps"))) {
+ mPanelInfo.mMinFps = atoi(tokens[1]);
+ ALOGI("Min Panel fps: %d", mPanelInfo.mMinFps);
+ }
+ if(!strncmp(tokens[0], "max_fps", strlen("max_fps"))) {
+ mPanelInfo.mMaxFps = atoi(tokens[1]);
+ ALOGI("Max Panel fps: %d", mPanelInfo.mMaxFps);
+ }
}
}
if((property_get("persist.hwc.pubypass", property, 0) > 0) &&