drm: give up the modeset on failure

Instead of being stuck when modesetting is not possible, rollback
the changes and give up.
This commit is contained in:
Simon Ser 2021-07-28 18:11:20 +02:00
parent 3ffd29c23a
commit 802f01d16f

View file

@ -667,6 +667,8 @@ int drm_commit(struct drm_t *drm, struct Composite_t *pComposite, struct VulkanP
exit( 1 );
}
drm->pending = drm->current;
for ( size_t i = 0; i < drm->crtcs.size(); i++ )
{
drm->crtcs[i].pending = drm->crtcs[i].current;
@ -1055,6 +1057,8 @@ int drm_prepare( struct drm_t *drm, const struct Composite_t *pComposite, const
drm->fbids_in_req.clear();
drm->pending = drm->current;
for ( size_t i = 0; i < drm->crtcs.size(); i++ )
{
drm->crtcs[i].pending = drm->crtcs[i].current;