Skip to content
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

LinuxKMS: Fix support for triple buffering with DRM #7299

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

tronical
Copy link
Member

@tronical tronical commented Jan 8, 2025

This simplifies code and (more importantly) avoids getting accidentally frame-locked into 30 FPS when rendering takes slightly longer than 16ms.

Fixes #6951

With the drm output now waiting for the page flip on render *and* gbm and dumb buffer displays supporting triple buffering,
we don't need the entire async page flip handling logic anymore.

In the future we could turn wait_for_page_flip() into an async fn.
@tronical tronical requested a review from ogoffart January 8, 2025 18:15
@@ -10,15 +10,17 @@ use i_slint_core::platform::PlatformError;

pub struct DumbBufferDisplay {
drm_output: DrmOutput,
front_buffer: RefCell<DumbBuffer>,
back_buffer: RefCell<DumbBuffer>,
front_buffer: RefCell<DumbBuffer>, // Currently displayed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor style nitpick: could be doc comments inside of trailing comments)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok :) will fix tomorrow but merge this now so it’ll be in the nightly packages.

@tronical tronical merged commit 31912fe into master Jan 8, 2025
37 checks passed
@tronical tronical deleted the simon/linuxkms-triple-buffer-gbm branch January 8, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinuxKMS: Fix support for triple buffering with drm
2 participants