From 3186f3a5fd2e2659ae6084bae89ef602da8d7b6f Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 21 Jun 2016 12:59:30 -0400 Subject: [PATCH] evas-drm: Reset current buffer state when pageflip completes When an fbo pageflip finishes, we should be marking the current fbo (one just sent) as no longer busy since it's already been pixel blasted to the screen. Also, if we fail to flip to a given fbo during buffer swap, then don't leave that fbo marked as busy since it is technically not in use Signed-off-by: Chris Michael --- src/modules/evas/engines/drm/evas_outbuf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c index 4551c852a5..d43a35b207 100644 --- a/src/modules/evas/engines/drm/evas_outbuf.c +++ b/src/modules/evas/engines/drm/evas_outbuf.c @@ -80,7 +80,11 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se ob = data; ofb = ob->priv.current; - if (ofb) ofb->busy = EINA_FALSE; + if (ofb) + { + ofb->busy = EINA_FALSE; + ofb->age = 0; + } next = ecore_drm2_output_next_fb_get(ob->priv.output); if (next) @@ -121,6 +125,9 @@ _outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count) if (ecore_drm2_fb_flip(ofb->fb, ob->priv.output, ob) < 0) { _outbuf_tick_source_set(NULL); + ofb->busy = EINA_FALSE; + ofb->drawn = EINA_FALSE; + ofb->age = 0; return; }