From: Hans de Goede Date: Sat, 12 Oct 2019 14:31:04 +0000 (+0200) Subject: drm: Install our fb after drawing to it X-Git-Tag: 0.9.5~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea71bbfaf7b6fc07a5e3b08f8b461d38266224bb;p=thirdparty%2Fplymouth.git drm: Install our fb after drawing to it If we need to (re)install our fb as the buffer to scan-out of during flush, then do so after updating our fb contents, rather then before. This removes another potential source of flickering. Signed-off-by: Hans de Goede --- diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c index 5f25099d..0b7aad3e 100644 --- a/src/plugins/renderers/drm/plugin.c +++ b/src/plugins/renderers/drm/plugin.c @@ -1614,6 +1614,7 @@ flush_head (ply_renderer_backend_t *backend, ply_list_node_t *node; ply_pixel_buffer_t *pixel_buffer; char *map_address; + bool dirty = false; assert (backend != NULL); @@ -1645,16 +1646,19 @@ flush_head (ply_renderer_backend_t *backend, next_node = ply_list_get_next_node (areas_to_flush, node); - if (reset_scan_out_buffer_if_needed (backend, head)) - ply_trace ("Needed to reset scan out buffer on %ldx%ld renderer head", - head->area.width, head->area.height); - ply_renderer_head_flush_area (head, area_to_flush, map_address); + dirty = true; node = next_node; } - end_flush (backend, head->scan_out_buffer_id); + if (dirty) { + if (reset_scan_out_buffer_if_needed (backend, head)) + ply_trace ("Needed to reset scan out buffer on %ldx%ld renderer head", + head->area.width, head->area.height); + + end_flush (backend, head->scan_out_buffer_id); + } ply_region_clear (updated_region); }