Skip to content

PRESENT-NG (v4) - #145

Draft
notbabaisyou wants to merge 15 commits into
SpaghettiFork:masterfrom
notbabaisyou:present-v4-internals
Draft

PRESENT-NG (v4)#145
notbabaisyou wants to merge 15 commits into
SpaghettiFork:masterfrom
notbabaisyou:present-v4-internals

Conversation

@notbabaisyou

Copy link
Copy Markdown
Collaborator

Highly draft and experimental, won't be shipped until 27.1.

@notbabaisyou notbabaisyou self-assigned this Sep 7, 2026
No functional change, for now.
Move flip_pending, flip_active and unflip_event_id from per-Screen
to per-CRTC present_crtc_priv. Replace global present_exec_queue and
present_flip_queue with a per-CRTC exec_queue and flip_queue.
Add BlockHandler hook to present_screen_priv and wrap screen
BlockHandler in present_screen_priv_init. Add stub
present_scmd_block_handler that chains to saved handler. No functional
change.
Move scheduling to per-Screen BlockHandler. Add
present_scmd_replace_queued_per_crtc and
present_scmd_block_handler that for each CRTC does exclusive
coalescing, checks fence and flip state, arms vblank or executes
when ready. Make present_scmd_pixmap enqueue-only.
Use QueueWorkProc to wake BlockHandler for wait fences, syncobj
and vblank events. Keep flip completion immediate.
Merge per-CRTC exec and flip queues into a single queue with
bypass for blocked flips. Keep TearFree guard and fake queue
global.
Enqueue was not waking server, so first frame with
exec_msc <= crtc_msc never armed a vblank fd and stayed
in poll. Queue work to run BlockHandler.
Call AdjustWaitForDelay 0 when no candidate due to fence or
pending flip, so poll does not sleep with work queued.
Use RegisterBlockAndWakeupHandlers per Screen with data=ScreenPtr.
Remove ScreenBlockHandler wrap. Keep single scan and non-NULL wakeup.
Schedule future presents via queue_vblank and bound poll
when blocked. Keep single scan per CRTC.
Use WakeupHandler for immediate work (exec <= msc).
BlockHandler schedules future via queue_vblank.
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.

1 participant