All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Erik Tagirov" <erik@tagirov.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC] drm/msm/dpu: set possible_crtcs on cursor planes
Date: Wed, 18 Nov 2026 19:10:18 +0000	[thread overview]
Message-ID: <sashiko-outbox-221824@kernel.org> (raw)
In-Reply-To: <av4OfY5sML97l2F_@oasis>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm/msm/dpu: missing Signed-off-by trailer and email text in
  commit message
- [Medium] drm/msm/dpu: restricting cursor possible_crtcs starves higher
  CRTCs of cursors
- [Low] drm/msm/dpu: missing Fixes trailer for cursor plane
  possible_crtcs bug
--

commit ca8af36e450982d481b162e2cd26c19bfc3c443d
Author: Erik Tagirov <erik@tagirov.ch>

> drm/msm/dpu: set possible_crtcs on cursor planes
>
> 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

[Severity: High]
This commit is missing a Signed-off-by: trailer from the patch author to
certify the Developer's Certificate of Origin.  The commit message also
retains conversational email sign-off text ("The lag is solved with the
patch below. Best regards - Erik Tagirov") followed by a trailing sentence
fragment that should be folded into the commit description.

[Severity: Low]
This fixes the cursor plane possible_crtcs mask set when cursor planes
were enabled on DPU.  Should this include:

  Fixes: 07ca1fc0f8a0 ("drm/msm/dpu: enable cursor plane on dpu")

> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 1b6286dccfc00..ae14e146ec112 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);
>  	}

[Severity: Medium]
Does restricting cursor_planes[i]->possible_crtcs to drm_crtc_mask(crtc)
prevent higher-numbered CRTCs from using any hardware cursor plane?

Earlier in _dpu_kms_drm_obj_init(), DRM_PLANE_TYPE_CURSOR planes are only
created for catalog SSPPs that have BIT(DPU_SSPP_CURSOR) set:

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:_dpu_kms_drm_obj_init() {
    ...
		if ((catalog->sspp[i].features & BIT(DPU_SSPP_CURSOR))
			&& cursor_planes_idx < max_crtc_count)
			type = DRM_PLANE_TYPE_CURSOR;
    ...
}

Across the DPU hardware catalogs, at most 1 or 2 SSPPs set
DPU_SSPP_CURSOR (for example, X1E80100 on the Lenovo T14s defines 2
cursor SSPPs, while max_crtc_count can be up to 5), so cursor_planes[i] is
NULL for i >= cursor_planes_idx.  Because DPU SSPPs (and virtual planes
when dpu_use_virtual_planes is enabled) can be routed to any CRTC's Layer
Mixer, pinning the 1 or 2 cursor planes exclusively to CRTC 0 and CRTC 1
causes __setplane_check() and drm_atomic_plane_check() to reject attaching
a cursor plane to any CRTC with index >= cursor_planes_idx, even when
CRTC 0 and CRTC 1 are disabled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/av4OfY5sML97l2F_@oasis?part=1

  reply	other threads:[~2026-11-18 19:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 20:47 [RFC] drm/msm/dpu: set possible_crtcs on cursor planes Erik Tagirov
2026-11-18 19:10 ` sashiko-bot [this message]
2026-11-18 20:22 ` Dmitry Baryshkov
2026-11-18 21:24   ` Erik Tagirov

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=sashiko-outbox-221824@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=erik@tagirov.ch \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.