wlroots-hyprland/include
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
..
backend backend/drm: stop restoring CRTCs on exit 2021-07-20 15:33:26 +02:00
render render/gles2: rename wlr_egl.exts to better match Khronos 2021-07-12 09:13:49 -04:00
types buffer: re-use wlr_shm_client_buffer 2021-07-19 13:13:10 -04:00
util util/array: add array_remove_at 2021-07-01 10:35:39 -04:00
wlr input/pointer: send axis source once per frame 2021-07-19 12:00:31 +02:00
xcursor xcursor: make cursor data and metadata const 2021-02-05 10:04:20 +01:00
xwayland xwm: implement _NET_CLIENT_LIST_STACKING 2021-05-31 10:41:29 +02:00
meson.build render: make GLES2 renderer optional 2021-04-17 16:39:40 +02:00