hwc: split display: Fix left split default value if not published
If the left split is not published by the driver then the default should
be even split. This was missing from the configuration in utils. This is
already taken care of in framebuffer configuration and mdp composition.
Change-Id: I3db44481fd791809146752ddff56420dcbe89fb4
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 462cc6d..69e81db 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -980,13 +980,8 @@
int mixer) {
int pipesNeeded = 0;
const int xres = ctx->dpyAttr[mDpy].xres;
- //Default even split for all displays with high res
- int lSplit = xres / 2;
- if(mDpy == HWC_DISPLAY_PRIMARY &&
- qdutils::MDPVersion::getInstance().getLeftSplit()) {
- //Override if split published by driver for primary
- lSplit = qdutils::MDPVersion::getInstance().getLeftSplit();
- }
+
+ const int lSplit = getLeftSplit(ctx, mDpy);
for(int i = 0; i < mCurrentFrame.layerCount; ++i) {
if(!mCurrentFrame.isFBComposed[i]) {
@@ -1028,13 +1023,7 @@
MdpPipeInfoHighRes& pipe_info,
ePipeType type) {
const int xres = ctx->dpyAttr[mDpy].xres;
- //Default even split for all displays with high res
- int lSplit = xres / 2;
- if(mDpy == HWC_DISPLAY_PRIMARY &&
- qdutils::MDPVersion::getInstance().getLeftSplit()) {
- //Override if split published by driver for primary
- lSplit = qdutils::MDPVersion::getInstance().getLeftSplit();
- }
+ const int lSplit = getLeftSplit(ctx, mDpy);
hwc_rect_t dst = layer->displayFrame;
pipe_info.lIndex = ovutils::OV_INVALID;