diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 36de500870..1c1c94795f 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -228,18 +228,25 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) { int ret = 0; - EINA_SAFETY_ON_NULL_RETURN_VAL(fb, -1); EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); EINA_SAFETY_ON_NULL_RETURN_VAL(output->current_mode, -1); if (!output->enabled) return -1; + if (!fb) fb = output->next; + + /* So we can generate a tick by flipping to the current fb */ + if (!fb) fb = output->current; + if (output->next) { output->next->busy = EINA_FALSE; output->next = NULL; } + /* If we don't have an fb to set by now, BAIL! */ + if (!fb) return -1; + if ((!output->current) || (output->current->stride != fb->stride)) {