Repository navigation
Draw a legacy cursor into the buffer that is not on screen - #134
Merged
Merged
Conversation
The legacy path had one buffer, on the reasoning that drmModeSetCursor takes one handle and has no flip to alternate on. But a sprite is redrawn while it is shown: an animation's next frame, and near the top and left edges of the CRTC on every move, where it is drawn shifted inside its buffer so the plane need not start off screen. Those redraws went into the buffer being scanned out. On a VisionFive 2, whose display controller reads the cursor's buffer as it scans, the cursor broke up whenever the pointer was near the top or left edge and came back away from them; the right and bottom edges, where nothing is redrawn, were fine. A Raspberry Pi 5's vc4 did not show it. The legacy path keeps two buffers now, as the atomic paths do. A redraw goes into the one that is not installed, and installing it with drmModeSetCursor is the switch. An animation's frame marks the cursor for installing as well: before, a driver that copies the buffer when it is set would have gone on showing the first frame. PingPong::single stays for a caller with one buffer; the renderer no longer uses it. Review: one more dumb buffer of the cursor's size a renderer, which allocate_pair was already making and the legacy path left unused. No new ioctl; set_cursor is called where it was, with the other handle. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
This was referenced Nov 17, 2026
jwinarske
marked this pull request as ready for review
November 17, 2026 19:37
This was referenced Nov 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the legacy cursor path the sprite was redrawn into the one buffer on screen: on every move near the top and left edges (the edge shift), and for each frame of an animation. A VisionFive 2's display controller shows that as a broken-up cursor near those two edges; the right and bottom edges and the middle are fine.
PingPong::singlestays public and is no longer used by the rendererSeen on the VisionFive 2 by a person, through fl-engine built against this branch: clean at the top and left edges and in the corner,
waitandprogressanimating cleanly, and a capture of the cursor in the corner clean.No device test tells the two buffers apart on vkms: the kernel makes a new framebuffer for every
drmModeSetCursor, whichever handle it is given.