mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/drm: move primary FB check after pending buffer logic
If a connector has no current/queued buffer, but has a pending buffer in the commit, we need to process that pending buffer before checking pending.primary_fb.
This commit is contained in:
parent
0e839ab1c2
commit
db2b1892ad
1 changed files with 6 additions and 6 deletions
|
@ -682,12 +682,6 @@ static bool drm_connector_test(struct wlr_output *output,
|
||||||
struct wlr_drm_connector_state pending = {0};
|
struct wlr_drm_connector_state pending = {0};
|
||||||
drm_connector_state_init(&pending, conn, state);
|
drm_connector_state_init(&pending, conn, state);
|
||||||
|
|
||||||
if (pending.active && !pending.primary_fb) {
|
|
||||||
wlr_drm_conn_log(conn, WLR_DEBUG,
|
|
||||||
"No primary frame buffer available for this connector");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
|
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
|
||||||
state->adaptive_sync_enabled &&
|
state->adaptive_sync_enabled &&
|
||||||
!drm_connector_supports_vrr(conn)) {
|
!drm_connector_supports_vrr(conn)) {
|
||||||
|
@ -724,6 +718,12 @@ static bool drm_connector_test(struct wlr_output *output,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pending.active && !pending.primary_fb) {
|
||||||
|
wlr_drm_conn_log(conn, WLR_DEBUG,
|
||||||
|
"No primary frame buffer available for this connector");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ok = drm_crtc_commit(conn, &pending, 0, true);
|
ok = drm_crtc_commit(conn, &pending, 0, true);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in a new issue