-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable the initial set of the CRTC when modes match #3034
Conversation
Codecov Report
@@ Coverage Diff @@
## platform-API-merge #3034 +/- ##
=====================================================
Coverage ? 77.10%
=====================================================
Files ? 1050
Lines ? 72609
Branches ? 0
=====================================================
Hits ? 55983
Misses ? 16626
Partials ? 0
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@mattkae would you please add the option to the demo server? |
try | ||
{ | ||
geometry::Rectangle rectangle = output->get_rectangle(); | ||
if (rectangle != area) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably be checking the full drmModeModeInfo
here? I don't know how often it'll come up, but if we're switching to a specific refresh rate (or variable refresh rate mode), then the size will match but the actual mode won't, and we'll need to do a full modeset.
Actually, maybe we should only be checking the drmModeModeInfo
here - I'm fairly sure that's the only thing that needs to match in order for page flipping to work later; I'm fairly sure the (x,y) you're scanning out of the current framebuffer doesn't matter.
Hm, actually… do we even have the right information here? Maybe we need to remove needs_crtc_set
from DisplayBuffer entirely, and have it as a method on KMSOutput
that can check the current CRTC configuration against the requested CRTC configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions:
- At startup, it seems to me like we're already setting the requested
mode_index
to thecurrent_mode_index
(which is read from thecurrent_crtc
) [Seemgg::Display::configure_locked
]. We can still do the check, but 99% of the time it appears that we are going to try and set the mode to the same mode that is currently set anyway (unless there is an error).
I think that moving the logic here to KMSOutput
makes a lot of sense though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
We'll probably extend this later into removing schedule_set_crtc
and needs_set_crtc
entirely, but that can probably wait for Atomic KMS.
How to test 🧪
run_with
command for your compositor with the newSmoothBoothSupport
option. An example of adding this toshell_main.cpp
would be:gbm
cannot start. see [this link](systemctl set-default multi-user.target) on how to do that)ssh
into your computer from another computer as rootmiral-shell
What's new 🆕
create_display
with the options to that it can read whether or not it should do a smooth bootDisplaybuffer
will NOT initialize the initial visible frame buffer AND it will NOT set the CRTC for each output. This ensures that plymouth's previous contents remain on the screenSome caveats 🕳️
set_crtc
changes the resolution or somethingUp next ⏭️
I have another branch ready to go that will read the mapping into a Mir buffer and offer it back to the
Scene
to be displayed. However, this will call on us to transition the buffer out of existence, which is a bigger story