]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
two-step: Do not rotate bgrt background image for upside-down panels
authorHans de Goede <hdegoede@redhat.com>
Mon, 3 Dec 2018 15:20:59 +0000 (16:20 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 3 Dec 2018 15:50:18 +0000 (16:50 +0100)
Upside-down LCD panels are fixed up in HW by the GOP, so the bgrt image is
not rotated in this case and we should not rotate it to compensate.

While at it also fixup the wrong indentation of the
ply_pixel_buffer_set_device_scale() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/plugins/splash/two-step/plugin.c

index 641eb70369888fc71a382ea780d83ef2a13ad913..16b8fc87bfbc4c13af33d2f0c9bd5bfccc47fdce 100644 (file)
@@ -312,8 +312,12 @@ view_set_bgrt_background (view_t *view)
         if (ply_renderer_get_panel_properties (ply_pixel_display_get_renderer (view->display),
                                                &panel_width, &panel_height,
                                                &panel_rotation, &panel_scale)) {
-               ply_pixel_buffer_set_device_rotation (bgrt_buffer, panel_rotation);
-               ply_pixel_buffer_set_device_scale (bgrt_buffer, panel_scale);
+                /* Upside-down panels are fixed up in HW by the GOP, so the
+                 * bgrt image is not rotated in this case.
+                 */
+                if (panel_rotation != PLY_PIXEL_BUFFER_ROTATE_UPSIDE_DOWN)
+                        ply_pixel_buffer_set_device_rotation (bgrt_buffer, panel_rotation);
+                ply_pixel_buffer_set_device_scale (bgrt_buffer, panel_scale);
         }
 
         width = ply_pixel_buffer_get_width (bgrt_buffer);