1
0
Fork 0
mutter-performance-source/src
Daniel van Vugt 34ee35a53a kms/impl-device: Add/remove deadline timer as required
On a hybrid machine with i915 primary and nvidia-drm (470) secondary,
`meta_render_device_egl_stream_initable_init` calls
`meta_kms_inhibit_kernel_thread` to change from the default 'kernel'
thread type to 'user'. And soon after that it would
`meta_render_device_egl_stream_finalize` because I'm not actually
using that GPU, and calls `meta_kms_uninhibit_kernel_thread`.

So during startup Mutter would default to a realtime kernel thread,
switch to a user thread (which doesn't support realtime), and then
switch back to a realtime kernel thread.

In the middle of all that, while the thread type was 'user' and
realtime disabled, something was invoking `ensure_crtc_frame` which
created a `CrtcFrame` without a deadline timer. Soon after that the
thread type changed back to 'kernel' with deadline timers expected, but
our existing `CrtcFrame` has no deadline timer associated with it. And
so it would never fire, causing the cursor to freeze whenever the primary
plane isn't changing. And the problem was permanent, not just the first
frame because each `CrtcFrame` gets repeatedly reused (maybe shouldn't
be called a "Frame"?).

Now we adapt to switching between kernel and user thread types by adding
and removing the deadline timer as required.

Close: https://gitlab.gnome.org/GNOME/mutter/-/issues/3464
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3950>
(cherry picked from commit c436e7cb17)
2024-09-14 21:13:11 +02:00
..
backends kms/impl-device: Add/remove deadline timer as required 2024-09-14 21:13:11 +02:00
common common/cogl-drm-formats: Split out format to string helper 2024-04-16 21:05:09 +00:00
compositor x11-display: Make subwindow redirection call mode specific 2024-08-04 15:03:58 +00:00
core display: Rename mandatory X11 initialization function 2024-08-04 15:03:58 +00:00
frames Revert "frames: Always initialize _MUTTER_FRAME_EXTENTS to zero" 2024-03-01 10:54:32 +01:00
meta meta/plugin: Annotate dialog creation virtuals as return full 2024-06-29 21:12:29 +02:00
tests cogl/tests: Avoid floats when converting between int formats 2024-08-18 18:28:54 +00:00
wayland wayland: Bypass popup grab focus if other handlers are in effect 2024-09-14 21:09:59 +02:00
x11 display: Move X11 initial focus handling to MetaX11Display 2024-08-04 15:03:58 +00:00
meson.build common/cogl-drm-formats: Split out format to string helper 2024-04-16 21:05:09 +00:00
meta-private-enum-types.c.in build: Add missing include 2022-08-10 20:28:40 +02:00
meta-private-enum-types.h.in cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00