Commit Graph

212 Commits

Author SHA1 Message Date
Ivan Molodetskikh d2fa1f54d4 Add force-disable-connectors-on-resume debug flag 2025-12-18 07:39:44 +03:00
yuxqiu 8370c539fb tty: Handle multiple primary nodes having the same render node 2025-11-26 15:41:46 +03:00
Ivan Molodetskikh 98006a8dba Remove setting max bpc 2025-11-21 10:21:11 +03:00
Ivan Molodetskikh 9d522ed51e tty: Throttle VBlanks on displays running faster than expected
Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh 8ef5cc2297 tty: Extract time and refresh_interval higher
Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh 46308bb58c tty: Fall back to primary GPU for display-only devices
This enables DisplayLink support.

Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh ade8dd502b tty: Name is_ccs variable explicitly
Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh 5555e5578c tty: Create allocator at device creation
Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh a21aac949c tty: Ensure we only use the primary render node for dmabuf global
Necessary for a future refactor making render node optional.

Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh cb47caba11 tty: Initialize primary node before others
Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Scott McKendry <39483124+scottmckendry@users.noreply.github.com>
2025-11-21 07:14:27 +03:00
Ivan Molodetskikh 6fcdb9242e tty: Avoid modeset on session resume 2025-11-19 20:49:18 +03:00
Ivan Molodetskikh 1ae489813e tty: Make sure to cleanup all CRTCs except used ones
Apparently a CRTC can be active and use bandwidth even without any
connectors on it.
2025-11-19 20:14:59 +03:00
Ivan Molodetskikh c722634c26 tty: Add Tracy span to another long call 2025-11-19 08:53:35 +03:00
Ivan Molodetskikh 63f58086b9 tty: Avoid modeset on adding device if possible
Session resume will still modeset; more work would be needed to support
that (namely, handling changes to the CRTC mapping).
2025-11-19 08:48:50 +03:00
Ivan Molodetskikh a19326fd12 tty: Extract should_disable_laptop_panels() 2025-11-19 08:44:57 +03:00
Ivan Molodetskikh 6ca21e7bfd tty: Add Tracy spans to heavy functions 2025-11-18 21:47:33 +03:00
Ivan Molodetskikh ce6d211485 Add more Tracy spans to initialization 2025-11-18 21:26:31 +03:00
Ivan Molodetskikh 262cca6ad4 tty: Honor "panel orientation" property 2025-11-18 17:46:02 +03:00
Ivan Molodetskikh 3eef19dc7d tty: Avoid reloading ignored nodes unnecessarily
Also fixes panic when the code ran while udev_dispatcher was already
locked.
2025-11-17 09:05:00 +03:00
Ivan Molodetskikh 6e8fd15339 tty: Fix cast for aarch64 2025-10-29 10:01:51 +03:00
Ivan Molodetskikh db32f52ce6 tty: Move HDR property reset to session resume
Not sure why it was in output config changed, but it shouldn't be there
as that's called quite frequently.
2025-10-29 09:29:39 +03:00
Ivan Molodetskikh 978aace94d tty: Tone down some property setting messages
If those props are missing we don't want to scream "error" in the logs.
2025-10-29 09:23:32 +03:00
Merlijn 6a2c6261df Add support for custom modes and modelines. (#2479)
* Implement custom modes and modelines

Co-authored-by: ToxicMushroom <32853531+ToxicMushroom@users.noreply.github.com>

* fixes

* refactor mode and modeline kdl parsers.

* add IPC parse checks

* refactor: address feedback

* fix: add missing > 0 refresh rate check

* move things around

* fixes

* wiki fixes

---------

Co-authored-by: Christian Meissl <meissl.christian@gmail.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-10-29 09:10:38 +03:00
athul-krishna-kr c8eea8ee9d backend/tty: Consider only primary node in drm udev event 2025-10-19 16:01:37 +03:00
Ivan Molodetskikh ada6e844ba tty: Retry adding device on change
On my laptop, sometimes the initial addition of the dGPU fails for some
reason.
2025-10-17 18:03:21 +03:00
Ivan Molodetskikh b38df2d1c8 tty: Improve debug messages 2025-10-17 17:33:27 +03:00
Shaun Ren 5c91e3191d tty: Add support for disabling DRM devices 2025-10-02 10:02:16 +03:00
Shaun Ren b7f1e382a2 tty: Close DRM device session fd in device_removed()
Same logic as in cosmic-comp.
2025-10-02 10:02:16 +03:00
Ivan Molodetskikh 8b73910a11 tty: Don't print successful max bpc/HDR
These are not really that useful
2025-08-24 16:06:06 +03:00
Michael Yang 969f382e3e feat: reset HDR connector properties 2025-08-24 16:06:06 +03:00
Ivan Molodetskikh a6febb86aa tty: Remove warning when rendering with inactive device 2025-08-17 11:29:33 +03:00
Ivan Molodetskikh 2fb993d221 Bump Smithay (xkbcommon wvkbd fix) 2025-08-11 09:07:13 +03:00
BB f74d83dcca niri-config: add keep-max-bpc-unchanged option (#2195)
* niri-config: add disable-set-bpc option
setting bpc to 8 bricks some OLED displays driven by amdgpu

* change to keep-max-bpc-unchanged and add to wiki

* fmt

* Update wiki/Configuration:-Debug-Options.md

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-07 11:06:11 -07:00
Ivan Molodetskikh 98a42c5557 Update Smithay (clipboard client exit nil fix, input region bottom-right fix) 2025-07-31 19:39:12 +02:00
Ivan Molodetskikh dfb3683187 Fix new Clippy warnings 2025-07-13 12:54:03 +03:00
Ivan Molodetskikh b55a80c641 Update Smithay 2025-06-23 16:12:45 +03:00
Gwen a7186a0441 Add debug option to skip cursor-only updates while VRR is active (#1616)
* Add debug option to skip cursor-only updates while VRR is active

* Update niri-config/src/lib.rs

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* Update src/backend/tty.rs

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* Update wiki/Configuration:-Debug-Options.md

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* Update Configuration:-Debug-Options.md

* Update tty.rs

* Update lib.rs

* Update Configuration:-Debug-Options.md

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-06-03 15:56:21 +00:00
Christian Meissl cb857e32e4 Bump Smithay and others
Presentation subsurface fix, popup unconstrain resize fix, cursor shape fix, refactors.
2025-04-29 08:53:25 +03:00
Ivan Molodetskikh 1c521e4831 Update Smithay (Framebuffer type) 2025-03-10 07:59:14 +03:00
Ivan Molodetskikh d27d6a504d Make idle notify lazy 2025-02-17 09:09:59 +03:00
Ivan Molodetskikh 2511a98e8b Extract Niri::update_shaders() 2025-01-21 11:31:30 +03:00
Ivan Molodetskikh 623687e59b Fix new Clippy warnings 2025-01-10 09:11:31 +03:00
Ivan Molodetskikh 098c826095 Search for connector duplicates across all devices 2025-01-04 23:32:09 +03:00
Ivan Molodetskikh dca0364f4c Unname connector if a duplicate is detected 2025-01-04 18:03:08 +03:00
Ivan Molodetskikh 37771259d9 Fetch monitor name from EDID only once
Reduce spam when it's unavailable. Assume the name cannot change at runtime;
before if it changed, bad things would probably happen anyway.
2025-01-04 17:56:13 +03:00
Ivan Molodetskikh 4618e4851c Default to unrestricted primary plane scanout 2025-01-04 13:02:22 +03:00
Ivan Molodetskikh ab0cce7cb7 Add Xrgb/Xbgr to color formats
At least until the scanout check is fixed in Smithay again.
2025-01-04 11:22:56 +03:00
Ivan Molodetskikh 1973b97cc2 Upgrade Smithay (DrmCompositor changes) 2025-01-04 11:22:56 +03:00
Ivan Molodetskikh e6d8932b3b Update for Smithay VRR changes 2024-12-30 20:12:37 +03:00
Ivan Molodetskikh 70f96cca0a Update Smithay (presentation-time v2) 2024-12-30 20:12:37 +03:00