Merge "hwc: Fix swap interval zero"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
e319ffb89b
@@ -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
|
rotData.acq_fen_fd_cnt = 1; //1 ioctl call per rot session
|
||||||
}
|
}
|
||||||
int ret = 0;
|
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);
|
ret = ioctl(rotFd, MSMFB_BUFFER_SYNC, &rotData);
|
||||||
|
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
@@ -1487,43 +1487,45 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
|
|||||||
//Accumulate acquireFenceFds for MDP Overlays
|
//Accumulate acquireFenceFds for MDP Overlays
|
||||||
if(list->outbufAcquireFenceFd >= 0) {
|
if(list->outbufAcquireFenceFd >= 0) {
|
||||||
//Writeback output buffer
|
//Writeback output buffer
|
||||||
acquireFd[count++] = list->outbufAcquireFenceFd;
|
if(LIKELY(!swapzero) )
|
||||||
|
acquireFd[count++] = list->outbufAcquireFenceFd;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint32_t i = 0; i < list->numHwLayers; i++) {
|
for(uint32_t i = 0; i < list->numHwLayers; i++) {
|
||||||
if(((isAbcInUse(ctx)== true ) ||
|
if(((isAbcInUse(ctx)== true ) ||
|
||||||
(list->hwLayers[i].compositionType == HWC_OVERLAY)) &&
|
(list->hwLayers[i].compositionType == HWC_OVERLAY)) &&
|
||||||
list->hwLayers[i].acquireFenceFd >= 0) {
|
list->hwLayers[i].acquireFenceFd >= 0) {
|
||||||
if(UNLIKELY(swapzero))
|
if(LIKELY(!swapzero) ) {
|
||||||
acquireFd[count++] = -1;
|
// if ABC is enabled for more than one layer.
|
||||||
// if ABC is enabled for more than one layer.
|
// renderBufIndexforABC will work as FB.Hence
|
||||||
// renderBufIndexforABC will work as FB.Hence
|
// set the acquireFD from fd - which is coming from copybit
|
||||||
// set the acquireFD from fd - which is coming from copybit
|
if(fd >= 0 && (isAbcInUse(ctx) == true)) {
|
||||||
else if(fd >= 0 && (isAbcInUse(ctx) == true)) {
|
if(ctx->listStats[dpy].renderBufIndexforABC ==(int32_t)i)
|
||||||
if(ctx->listStats[dpy].renderBufIndexforABC ==(int32_t)i)
|
acquireFd[count++] = fd;
|
||||||
acquireFd[count++] = fd;
|
else
|
||||||
else
|
continue;
|
||||||
continue;
|
} else
|
||||||
} else
|
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
|
||||||
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
|
}
|
||||||
}
|
}
|
||||||
if(list->hwLayers[i].compositionType == HWC_FRAMEBUFFER_TARGET) {
|
if(list->hwLayers[i].compositionType == HWC_FRAMEBUFFER_TARGET) {
|
||||||
if(UNLIKELY(swapzero))
|
if(LIKELY(!swapzero) ) {
|
||||||
acquireFd[count++] = -1;
|
if(fd >= 0) {
|
||||||
else if(fd >= 0) {
|
//set the acquireFD from fd - which is coming from c2d
|
||||||
//set the acquireFD from fd - which is coming from c2d
|
acquireFd[count++] = fd;
|
||||||
acquireFd[count++] = fd;
|
// Buffer sync IOCTL should be async when using c2d fence is
|
||||||
// Buffer sync IOCTL should be async when using c2d fence is
|
// used
|
||||||
// used
|
data.flags &= ~MDP_BUF_SYNC_FLAG_WAIT;
|
||||||
data.flags &= ~MDP_BUF_SYNC_FLAG_WAIT;
|
} else if(list->hwLayers[i].acquireFenceFd >= 0)
|
||||||
} else if(list->hwLayers[i].acquireFenceFd >= 0)
|
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
|
||||||
acquireFd[count++] = list->hwLayers[i].acquireFenceFd;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fd >= 0) && !dpy && ctx->mPtorInfo.isActive()) {
|
if ((fd >= 0) && !dpy && ctx->mPtorInfo.isActive()) {
|
||||||
// Acquire c2d fence of Overlap render buffer
|
// Acquire c2d fence of Overlap render buffer
|
||||||
acquireFd[count++] = fd;
|
if(LIKELY(!swapzero) )
|
||||||
|
acquireFd[count++] = fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.acq_fen_fd_cnt = count;
|
data.acq_fen_fd_cnt = count;
|
||||||
|
|||||||
Reference in New Issue
Block a user