Skip to content

Close unused mode setting and rendering devices

Jonas Ådahl requested to merge jadahl/mutter:wip/close-kms-fds into master

This achieves a few of things:

  • It splits out device file management from MetaLauncher into a thread safe device pool object. It's possible to "open" the same file from multiple places, without actually opening it multiple time in parallel.
  • It takes a step towards decouple mode setting devices from rendering by introducing using these "device files" directly in various situations; it doesn't go all the way, but it's a step in that direction
  • It adds device file usage tracking, which allows for knowing when a device isn't used by anything. If a device isn't used by anything, it can be closed, which e.g. means drivers can be unloaded.
  • On monitor reconfiguration, or on hotplug events, device files are reopened, and will stay open until they are no longer needed again.

Marked as draft as it includes !1822 (merged).

Edited by Jonas Ådahl

Merge request reports