Merge "h/q/d: Add binder-api support to change refresh-rate."

This commit is contained in:
Linux Build Service Account
2014-12-04 11:22:27 -08:00
committed by Gerrit - the friendly Code Review server
7 changed files with 98 additions and 6 deletions

View File

@@ -406,6 +406,12 @@ void initContext(hwc_context_t *ctx)
ctx->mWindowboxFeature = true;
}
ctx->mUseMetaDataRefreshRate = true;
if(property_get("persist.metadata_dynfps.disable", value, "false")
&& !strcmp(value, "true")) {
ctx->mUseMetaDataRefreshRate = false;
}
memset(&(ctx->mPtorInfo), 0, sizeof(ctx->mPtorInfo));
ALOGI("Initializing Qualcomm Hardware Composer");
ALOGI("MDP version: %d", ctx->mMDP.version);
@@ -465,7 +471,7 @@ void closeContext(hwc_context_t *ctx)
}
//Helper to roundoff the refreshrates
static uint32_t roundOff(uint32_t refreshRate) {
uint32_t roundOff(uint32_t refreshRate) {
int count = (int) (sizeof(stdRefreshRates)/sizeof(stdRefreshRates[0]));
uint32_t rate = refreshRate;
for(int i=0; i< count; i++) {
@@ -1057,7 +1063,7 @@ void setListStats(hwc_context_t *ctx,
ctx->listStats[dpy].preMultipliedAlpha = true;
#ifdef DYNAMIC_FPS
if (dpy == HWC_DISPLAY_PRIMARY && mdpHw.isDynFpsSupported()) {
if (!dpy && mdpHw.isDynFpsSupported() && ctx->mUseMetaDataRefreshRate){
//dyn fps: get refreshrate from metadata
//Support multiple refresh rates if they are same
//else set to default