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:
@@ -105,7 +105,10 @@ static void hwc_registerProcs(struct hwc_composer_device_1* dev,
|
||||
//Helper
|
||||
static void reset(hwc_context_t *ctx, int numDisplays,
|
||||
hwc_display_contents_1_t** displays) {
|
||||
|
||||
ctx->numActiveDisplays = 0;
|
||||
ctx->isPaddingRound = false;
|
||||
|
||||
for(int i = 0; i < numDisplays; i++) {
|
||||
hwc_display_contents_1_t *list = displays[i];
|
||||
// XXX:SurfaceFlinger no longer guarantees that this
|
||||
@@ -125,6 +128,17 @@ static void reset(hwc_context_t *ctx, int numDisplays,
|
||||
* the display device to be active.
|
||||
*/
|
||||
ctx->numActiveDisplays += 1;
|
||||
|
||||
if((ctx->mPrevHwLayerCount[i] == 1) and (list->numHwLayers > 1)) {
|
||||
/* If the previous cycle for dpy 'i' has 0 AppLayers and the
|
||||
* current cycle has atleast 1 AppLayer, padding round needs
|
||||
* to be invoked on current cycle to free up the resources.
|
||||
*/
|
||||
ctx->isPaddingRound = true;
|
||||
}
|
||||
ctx->mPrevHwLayerCount[i] = list->numHwLayers;
|
||||
} else {
|
||||
ctx->mPrevHwLayerCount[i] = 0;
|
||||
}
|
||||
|
||||
if(ctx->mFBUpdate[i])
|
||||
@@ -133,7 +147,6 @@ static void reset(hwc_context_t *ctx, int numDisplays,
|
||||
ctx->mCopyBit[i]->reset();
|
||||
if(ctx->mLayerRotMap[i])
|
||||
ctx->mLayerRotMap[i]->reset();
|
||||
|
||||
}
|
||||
|
||||
ctx->mAD->reset();
|
||||
|
||||
Reference in New Issue
Block a user