]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Set native cursor mode for disabled CRTCs
authorTimur Kristóf <timur.kristof@gmail.com>
Sat, 11 Jul 2026 11:34:35 +0000 (13:34 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Jul 2026 21:39:52 +0000 (17:39 -0400)
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.

Fixes: 41af6215cdbc ("drm/amd/display: Reject cursor plane on DCE when scaled differently than primary")
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5432
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Michel Dänzer <michel.daenzer@mailbox.org>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2f79f0130f828cf26fe2dcf45291821616af7b47)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index ff337de44f7ad1203d50d952234015093680f193..fe6eea28d1192ae846d3607bad7d120b1237bc71 100644 (file)
@@ -12814,10 +12814,15 @@ static int dm_crtc_get_cursor_mode(struct amdgpu_device *adev,
        /* 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 (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(4, 2, 1) ||
+           !dm_crtc_state->base.enable) {
                *cursor_mode = DM_CURSOR_NATIVE_MODE;
                return 0;
        }