drm/amd/display: Set native cursor mode for disabled CRTCs
Subsystems (3)
PATCH 1/1 drm/amd/display: Set native cursor mode for disabled CRTCs
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")
Cc Leo Li <[email protected]>
Cc Michel Dänzer <[email protected]>
Signed-off-by Timur Kristóf <[email protected]>
Tested-by Viktor Jägersküpper <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -1
@@ -6608,10 +6608,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 ; }
Signature · 1 line
2.55.0
Alex Deucher
AppliedApplied. Thanks!
Quoted 39 lines · Timur Kristóf
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")Cc Leo Li <[email protected]>Cc Michel Dänzer <[email protected]>Signed-off-by Timur Kristóf <[email protected]>Tested-by Viktor Jägersküpper <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6
-2@@ -6608,10 +6608,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 ; } --2.55.0