ecore_drm2: Fix atomic flip with no new buffer

We don't have an atomic state, so we need to create one before the flip
This commit is contained in:
Derek Foreman 2017-04-28 15:15:59 -05:00
parent 9223b0d535
commit 6b9a6a8bed
1 changed files with 5 additions and 0 deletions

View File

@ -505,6 +505,11 @@ 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);