diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp index adf48e77..bf592176 100644 --- a/libhwcomposer/hwc.cpp +++ b/libhwcomposer/hwc.cpp @@ -635,7 +635,11 @@ static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) { } } - int lSplit = getLeftSplit(ctx, dpy); + /* When source split is enabled, right ROI will always be NULL since the + * ROI for the whole panel generated in a single coordinate system will + * be populuated in left ROI. So leave the right ROI untouched */ + int lSplit = qdutils::MDPVersion::getInstance().isSrcSplit() ? 0 + :getLeftSplit(ctx, dpy); qhwc::ovutils::Dim lRoi = qhwc::ovutils::Dim( ctx->listStats[dpy].lRoi.left, ctx->listStats[dpy].lRoi.top, diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp index caa1344e..d50fa1d9 100644 --- a/libhwcomposer/hwc_mdpcomp.cpp +++ b/libhwcomposer/hwc_mdpcomp.cpp @@ -217,9 +217,6 @@ void MDPComp::reset(hwc_context_t *ctx) { mCurrentFrame.reset(numLayers); ctx->mOverlay->clear(mDpy); ctx->mLayerRotMap[mDpy]->clear(); - resetROI(ctx, mDpy); - memset(&mCurrentFrame.drop, 0, sizeof(mCurrentFrame.drop)); - mCurrentFrame.dropCount = 0; } void MDPComp::reset() { diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp index 9ea8246e..43d99113 100644 --- a/libhwcomposer/hwc_utils.cpp +++ b/libhwcomposer/hwc_utils.cpp @@ -2634,7 +2634,13 @@ hwc_rect expandROIFromMidPoint(hwc_rect roi, hwc_rect fullFrame) { void resetROI(hwc_context_t *ctx, const int dpy) { const int fbXRes = (int)ctx->dpyAttr[dpy].xres; const int fbYRes = (int)ctx->dpyAttr[dpy].yres; - if(isDisplaySplit(ctx, dpy)) { + + /* When source split is enabled, both the panels are calibrated + * in a single coordinate system. So only one ROI is generated + * for the whole panel extending equally from the midpoint and + * populated for the left side. */ + if(!qdutils::MDPVersion::getInstance().isSrcSplit() && + isDisplaySplit(ctx, dpy)) { const int lSplit = getLeftSplit(ctx, dpy); ctx->listStats[dpy].lRoi = (struct hwc_rect){0, 0, lSplit, fbYRes}; ctx->listStats[dpy].rRoi = (struct hwc_rect){lSplit, 0, fbXRes, fbYRes};