mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Fall back to overlay cursor on dcn4x when top plane doesn't fill CRTC
[why] amdgpu_dm_crtc_get_cursor_mode() returns DM_CURSOR_NATIVE_MODE early and unconditionally for dcn4.x. That early return was added because these ASICs no longer have the cursor-on-scaled-plane or cursor-on-yuv-plane restrictions of older DCN, so native cursor is fine in those cases. However, it also bypasses the "does the top plane fill the CRTC?" (hole) evaluation further down. When the top/primary plane does not cover the whole CRTC, the cursor must fall back to an overlay plane so it is composited over the uncovered region; keeping the native cursor there produces an incorrect result. As a consequence igt@amdgpu/amd_cursor_overlay@non-full, which verifies exactly this native->overlay fallback, fails on dcn42. [how] Change unconditional early return with a skip_fmt_scale_restrictions flag. For dcn4.x keep skipping the YUV / active-color-pipeline / different-scale overlay triggers (genuinely unnecessary on this hardware), but fall through to the existing entire_crtc_covered check so a top plane that does not fill the CRTC still selects DM_CURSOR_OVERLAY_MODE. Native mode is still chosen when the plane covers the whole CRTC. Update the amdgpu_dm_cursor KUnit tests accordingly: exercise the dcn4x path with a full atomic state fixture (full coverage -> native) and add a dcn4x hole case (top plane does not fill the CRTC -> overlay). Reviewed-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: James Lin <PingLei.Lin@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1fc7c4c4e6
commit
fb1b272dbf
2 changed files with 38 additions and 22 deletions
Loading…
Add table
Add a link
Reference in a new issue