summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_fb.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-05-17 14:53:11 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-17 15:01:54 -0500
commit2c58d77ba909c9c14dc2d5d19180c67af4accbf3 (patch)
tree719a111993e6aaeb7ea06e70382d706ee37e762a /src/lib/ecore_drm2/ecore_drm2_fb.c
parenta9de4a72166d331e23c5ec7df9b14b020b727381 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 71ea60df18..3c00a98bd5 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)
570 else 570 else
571 ret = _fb_flip(output); 571 ret = _fb_flip(output);
572 572
573 if (ret)
574 {
575 _release_buffer(output, &output->prep);
576 return ret;
577 }
573 output->pending.fb = output->prep.fb; 578 output->pending.fb = output->prep.fb;
574 output->prep.fb = NULL; 579 output->prep.fb = NULL;
575#ifdef HAVE_ATOMIC_DRM 580#ifdef HAVE_ATOMIC_DRM
576 output->pending.atomic_req = output->prep.atomic_req; 581 output->pending.atomic_req = output->prep.atomic_req;
577 output->prep.atomic_req = NULL; 582 output->prep.atomic_req = NULL;
578#endif 583#endif
579 return ret; 584 return 0;
580} 585}
581 586
582EAPI Eina_Bool 587EAPI Eina_Bool