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
This commit is contained in:
Derek Foreman 2017-05-17 17:31:13 -05:00
parent 2c58d77ba9
commit 12260dabb9
1 changed files with 2 additions and 1 deletions

View File

@ -572,7 +572,8 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
if (ret)
{
_release_buffer(output, &output->prep);
if (output->prep.fb != output->current.fb)
_release_buffer(output, &output->prep);
return ret;
}
output->pending.fb = output->prep.fb;