Skip to content

output: fix tearing with direct scanout and hardware cursor #10020

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 5 commits into
base: main
Choose a base branch
from

Conversation

ikalco
Copy link
Contributor

@ikalco ikalco commented Apr 9, 2025

Describe your PR, what does it fix/add?

related #9858 and #9890

this pr tries to fix tearing when its combined with other stuff (ds, hw cursor, maybe more? idk)
also draft cause seems to me some other old mechanisms (pre aq) may still be interfering with new ones

note for future me:
the hardware cursors breaking tearing may be because moving cursor schedules frame,
which might stop events.frame.emit() from being called in aq,
which means monitor tearing render never happens...
also look into whether tearingState.frameScheduledWhileBusy and tearingState.busy is still needed? why not use aq schedule frame and present event?

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?

draft

@ikalco ikalco changed the title output: fix tearing with direct scanout output: fix tearing with direct scanout and hardware cursor Apr 10, 2025
@ikalco ikalco force-pushed the fix_tearing_with_ds branch from 6ba9c42 to 531d79a Compare April 10, 2025 00:05
@UjinT34
Copy link
Contributor

UjinT34 commented Apr 10, 2025

DS doesn't work with SW cursors. Might work with invisible SW cursors if the code allows it.
HW cursor movement breaks vrr on nvidia-drm (probably driver issue with atomic commit and cursor plane properties).
Locked cursors are handled differently with no_break_fs_vrr = 1. Might be the source of issues since tearing is usually needed for FPS games and they use locked cursors.

@abihf
Copy link

abihf commented Apr 23, 2025

is there still any blocking for this PR? I've been using this patch for weeks and it's okay.

@ikalco
Copy link
Contributor Author

ikalco commented Apr 23, 2025

is there still any blocking for this PR? I've been using this patch for weeks and it's okay.

I don't think its finished, gotta look over it still

@Honkazel
Copy link
Contributor

Honkazel commented May 1, 2025

@ikalco rebase?

@ikalco ikalco force-pushed the fix_tearing_with_ds branch from 2d30319 to 002af6d Compare May 1, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants