From de5305e2243f8b2cde7ab04e629422a1c0f8a6c0 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 22 Sep 2016 13:20:13 -0500 Subject: [PATCH] ecore-drm2: Merge initial modesetting with atomic flip code --- src/lib/ecore_drm2/ecore_drm2_fb.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 0127519..0ba6680 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -357,7 +357,8 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) { Ecore_Drm2_Plane_State *pstate; uint32_t flags = - DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT; + DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | + DRM_MODE_ATOMIC_ALLOW_MODSET; pstate = output->plane_state; @@ -373,26 +374,6 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) pstate->cw.value = output->current_mode->width; pstate->ch.value = output->current_mode->height; - if ((!output->current) || - (output->current->stride != fb->stride)) - { - flags = DRM_MODE_ATOMIC_ALLOW_MODESET; - - ret = _fb_atomic_flip(output, pstate, flags); - if (ret < 0) - { - ERR("\tCrtc: %d FB: %d", output->crtc_id, fb->id); - return ret; - } - - if (output->current) _release_buffer(output, output->current); - output->current = fb; - output->current->busy = EINA_TRUE; - output->next = NULL; - - return 0; - } - ret = _fb_atomic_flip(output, pstate, flags); if ((ret < 0) && (errno != EBUSY)) { -- 2.7.4