From: Derek Foreman Date: Wed, 17 May 2017 19:53:11 +0000 (-0500) Subject: ecore_drm2: Better handle flip failure X-Git-Tag: upstream/1.20.0~1020 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c58d77ba909c9c14dc2d5d19180c67af4accbf3;p=platform%2Fupstream%2Fefl.git ecore_drm2: Better handle flip failure We need to release the buffer we couldn't flip to when a flip fails. This makes whatever bug is causing a page flip to happen right after dpms blanks the screen, which was leading to a failure to ever wake from dpms because the flip left a pending buffer that never completed. Fix T5462 --- diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 71ea60d..3c00a98 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -570,13 +570,18 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) else ret = _fb_flip(output); + if (ret) + { + _release_buffer(output, &output->prep); + return ret; + } output->pending.fb = output->prep.fb; output->prep.fb = NULL; #ifdef HAVE_ATOMIC_DRM output->pending.atomic_req = output->prep.atomic_req; output->prep.atomic_req = NULL; #endif - return ret; + return 0; } EAPI Eina_Bool