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 17:31:13 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-17 17:31:13 -0500
commit12260dabb9db574be460e12e8e9c343de576f413 (patch)
treec5ab12d08820ab1cca13057f4c12ac4aea0c3707 /src/lib/ecore_drm2/ecore_drm2_fb.c
parent2c58d77ba909c9c14dc2d5d19180c67af4accbf3 (diff)
ecore_drm2: Better handle flip failure round 2
If the buffer being flipped to is the one already on screen then releasing it on flip failure will leave it on scanout with no references. The next time a buffer is queued it will be removed from scanout and deleted. Not good. Fix T5462
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 3c00a98bd5..f2c54e3057 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -572,7 +572,8 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
572 572
573 if (ret) 573 if (ret)
574 { 574 {
575 _release_buffer(output, &output->prep); 575 if (output->prep.fb != output->current.fb)
576 _release_buffer(output, &output->prep);
576 return ret; 577 return ret;
577 } 578 }
578 output->pending.fb = output->prep.fb; 579 output->pending.fb = output->prep.fb;