Invoke a padding round in certain use-cases.

* In some use-cases, it is possible that there are
no AppBuffer layers on the external/virtual layer-list
during which all the pipes will be allocated to the
primary. When layers do comeup on external/virtual
layer-list, subsequent overlay sets fail.

* This change ensures that in such cases, we invoke a
padding round on all the displays to free up the
hw resources which can be used in subsequent cycles.

Change-Id: Ifac0b8f51a8719eb55b11010d05b8d11352db054
This commit is contained in:
Raj Kamal
2014-02-07 16:15:17 +05:30
parent 25154792a5
commit 9ed3d6b35e
4 changed files with 29 additions and 8 deletions

View File

@@ -419,8 +419,8 @@ bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
__FUNCTION__);
ret = false;
} else if(ctx->isPaddingRound) {
ctx->isPaddingRound = false;
ALOGD_IF(isDebug(), "%s: padding round",__FUNCTION__);
ALOGD_IF(isDebug(), "%s: padding round invoked for dpy %d",
__FUNCTION__,mDpy);
ret = false;
}
return ret;
@@ -1410,11 +1410,10 @@ int MDPComp::prepare(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
const int numLayers = ctx->listStats[mDpy].numAppLayers;
MDPVersion& mdpVersion = qdutils::MDPVersion::getInstance();
//number of app layers exceeds MAX_NUM_APP_LAYERS fall back to GPU
//do not cache the information for next draw cycle.
if(numLayers > MAX_NUM_APP_LAYERS) {
ALOGI("%s: Number of App layers exceeded the limit ",
__FUNCTION__);
//Do not cache the information for next draw cycle.
if(numLayers > MAX_NUM_APP_LAYERS or (!numLayers)) {
ALOGI("%s: Unsupported layer count for mdp composition",
__FUNCTION__);
mCachedFrame.reset();
return -1;
}