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 67b825cbb88f..74bb5845b6be 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6649,6 +6649,20 @@ static int dm_crtc_get_cursor_mode(struct amdgpu_device *adev, break; } + /* + * A plane moving or resizing (without a scale change) changes how + * much of the CRTC it covers. This can create/remove holes under + * the cursor and thus flip the required cursor mode (native vs + * overlay), so the destination rect must be re-evaluated too. + */ + if (old_plane_state->crtc_x != plane_state->crtc_x || + old_plane_state->crtc_y != plane_state->crtc_y || + old_plane_state->crtc_w != plane_state->crtc_w || + old_plane_state->crtc_h != plane_state->crtc_h) { + consider_mode_change = true; + break; + } + if (dm_plane_color_pipeline_active(state, plane, true) != dm_plane_color_pipeline_active(state, plane, false)) { consider_mode_change = true;