From 7509bc53cac937e002a840ac28f6813cc5c97550 Mon Sep 17 00:00:00 2001 From: xadro Date: Sat, 30 Jan 2016 21:30:12 +0100 Subject: 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 --- minuitwrp/graphics_overlay.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/minuitwrp/graphics_overlay.cpp b/minuitwrp/graphics_overlay.cpp index c59fe907c..5d759f6d4 100644 --- a/minuitwrp/graphics_overlay.cpp +++ b/minuitwrp/graphics_overlay.cpp @@ -315,6 +315,9 @@ int allocate_overlay(int fd, GRSurface gr_fb) 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 @@ int allocate_overlay(int fd, GRSurface gr_fb) 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 @@ int allocate_overlay(int fd, GRSurface gr_fb) 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); -- cgit v1.2.3