hwc: Support single ROI for split panels.
For panels that cannot accept commands in both the interfaces, we cannot
send two ROI's (for each half). We merge them into single ROI and split
them across lSplit for MDP mixer use. The ROI's will be merged again
finally before updating the panel in the driver.
- Reads panel property of dual control path.
- If dual control path not supported, merge ROI's before
analysing for composition strategies.
Change-Id: I67e361a299dc5d1adb28b180900e24633eefc4a8
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index fab9a8b..e72d0ea 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -596,6 +596,16 @@
}
}
+ /* For panels that cannot accept commands in both the interfaces, we cannot
+ * send two ROI's (for each half). We merge them into single ROI and split
+ * them across lSplit for MDP mixer use. The ROI's will be merged again
+ * finally before udpating the panel in the driver. */
+ if(qdutils::MDPVersion::getInstance().needsROIMerge()) {
+ hwc_rect_t temp_roi = getUnion(l_roi, r_roi);
+ l_roi = getIntersection(temp_roi, l_frame);
+ r_roi = getIntersection(temp_roi, r_frame);
+ }
+
/* No layer is updating. Still SF wants a refresh. */
if(!isValidRect(l_roi) && !isValidRect(r_roi))
return;