wlroots/backend
Simon Ser cc8bc0db20 backend/drm: stop restoring CRTCs on exit
This is the cause of the spurious "drmHandleEvent failed" messages
at exit. restore_drm_outputs calls handle_drm_event in a loop without
checking whether the FD is readable, so drmHandleEvent ends up with a
short read (0 bytes) and returns an error.

The loop's goal is to wait for all queued page-flip events to complete,
to allow drmModeSetCrtc calls to succeed without EBUSY. The
drmModeSetCrtc calls are supposed to restore whatever KMS state we were
started with. But it's not clear from my PoV that restoring the KMS
state on exit is desirable.

KMS clients are supposed to save and restore the (full) KMS state on VT
switch, but not on exit. Leaving our KMS state on exit avoids unnecessary
modesets and allows flicker-free transitions between clients. See [1]
for more details, and note that with Pekka we've concluded that a new
flag to reset some KMS props to their default value on compositor
start-up is the best way forward. As a side note, Weston doesn't restore
the CRTC by does disable the cursor plane on exit (see
drm_output_deinit_planes, I still think disabling the cursor plane
shouldn't be necessary on exit).

Additionally, restore_drm_outputs only a subset of the KMS state.
Gamma and other atomic properties aren't accounted for. If the previous
KMS client had some outputs disabled, restore_drm_outputs would restore
a garbage mode.

[1]: https://blog.ffwll.ch/2016/01/vt-switching-with-atomic-modeset.html
2021-07-20 15:33:26 +02:00
..
drm backend/drm: stop restoring CRTCs on exit 2021-07-20 15:33:26 +02:00
headless backend/headless: remove wlr_output_impl.export_dmabuf 2021-07-12 13:29:03 -04:00
libinput Fix invalid uses of wl_array_for_each 2021-07-08 10:08:47 -04:00
multi backend: introduce wlr_backend_finish 2021-05-21 22:13:54 +02:00
noop backend: add output state allow-lists 2021-06-20 23:17:08 +02:00
session backend/session: use DRM_PRIMARY_MINOR_NAME 2021-06-17 00:28:04 +02:00
wayland backend/wayland: properly cleanup wlr_wl_pointer 2021-07-13 09:20:25 -04:00
x11 backend/x11: send touch frame events 2021-07-08 09:12:17 +02:00
backend.c backend: automatically create allocator 2021-05-21 22:13:54 +02:00
meson.build Drop RDP backend 2020-01-10 19:38:39 +01:00