diff options
author | Victor Lu <victorchengchi.lu@amd.com> | 2020-10-23 13:38:58 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-11-10 14:25:45 -0500 |
commit | 5c68c65295de0bc7856580e8b16d8fa0782ae2d3 (patch) | |
tree | 1ddb5e56ba51157542f215a03b79f6f665ec51cf /drivers | |
parent | c07cbc1f04ecba00f99e313de3190db5e7438e81 (diff) |
drm/amd/display: Explicitly disable cursor when disabling CRTC
[why]
On DCE, the cursor is not being disabled on commits where there is no
CRTC or FB enabled.
[how]
Explicitly disable the cursor in the commit tail only if the pending
commit disables the CRTC.
Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 152b1b1f3c07..16e7eb4028e2 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8049,6 +8049,16 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) new_crtc_state->active_changed, new_crtc_state->connectors_changed); + /* Disable cursor if disabling crtc */ + if (old_crtc_state->active && !new_crtc_state->active) { + struct dc_cursor_position position; + + memset(&position, 0, sizeof(position)); + mutex_lock(&dm->dc_lock); + dc_stream_set_cursor_position(dm_old_crtc_state->stream, &position); + mutex_unlock(&dm->dc_lock); + } + /* Copy all transient state flags into dc state */ if (dm_new_crtc_state->stream) { amdgpu_dm_crtc_copy_transient_flags(&dm_new_crtc_state->base, |