Add synthetic panel-fit fallback modes - #2780
Open
inducer wants to merge 1 commit into
Open
Conversation
Generate conservative CVT reduced-blanking fallback modes for connectors that support aspect-preserving hardware panel scaling. Fallback modes are filtered against real connector capabilities, including dimensions, pixel clock, timing-derived refresh rate, tiled-output status, and eDP mixed-mode safety. They are advertised through the normal Smithay output mode path, persisted by size/refresh, and resolved back to complete DRM timings during modesets. When a synthetic mode is selected, configure the connector for `Full aspect` scaling and submit the generated timing as the real CRTC MODE_ID, allowing the compositor to render a lower-resolution framebuffer while panel fitting expands it to the native display. Add unit coverage for CVT-RB timings, eligibility, filtering, orientation, preferred-mode behavior, and persisted synthetic mode resolution. Assisted-by: Zed:gpt-5.6-terra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A word of Warning/an Apology
Vibe-coded PR ahead. In preparing this, the AI used the Mutter source code (also GPL-3) as a reference.
I'm submitting it because it may solve a real issue for someone else, and it works for me. The code itself may be iffy. For example, it seems odd that it has to "reach around" smithay's KMS interaction code by going directly to
drm-ffi. Buyer beware, OK to close if you don't like it; it'll still be discoverable. If you do close it, I will likely come back with a bug report requesting the same feature.What is being fixed here
I have a high-resolution laptop panel (3840x2400). As part of my work, I need to share my full screen on which an inking app runs. Both the screen sharing and the note taking app bog down and become too slow to be usable at the full panel resolution. Half-resolution meanwhile (1920x1200) is no problem. My panel does not offer a native 1920x1200 mode, but it does support upscaling. Gnome offers a synthetic mode along those lines. Cosmic settings only provides the full panel resolution.
I made this by having an AI investigate what Mutter does and cloning the relevant behavior in cosmic-comp. I'm using it now, and it seems to do what I need.
Checklist