wlroots/backend/drm
Simon Ser 98a83ce14c backend/drm: fix EINVAL atomic commits after VT switch
The drm_connector_commit_state() call in handle_session_active()
was not resulting in any atomic commit, because it didn't match any
of the if branches: active = true, no new buffer was committed,
and adaptive sync/gamma LUT were unchanged. Thus the commit was a
no-op.

Later on, when the compositor performs regular page-flips, the
kernel would return EINVAL indicating that a modeset was needed.

Rework the logic to use a non-blocking page-flip commit if a buffer
was committed, and use a blocking commit if the connector is on or
is being disabled. The only case where we should skip the atomic
commit is when disabling (active = false) an already-disabled
connector (conn->crtc == NULL).

Note, 6936e163b5 ("backend/drm: short-circuit no-op commits")
has introduced early returns for other situations where we don't
need to perform an atomic commit (e.g. updating scale or transform
of an output).

Fixes: f216e97983 ("backend/drm: drop drm_connector_set_mode()")
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3432
2022-10-17 15:14:02 +00:00
..
atomic.c Only set max_bpc when full modesetting is being done. 2022-09-16 14:15:58 +00:00
backend.c backend/drm: fix missing wlr_output_state.allow_artifacts 2022-09-30 13:35:07 +02:00
cvt.c backend/drm: add support for custom modes 2019-10-27 10:46:47 -04:00
drm.c backend/drm: fix EINVAL atomic commits after VT switch 2022-10-17 15:14:02 +00:00
legacy.c backend/drm/legacy: Fix whitespace 2022-10-13 10:51:11 -04:00
meson.build backend/drm: add wlr_drm_backend_monitor 2021-12-13 14:55:16 +01:00
monitor.c backend/drm: add wlr_drm_backend_monitor 2021-12-13 14:55:16 +01:00
properties.c backend/drm: set "max bpc" to the max 2022-06-19 16:55:36 +00:00
renderer.c backend/drm: fix crash in init_drm_surface 2022-05-26 09:38:48 +02:00
util.c backend/drm: pass through mode picture aspect ratio 2022-09-22 09:38:27 +02:00