drm: gate the libdrmtap ABI on the minor, and skip the warm probe on X11

Two items from the review that I had recorded as done and were not.

The ABI check had a floor and no ceiling, so 0.5.0 and 0.9.9 passed. Under
0.x semver the minor is the breaking axis, and libdrmtap freezes only
drmtap_device and drmtap_dmabuf_desc: drmtap_frame_info, drmtap_display,
drmtap_config and drmtap_cursor_info are not frozen. A 0.5.0 adding one
field to drmtap_frame_info still reports major 0, so we would have loaded it
and read every field at the wrong offset, in the root service. It now
requires the verified minor; a 0.5.x needs a deliberate bump after comparing
the layouts.

The unit test asserted the opposite of this, in as many words ("0.5.0 must
pass"), so it was holding the hazard in place. Replaced.

warm_availability ran on X11 too, where every consumer of the verdict sits
behind an !is_x11() check, so the root service opened DRM readers for a path
the session can never use.
This commit is contained in:
Mariano Abad
2026-07-29 19:34:02 -03:00
parent 392e7a88dd
commit a35ed16508
2 changed files with 47 additions and 10 deletions

View File

@@ -603,8 +603,12 @@ pub async fn start_server(is_server: bool, no_server: bool) {
});
// Warm the DRM availability cache before any client connects, so the first connection does
// not race a cold `_drm` probe and ship an empty display list ("No displays" + retry).
// Skipped on X11: every consumer of the verdict is behind an `!is_x11()` check, so probing
// there makes the root service open DRM readers for a path this session can never use.
#[cfg(all(target_os = "linux", feature = "drm"))]
std::thread::spawn(drm_capturer::warm_availability);
if !scrap::is_x11() {
std::thread::spawn(drm_capturer::warm_availability);
}
input_service::fix_key_down_timeout_loop();
#[cfg(target_os = "linux")]
if input_service::wayland_use_uinput() {