hwc: Extend PTOR feature for two layers
- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
to acheive full MDP Composition
- This helps to acheive performance enhancement
Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index a6cb79e..275af38 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -295,6 +295,7 @@
ctx->mGPUHintInfo.mCompositionState = COMPOSITION_STATE_MDP;
ctx->mGPUHintInfo.mCurrGPUPerfMode = EGL_GPU_LEVEL_0;
#endif
+ memset(&(ctx->mPtorInfo), 0, sizeof(ctx->mPtorInfo));
ALOGI("Initializing Qualcomm Hardware Composer");
ALOGI("MDP version: %d", ctx->mMDP.version);
}
@@ -1363,7 +1364,7 @@
}
}
- if ((fd >= 0) && !dpy && ctx->mMDPComp[dpy]->isPTORActive()) {
+ if ((fd >= 0) && !dpy && ctx->mPtorInfo.isActive()) {
// Acquire c2d fence of Overlap render buffer
acquireFd[count++] = fd;
}
@@ -1429,7 +1430,7 @@
}
if (!dpy && ctx->mCopyBit[dpy]) {
- if (ctx->mMDPComp[dpy]->isPTORActive())
+ if (ctx->mPtorInfo.isActive())
ctx->mCopyBit[dpy]->setReleaseFdSync(releaseFd);
else
ctx->mCopyBit[dpy]->setReleaseFd(releaseFd);