From 544cffaa19fca975970e773b209c40c40d1208d6 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 9 May 2017 10:33:05 -0500 Subject: [PATCH] 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. --- src/lib/ecore_drm2/ecore_drm2_fb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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);