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
This commit is contained in:
Derek Foreman 2017-05-17 14:53:11 -05:00
parent a9de4a7216
commit 2c58d77ba9
1 changed files with 6 additions and 1 deletions

View File

@ -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