Commit Graph

84 Commits

Author SHA1 Message Date
Ivan Molodetskikh f5e9b40140 tty: Check changes against pending connectors and mode
If we queued some DRM changes, they will be in pending. Also be more
resilient by removing unwrap.
2024-01-21 10:24:42 +04:00
Ivan Molodetskikh 40c85da102 Add an IPC socket and a niri msg outputs subcommand 2024-01-17 10:45:18 +04:00
Ivan Molodetskikh 768b326028 Rename connectors to enabled_outputs 2024-01-17 10:25:23 +04:00
Ivan Molodetskikh 6703d5ce72 tty: Add Tracy span to on_output_config_changed() 2024-01-17 10:21:40 +04:00
Ivan Molodetskikh 1f9abaaa58 Add live-reload for output mode 2024-01-16 18:02:30 +04:00
Ivan Molodetskikh eb4946c3d8 tty: Extract pick_mode() 2024-01-16 18:01:25 +04:00
Ivan Molodetskikh 5f440f7be3 Add live-reload for output on/off 2024-01-16 15:34:00 +04:00
Ivan Molodetskikh 6644cc16ff tty: Remove connector arg from connector_disconnected() 2024-01-16 15:33:37 +04:00
Ivan Molodetskikh 6ca3b6ddb5 Move output scale setting into niri 2024-01-16 09:46:02 +04:00
Ivan Molodetskikh 64c41fa2c8 Move config into a separate crate
Get miette and knuffel deps contained within.
2024-01-07 09:28:14 +04:00
Ivan Molodetskikh 3d5de921cd Add render-drm-device debug config option 2024-01-06 09:14:48 +04:00
Ivan Molodetskikh 8703feedee tty: Print full path to render node 2024-01-06 08:46:30 +04:00
Ivan Molodetskikh 1c7c5b3f28 tty: Avoid non-linear cross-device formats 2024-01-05 23:23:32 +04:00
Ivan Molodetskikh 5cd31e5730 Implement multi-GPU support
Rendering always happens on the primary GPU.
2024-01-03 18:16:20 +04:00
Ivan Molodetskikh de3fc2def0 Make rendering generic over renderer 2024-01-03 18:05:15 +04:00
Ivan Molodetskikh fd1d4b07fd Replace renderer() with with_primary_renderer() 2024-01-03 11:38:09 +04:00
Ivan Molodetskikh 8b5acd5e6e Rename RenderResult::Error to Skipped 2024-01-03 11:38:07 +04:00
Ivan Molodetskikh 31bb9096e2 Move Niri::render() invocation to backends 2024-01-03 11:38:02 +04:00
Ivan Molodetskikh 57a7347620 Move import_dmabuf to backends 2024-01-03 11:37:04 +04:00
Ivan Molodetskikh 628891db2c Add disable-cursor-plane debug flag 2024-01-03 08:42:49 +04:00
Ivan Molodetskikh be6e25f5fb tty: Extract config variable 2024-01-03 08:42:49 +04:00
Ivan Molodetskikh 655fe413fb tty: Don't store render formats
Actually, how did it even fork before? Pretty sure it was storing render
formats, not texture formats, but with render formats
weston-simple-dmabuf-feedback doesn't work?
2024-01-01 17:31:58 +04:00
Ivan Molodetskikh ac6ff7ff41 tty: Disable dmabuf global before destroying 2024-01-01 17:31:58 +04:00
Ivan Molodetskikh 84befb4e91 tty: Move dmabuf_global up into Tty 2024-01-01 09:54:45 +04:00
Ivan Molodetskikh d39f7bebf3 tty: Fix import sorting
One of the imports was too long so rustfmt bailed.
2024-01-01 09:40:41 +04:00
Ivan Molodetskikh 0dd9a42087 Move DmabufState to Niri 2023-12-31 12:02:39 +04:00
Ivan Molodetskikh 658941f2c3 Enable EGL for the winit backend
More relevant now that mesa on Fedora is trying to force non-working
Zink for some reason.
2023-12-31 09:46:22 +04:00
Ivan Molodetskikh d155f5cd6c Add a config flag to disable an output 2023-12-18 10:27:41 +04:00
Ivan Molodetskikh 0d2ed2e14a tty: Fix clippy warning 2023-11-24 09:50:30 +04:00
Ivan Molodetskikh 42bb79d7c3 tty: Rename vblank offset plot to time since presentation
Makes it clearer what this is.
2023-11-24 09:19:49 +04:00
Ivan Molodetskikh 588e6d7cdd tty: Rename presentation target offset plot to misprediction
Makes it clearer what this is.
2023-11-24 09:15:25 +04:00
Kirill Chibisov 0a2052945e Add support for wl_compositor@v6 2023-10-29 13:58:48 +04:00
Ivan Molodetskikh e73f33d6a3 Draw background with a solid color buffer 2023-10-29 10:45:24 +04:00
Kirill Chibisov 345428bce7 Drop GbmDevice in the end
The `GbmDevice` must be destroyed after destroying all the objects
associated with it.
2023-10-27 16:48:49 +04:00
Kirill Chibisov c6ec36f422 Update smithay to the latest git
This fixes IME handling.
2023-10-24 17:26:01 +04:00
Ivan Molodetskikh 3fd421f13f Update Smithay 2023-10-24 15:05:14 +04:00
Ivan Molodetskikh d59fe34243 Make clear color a const
The damage tracker doesn't understand clear color changes.
2023-10-13 13:30:36 +04:00
Ivan Molodetskikh 29053a807b Return RenderResult from render() 2023-10-13 13:30:36 +04:00
Ivan Molodetskikh 0a32747495 Send dmabuf feedbacks from the backend 2023-10-13 13:30:36 +04:00
Ivan Molodetskikh f625dede1a Extract niri.clear_color() 2023-10-13 13:30:36 +04:00
Ivan Molodetskikh 15b6c84af0 tty: Start new tracy frame only when queueing redraw 2023-10-11 09:02:55 +04:00
Ivan Molodetskikh 082d734b2a Make zbus optional under "dbus" feature 2023-10-10 10:25:33 +04:00
Ivan Molodetskikh 189d1bd97b Add power-off-monitors bind
Implements https://github.com/YaLTeR/niri/issues/24
2023-10-09 18:37:43 +04:00
Ivan Molodetskikh bb3fbe2e83 Make output modes configurable 2023-10-03 08:35:24 +04:00
Ivan Molodetskikh 2d3d0ce165 tty: Remove assert on needs_sync
cosmic-comp doesn't do anything with it.
2023-10-02 10:54:05 +04:00
Ivan Molodetskikh 5b6b3fcfbe Avoid sending frame callbacks to invisible surfaces 2023-10-01 19:41:42 +04:00
Ivan Molodetskikh a3aa5fca12 Refactor frame scheduling
Combine the redraw state variables into one enum, and refactor to get
rid of the requirement that a VBlank must queue a subsequent redraw.
Also fix the bug where ongoing animations that produced no damage could
stall the redrawing.
2023-09-30 17:13:56 +04:00
Ivan Molodetskikh f381db8354 Make pipewire / xdp-gnome-screencast optional 2023-09-30 09:58:34 +04:00
Ivan Molodetskikh 404661ed8d Throttle frame callbacks to once per monitor refresh
Under some circumstances, the compositor can get into a commit-frame
callback busy loop with a client. For example, if a client redraws on
frame callbacks, but the resulting frame has empty damage (e.g. the
damaged part of the client is outside the monitor). Or if the client
simply commits with empty damage (looking at you, Firefox).

This behavior is compliant with the Wayland specification and with the
intended idea of frame callbacks, but causes a lot of unnecessary CPU
usage in the client and the compositor.

To solve this problem, this commit introduces frame callback throttling.

Every surface may only receive a single frame callback in one
monitor refresh cycle. If a surface commits resulting in no KMS frame
submission, a timer is created, that will fire at the predicted would-
be-VBlank time, and send the accumulated frame callbacks.

This way, a surface that redraws on frame callbacks will not notice
any change in frame callback delivery, if its commits suddenly stop
producing KMS updates.
2023-09-29 13:12:50 +04:00
Kirill Chibisov 804e064826 shell: add support for kde server decorations
This should provide server side decorations for the gtk3 applications,
like firefox.
2023-09-27 18:38:38 +04:00