From 56458a477c8dd15a11d20259dc01b6ac10bbead2 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 5 Jul 2018 15:08:57 -0400 Subject: [PATCH] ply-image: Adds hack for framebuffer flipping... This is more specifically for msm devices. Let's hope it won't cause issues down the line, otherwise we'll have to make it configurable. --- overlay/ply-image/99_msm-fb.diff | 22 ++++++++++++++++++++++ overlay/ply-image/default.nix | 1 + 2 files changed, 23 insertions(+) create mode 100644 overlay/ply-image/99_msm-fb.diff diff --git a/overlay/ply-image/99_msm-fb.diff b/overlay/ply-image/99_msm-fb.diff new file mode 100644 index 00000000..0a7e11c1 --- /dev/null +++ b/overlay/ply-image/99_msm-fb.diff @@ -0,0 +1,22 @@ +diff --git a/src/ply-frame-buffer.c b/src/ply-frame-buffer.c +index 1160c85..5904331 100644 +--- a/src/ply-frame-buffer.c ++++ b/src/ply-frame-buffer.c +@@ -596,6 +596,9 @@ bool ply_frame_buffer_fill(ply_frame_buffer_t *buffer, + } + } + ++ struct fb_var_screeninfo variable_screen_info; ++ ioctl(buffer->device_fd, FBIOPAN_DISPLAY, &variable_screen_info); ++ + return true; + } + +@@ -659,4 +662,7 @@ void ply_frame_buffer_clear(ply_frame_buffer_t *buffer, + default: + assert(0); + } ++ ++ struct fb_var_screeninfo variable_screen_info; ++ ioctl(buffer->device_fd, FBIOPAN_DISPLAY, &variable_screen_info); + } diff --git a/overlay/ply-image/default.nix b/overlay/ply-image/default.nix index 132a1116..45e3bbee 100644 --- a/overlay/ply-image/default.nix +++ b/overlay/ply-image/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation { patches = [ ./99_additional_debug.diff + ./99_msm-fb.diff ]; nativeBuildInputs = [