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:
parent
a9de4a7216
commit
2c58d77ba9
|
@ -570,13 +570,18 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
|
||||||
else
|
else
|
||||||
ret = _fb_flip(output);
|
ret = _fb_flip(output);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
{
|
||||||
|
_release_buffer(output, &output->prep);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
output->pending.fb = output->prep.fb;
|
output->pending.fb = output->prep.fb;
|
||||||
output->prep.fb = NULL;
|
output->prep.fb = NULL;
|
||||||
#ifdef HAVE_ATOMIC_DRM
|
#ifdef HAVE_ATOMIC_DRM
|
||||||
output->pending.atomic_req = output->prep.atomic_req;
|
output->pending.atomic_req = output->prep.atomic_req;
|
||||||
output->prep.atomic_req = NULL;
|
output->prep.atomic_req = NULL;
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue