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:
parent
3ffd29c23a
commit
802f01d16f
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue