From: <IVAN.LIPSKI@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: "Timur Kristóf" <timur.kristof@gmail.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>, "Alex Hung" <alex.hung@amd.com>,
"Tom Chung" <chiahsuan.chung@amd.com>,
"James Lin" <PingLei.Lin@amd.com>,
"Ivan Lipski" <ivan.lipski@amd.com>
Subject: [PATCH] drm/amd/display: Always report native cursor mode for disabled CRTC
Date: Fri, 21 Aug 2026 17:36:44 -0400 [thread overview]
Message-ID: <20260821213644.689017-1-IVAN.LIPSKI@amd.com> (raw)
From: Ivan Lipski <ivan.lipski@amd.com>
[Why&How]
The disabled-CRTC check was bundled into the DCN4+ version condition, so a
disabled CRTC only fell back to native cursor mode on those specific
ASICs, resulting in overlay cursor mode on disabled CRTCs on pre DCN4,
casuing failed atomic checks.
Move the check into a separate early return so a disabled CRTC always
reports native cursor mode on all ASICs.
Fixes: b7d7e714de44 ("drm/amd/display: Fall back to overlay cursor on dcn4x when top plane doesn't fill CRTC")
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
---
.../amd/display/amdgpu_dm/amdgpu_dm_cursor.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c
index c41fce07b8fa8..8204ad4018e6b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c
@@ -287,19 +287,24 @@ int amdgpu_dm_crtc_get_cursor_mode(struct amdgpu_device *adev,
int i;
bool skip_fmt_scale_restrictions = false;
- /* Overlay cursor not supported on HW before DCN
- * DCN401/420 does not have the cursor-on-scaled-plane or cursor-on-yuv-plane restrictions
- * as previous DCN generations, so enable native mode on DCN401/420
- *
+ /*
* Always set native cursor mode when the CRTC is disabled,
* to make sure it doesn't cause atomic commits to fail when
* they are trying to disable the CRTC.
*/
+ if (!crtc_state->enable) {
+ *cursor_mode = DM_CURSOR_NATIVE_MODE;
+ return 0;
+ }
+
+ /* Overlay cursor not supported on HW before DCN
+ * DCN401/420 does not have the cursor-on-scaled-plane or cursor-on-yuv-plane restrictions
+ * as previous DCN generations, so enable native mode on DCN401/420
+ */
if (amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(4, 0, 1) ||
amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(4, 2, 0) ||
amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(4, 2, 1) ||
- amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(6, 0, 0) ||
- !dm_crtc_state->base.enable) {
+ amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(6, 0, 0)) {
/*
* Newer DCN has no cursor-on-scaled/yuv-plane restriction, so
* skip those overlay triggers below. A plane that does not fill
--
2.43.0
reply other threads:[~2026-08-21 21:36 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=20260821213644.689017-1-IVAN.LIPSKI@amd.com \
--to=ivan.lipski@amd.com \
--cc=PingLei.Lin@amd.com \
--cc=alex.hung@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chiahsuan.chung@amd.com \
--cc=harry.wentland@amd.com \
--cc=sunpeng.li@amd.com \
--cc=timur.kristof@gmail.com \
/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.