diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 5de93f8ff7..1b2c4d95a3 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -374,6 +374,11 @@ _fb_atomic_flip(Ecore_Drm2_Output *output) DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET; + /* If we have no req yet, we're flipping to current state. + * rebuild the current state in the prep state */ + if (!output->prep.atomic_req) _fb_atomic_flip_test(output); + + /* Still no req is a bad situation */ EINA_SAFETY_ON_NULL_RETURN_VAL(output->prep.atomic_req, -1); res = @@ -518,11 +523,6 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) if (!fb) return -1; output->prep.fb = fb; -#ifdef HAVE_ATOMIC_DRM - /* If we have no req yet, we're flipping to current state. - * rebuild the current state in the prep state */ - if (!output->prep.atomic_req) _fb_atomic_flip_test(output); -#endif if (_ecore_drm2_use_atomic) ret = _fb_atomic_flip(output);