From: Erik Tagirov <erik@tagirov.ch>
To: robin.clark@oss.qualcomm.com, lumag@kernel.org,
abhinav.kumar@linux.dev, jesszhan0024@gmail.com,
sean@poorly.run, marijn.suijten@somainline.org,
airlied@gmail.com, simona@ffwll.ch
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [RFC] drm/msm/dpu: set possible_crtcs on cursor planes
Date: Wed, 18 Nov 2026 21:47:42 +0100 [thread overview]
Message-ID: <av4OfY5sML97l2F_@oasis> (raw)
I am using a lesser known wayland compositor that uses the possible_crtcs field of a plane to detect
which one to use for the cursor. On the Lenovo T14s two cursor planes are created, each with possible_crtcs set
to 0xff. Which from my understanding means that they can be used with any crtc.
However, the compositor picks the wrong cursor plane which results in a lag of ~17ms
on each DRM_IOCTL_MODE_SETPLANE call. Making the cursor movements sluggish.
After some investigation, I found out that this is due to the legacy_cursor_update flag not being set
in drm_atomic_helper_update_plane() which has an impact in msm_atomic_commit_tail() where the fallback branch
is taken.
The lag is solved with the patch below.
Best regards
- Erik Tagirov
The cursor plane must be used with the correct crtc to ensure an
asynchronous commit
---
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index da3556eb6ecc..4e0e9c2d8062 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -877,6 +877,9 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms)
ret = PTR_ERR(crtc);
return ret;
}
+ /* Ensure that cursor planes are commited asynchronously */
+ if (cursor_planes[i])
+ cursor_planes[i]->possible_crtcs = drm_crtc_mask(crtc);
}
/* All CRTCs are compatible with all encoders */
--
2.49.0
reply other threads:[~2026-11-18 18:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=av4OfY5sML97l2F_@oasis \
--to=erik@tagirov.ch \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox