Skip to content

drm/compositor: allow to explicitly enable/disable explicit sync #1697

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmeissl
Copy link
Collaborator

@cmeissl cmeissl commented Mar 29, 2025

this moves the private decision for enabling explicit sync to a public capability enum, allowing to override it.

related to #1695

this moves the private decision for enabling explicit sync to
a public capability enum, allowing to override it.
Comment on lines +1060 to +1067
// `IN_FENCE_FD` makes commit fail on Nvidia driver
// https://github.com/NVIDIA/open-gpu-kernel-modules/issues/622
let is_nvidia = driver.name().to_string_lossy().to_lowercase().contains("nvidia")
|| driver
.description()
.to_string_lossy()
.to_lowercase()
.contains("nvidia");
Copy link
Contributor

Choose a reason for hiding this comment

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

why not make this a debug flag or environment variable instead, like SMITHAY_DEBUG_DISABLE_EXPLICIT_SYNC? I don't think it should be on the compositor to deal with misbehaving drivers in this case.

Copy link
Member

Choose a reason for hiding this comment

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

I find env vars have their own ux issues since many people don't know of the probably dozen that exist which you could tune.

Also an explicit type (with a little more code) means you could switch at runtime between modes.

I could see the env var make sense for configuring the default value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Both sounds good to me, if it can be shimmied in here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not a big fan of environment variables when they are avoidable. Giving explicit control allows projects like niri to implement thst config option in a way more visible way.

The reason for keeping the nvidia check is simply to not break existing code.

But I am not opposed to adding an environment variable that overrides the default.

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.

3 participants