Bring back option to flip screen for overlay devices
The driver already has the capability to do so.
It needs only to be flagged, if required.
Change-Id: I1d81b00a7499e493d1dbba0a440b45fc1202f7c1
diff --git a/minuitwrp/graphics_overlay.cpp b/minuitwrp/graphics_overlay.cpp
index c59fe90..5d759f6 100644
--- a/minuitwrp/graphics_overlay.cpp
+++ b/minuitwrp/graphics_overlay.cpp
@@ -315,6 +315,9 @@
overlayL.dst_rect.w = gr_fb.width;
overlayL.dst_rect.h = gr_fb.height;
overlayL.alpha = 0xFF;
+#ifdef BOARD_HAS_FLIPPED_SCREEN
+ overlayL.flags = MDP_ROT_180;
+#endif
overlayL.transp_mask = MDP_TRANSP_NOP;
overlayL.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayL);
@@ -352,6 +355,9 @@
overlayL.dst_rect.w = lWidth;
overlayL.dst_rect.h = height;
overlayL.alpha = 0xFF;
+#ifdef BOARD_HAS_FLIPPED_SCREEN
+ overlayL.flags = MDP_ROT_180;
+#endif
overlayL.transp_mask = MDP_TRANSP_NOP;
overlayL.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayL);
@@ -379,7 +385,11 @@
overlayR.dst_rect.w = rWidth;
overlayR.dst_rect.h = height;
overlayR.alpha = 0xFF;
+#ifdef BOARD_HAS_FLIPPED_SCREEN
+ overlayR.flags = MDSS_MDP_RIGHT_MIXER | MDP_ROT_180;
+#else
overlayR.flags = MDSS_MDP_RIGHT_MIXER;
+#endif
overlayR.transp_mask = MDP_TRANSP_NOP;
overlayR.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayR);