mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
backend/drm: retry drm commit when async commit fails
Asynchronous commits can fail due to property changes, but only if they change in value. However, since the commit failed, the compositor will continue to retry, failing each time. Fall back to synchronous commit on async error, which should kickstart the properties changes. Typically, this is cursor plane FB_ID changes whenever the compositor or game changes the cursor image, and without this fallback, it will continue to queue the FB_ID change, breaking commits until async is disabled, such as by task switching away from the async hinted app. The existing kernel- side no-op check will not work if the initial property change never goes through. This breaks the cycle. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
e34cc23549
commit
1447e00abb
1 changed files with 6 additions and 0 deletions
|
|
@ -914,6 +914,12 @@ static bool drm_connector_commit_state(struct wlr_drm_connector *conn,
|
|||
|
||||
ok = drm_commit(drm, &pending_dev, flags, test_only);
|
||||
|
||||
if (!ok && flags & DRM_MODE_PAGE_FLIP_ASYNC) {
|
||||
// try again if some props change caused a failure here
|
||||
flags &= ~DRM_MODE_PAGE_FLIP_ASYNC;
|
||||
ok = drm_commit(drm, &pending_dev, flags, test_only);
|
||||
}
|
||||
|
||||
out:
|
||||
drm_connector_state_finish(&pending);
|
||||
return ok;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue