Merge "hwc: Fix swap interval zero"

This commit is contained in:
Linux Build Service Account
2014-10-17 03:14:19 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -1465,7 +1465,7 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
rotData.acq_fen_fd_cnt = 1; //1 ioctl call per rot session
}
int ret = 0;
if(not ctx->mLayerRotMap[dpy]->isRotCached(i))
if(LIKELY(!swapzero) and (not ctx->mLayerRotMap[dpy]->isRotCached(i)))
ret = ioctl(rotFd, MSMFB_BUFFER_SYNC, &rotData);
if(ret < 0) {
@@ -1487,6 +1487,7 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
//Accumulate acquireFenceFds for MDP Overlays
if(list->outbufAcquireFenceFd >= 0) {
//Writeback output buffer
if(LIKELY(!swapzero) )
acquireFd[count++] = list->outbufAcquireFenceFd;
}
@@ -1494,12 +1495,11 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
if(((isAbcInUse(ctx)== true ) ||
(list->hwLayers[i].compositionType == HWC_OVERLAY)) &&
list->hwLayers[i].acquireFenceFd >= 0) {
if(UNLIKELY(swapzero))
acquireFd[count++] = -1;
if(LIKELY(!swapzero) ) {
// if ABC is enabled for more than one layer.
// renderBufIndexforABC will work as FB.Hence
// set the acquireFD from fd - which is coming from copybit
else if(fd >= 0 && (isAbcInUse(ctx) == true)) {
if(fd >= 0 && (isAbcInUse(ctx) == true)) {
if(ctx->listStats[dpy].renderBufIndexforABC ==(int32_t)i)
acquireFd[count++] = fd;
else
@@ -1507,10 +1507,10 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
} else
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
}
}
if(list->hwLayers[i].compositionType == HWC_FRAMEBUFFER_TARGET) {
if(UNLIKELY(swapzero))
acquireFd[count++] = -1;
else if(fd >= 0) {
if(LIKELY(!swapzero) ) {
if(fd >= 0) {
//set the acquireFD from fd - which is coming from c2d
acquireFd[count++] = fd;
// Buffer sync IOCTL should be async when using c2d fence is
@@ -1520,9 +1520,11 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
}
}
}
if ((fd >= 0) && !dpy && ctx->mPtorInfo.isActive()) {
// Acquire c2d fence of Overlap render buffer
if(LIKELY(!swapzero) )
acquireFd[count++] = fd;
}