-
Notifications
You must be signed in to change notification settings - Fork 171
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
DrmOutputManager #1576
base: master
Are you sure you want to change the base?
DrmOutputManager #1576
Conversation
542a21a
to
b10a373
Compare
27a4681
to
15198e2
Compare
Addressed in 3fe19dd. While it works okay-ish for anvil, it definitely would mess up state tracking in niri and cosmic-comp and while potentially work-arounds exists, at least in the latter with multi-threading this requires ugly synchronization, while the point of this api is to hide that. |
3417378
to
90e699b
Compare
ad6c3b5
to
cb9b280
Compare
cb9b280
to
afa1117
Compare
All the code paths seem to now work pretty nicely in pop-os/cosmic-comp#1020 (though I don't have any devices that actually have to use these paths, I just forced them manually). This just needs a new pixman-rs release to pass tests. |
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.
So, in general I believe the changes, except the one limiting the primary format, are pretty harmless. The DrmOutputManager
is a really nice optional addition which will definitely need some more work in the future. But I feel like this provides a solid base to do so. I am really happy how this turned out, thanks!
I really like the approach with DrmOutputRenderElements
, nice work :)
src/backend/drm/compositor/mod.rs
Outdated
.expect("We have a buffer for the primary plane") | ||
.buffer | ||
{ | ||
if slot.format() != element_config.properties.format { |
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.
This needs to be configurable from the outside, I am just not sure how and in what detail. Having this restriction will kill performance on lower end hardware. In my case I would only enable this on general purpose x68 hardware and only when more than a single output is enabled.
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.
Hmm, maybe just have this be another bit for FrameMode
? We might also have a need for a new flag here. So maybe FrameMode
should become FrameFlags
and have something like ALLOW_PRIMARY_SCANOUT
instead of PRIMARY_SCANOUT
.
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 have pushed a commit doing this: 54379b2
pixman-rs 0.2.1 is out |
54379b2
to
06c52e6
Compare
highly wip of the ideas described here: pop-os/cosmic-comp#969 (comment)
it implements most of the stuff, except:
not extensively tested, but anvil seems to still be able to launch.
returning an error from
DrmCompositor::new
also successfully triggers the format selectionlogic
TODO
A lot...
If this turns out to be problematic we can disable the event for
commit_frame
, but we need to make sureto kick off rendering in this case somehow..