From: Hans de Goede Date: Mon, 3 Dec 2018 15:20:59 +0000 (+0100) Subject: two-step: Do not rotate bgrt background image for upside-down panels X-Git-Tag: 0.9.5~83^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10fddacd1e9a45c8f7345067d61974ef249a1deb;p=thirdparty%2Fplymouth.git two-step: Do not rotate bgrt background image for upside-down panels 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 --- diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index 641eb703..16b8fc87 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -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);