Skip to content

drm/compositor: Add FrameFlags::OMIT_UNCHANGED_CURSOR_PLANE - #2250

Open
snemesh wants to merge 1 commit into
Smithay:masterfrom
snemesh:drm-omit-unchanged-cursor-plane
Open

snemesh wants to merge 1 commit into
Smithay:masterfrom
snemesh:drm-omit-unchanged-cursor-plane

Conversation

@snemesh

@snemesh snemesh commented Oct 29, 2026

Copy link
Copy Markdown

Description

New flag: the cursor plane is not sent in every commit if it did not change. So a cursor that is moved separately does not jump back.

The code of the fix was written by AI (Claude). The description was translated to English with AI. I reviewed the change and use it in my compositor.

Checklist

A partial update contains every plane in use, including the ones that
did not change, because some drivers mishandle partial updates (see the
note in build_planes). For the cursor plane that undoes a move the
compositor did itself between frames: a compositor that moves the
cursor with drmModeMoveCursor (as Mutter does, so the newest pointer
position goes on screen at the next scanout instead of a frame later)
sees the cursor jump back to where the DrmCompositor last placed it
with every commit that only changed other planes, and a move issued
while such a commit is queued waits for it.

With the new flag an unchanged cursor plane (skipped by
try_assign_cursor_plane) is left out of partial updates. The primary
plane is still part of every update, so this is not the kind of partial
update the note is about. Full updates still contain every plane, the
cursor plane at the position last set by the DrmCompositor; the
compositor's next move puts it right. Without the flag nothing changes.

Tested in a compositor that moves the cursor with the legacy ioctl
(based on 0.7.0, where the same change was applied unconditionally):
the cursor no longer jumps back or shows twice, and moves no longer
wait behind queued commits.

This change was written with the help of an AI assistant (Claude).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant