diff options
| author | srdusr <[email protected]> | 2025-04-02 23:40:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-04-02 23:40:00 +0200 |
| commit | 4d61d76b1b73f56fc14ed977806e4d4ad313fd51 (patch) | |
| tree | b6fd51ef7287deb99ddfb907cac35cb48c61750a /legacy-cpp/src/input/input_handler.h | |
| parent | 0d3c7ab727b321a36ffea66c461221b14bbc48d8 (diff) | |
| download | srdwm-4d61d76b1b73f56fc14ed977806e4d4ad313fd51.tar.gz srdwm-4d61d76b1b73f56fc14ed977806e4d4ad313fd51.zip | |
Wire VT-switch pause/activate for the GPU render path
Phase 2 (0274273) deliberately shipped without VT-switch support for
the GPU-driven head, documented as an explicit gap rather than a
silent risk. Before testing it live, wire the real fix instead of
finding out empirically - this already burned three real
reboots getting the *legacy* VT-switch path right, and DrmOutputManager
uses a genuinely different API surface (pause()/activate(), calling
through to DrmDevice's own master-lock acquire/release) than the
manual set_crtc+DPMS reassertion register_session_notifier already
does for legacy heads.
PauseSession now also calls DrmOutputManager::pause() when SRDWM_GPU=1
and a GPU context exists - a separate device/fd from the legacy Card,
so purely additive. ActivateSession calls DrmOutputManager::activate
(false), then deliberately does *not* also force a fresh render for
that head specifically: DrmCompositor::render_frame always issues a
full state commit (atomic or legacy, whichever this device negotiated
- see DrmDevice::is_atomic()), not just a buffer swap, so the
existing data.render_udev_frame() call at the end of this handler
already reasserts mode-set and CRTC-active state together for the GPU
head via render.rs's own GPU branch, the same way it always does.
Also fixed a real conflict Phase 2 introduced: the existing legacy
crtc-reassert loop (explicit set_crtc through the legacy Card/fd) used
to run for every head unconditionally, including one now driven by the
GPU path through a completely different DrmDeviceFd - two separate
fds issuing mode-set commands against the same physical CRTC, exactly
the kind of conflict that produced the worst VT-switch
incidents (EBUSY loops) when it was really one fd racing itself. The
GPU-owned crtc (if any) is now excluded from that loop.
Diffstat (limited to 'legacy-cpp/src/input/input_handler.h')
0 files changed, 0 insertions, 0 deletions