ecore_drm2: Move test for atomic_req into atomic flip path

We ended up doing an occasional atomic ioctl when we shouldn't.
This should be a harmless failure, but it's also a pointless one.
This commit is contained in:
Derek Foreman 2017-05-09 10:33:05 -05:00
parent 8067b0146a
commit 544cffaa19
1 changed files with 5 additions and 5 deletions

View File

@ -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);