aboutsummaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2015-09-26 14:02:46 +0100
committerTom Marshall <tdm@cyngn.com>2015-11-25 15:35:48 -0800
commit5e381e93bf8cdcfec41582cde2283a0cb4f58fd1 (patch)
treebdef2345259878f218377037c5ab67daee754e9a /minui
parent9db5957d1345883388b91e4d7c4f2aabbe794e2a (diff)
downloadbootable_recovery-5e381e93bf8cdcfec41582cde2283a0cb4f58fd1.zip
bootable_recovery-5e381e93bf8cdcfec41582cde2283a0cb4f58fd1.tar.gz
bootable_recovery-5e381e93bf8cdcfec41582cde2283a0cb4f58fd1.tar.bz2
minui: support to pan display (FBIOPAN_DISPLAY)
Needed for newer hisilicon boards Change-Id: I9a5d640b1168de518885b89f63499c6f31958b75
Diffstat (limited to 'minui')
-rw-r--r--minui/Android.mk4
-rw-r--r--minui/graphics_fbdev.cpp6
2 files changed, 10 insertions, 0 deletions
diff --git a/minui/Android.mk b/minui/Android.mk
index 3057f45..dd64cc6 100644
--- a/minui/Android.mk
+++ b/minui/Android.mk
@@ -37,6 +37,10 @@ else
LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
endif
+ifneq ($(BOARD_RECOVERY_NEEDS_FBIOPAN_DISPLAY),)
+ LOCAL_CFLAGS += -DBOARD_RECOVERY_NEEDS_FBIOPAN_DISPLAY
+endif
+
include $(BUILD_STATIC_LIBRARY)
# Used by OEMs for factory test images.
diff --git a/minui/graphics_fbdev.cpp b/minui/graphics_fbdev.cpp
index 997e9ca..c94b581 100644
--- a/minui/graphics_fbdev.cpp
+++ b/minui/graphics_fbdev.cpp
@@ -73,9 +73,15 @@ static void set_displayed_framebuffer(unsigned n)
vi.yres_virtual = gr_framebuffer[0].height * 2;
vi.yoffset = n * gr_framebuffer[0].height;
vi.bits_per_pixel = gr_framebuffer[0].pixel_bytes * 8;
+
if (ioctl(fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
perror("active fb swap failed");
}
+#ifdef BOARD_RECOVERY_NEEDS_FBIOPAN_DISPLAY
+ if (ioctl(fb_fd, FBIOPAN_DISPLAY, &vi) < 0) {
+ perror("pan failed");
+ }
+#endif
displayed_buffer = n;
}