Merge "hwc: hwc_sync - populate correct fences for BLIT"

This commit is contained in:
Linux Build Service Account
2014-02-09 19:08:31 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1250,15 +1250,14 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
}
}
//Accumulate acquireFenceFds for MDP
//Accumulate acquireFenceFds for MDP Overlays
if(list->outbufAcquireFenceFd >= 0) {
//Writeback output buffer
acquireFd[count++] = list->outbufAcquireFenceFd;
}
for(uint32_t i = 0; i < list->numHwLayers; i++) {
if((list->hwLayers[i].compositionType == HWC_OVERLAY ||
list->hwLayers[i].compositionType == HWC_BLIT) &&
if(list->hwLayers[i].compositionType == HWC_OVERLAY &&
list->hwLayers[i].acquireFenceFd >= 0) {
if(UNLIKELY(swapzero))
acquireFd[count++] = -1;
@@ -1314,10 +1313,16 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
!(layerProp[i].mFlags & HWC_VPUCOMP)) {
//If rotator has not already populated this field
// & if it's a not VPU layer
if(list->hwLayers[i].compositionType == HWC_BLIT) {
//For Blit, the app layers should be released when the Blit is
//complete. This fd was passed from copybit->draw
list->hwLayers[i].releaseFenceFd = dup(fd);
} else {
list->hwLayers[i].releaseFenceFd = dup(releaseFd);
}
}
}
}
if(fd >= 0) {
close(fd);