drm/amd/display: Update scaling settings on modeset
authorRoman Li <roman.li@amd.com>
Fri, 21 May 2021 14:20:25 +0000 (10:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jun 2021 16:19:50 +0000 (12:19 -0400)
[Why]
We update scaling settings when scaling mode has been changed.
However when changing mode from native resolution the scaling mode previously
set gets ignored.

[How]
Perform scaling settings update on modeset.

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index b9be1eb..d084592 100644 (file)
@@ -9678,7 +9678,8 @@ skip_modeset:
        BUG_ON(dm_new_crtc_state->stream == NULL);
 
        /* Scaling or underscan settings */
-       if (is_scaling_state_different(dm_old_conn_state, dm_new_conn_state))
+       if (is_scaling_state_different(dm_old_conn_state, dm_new_conn_state) ||
+                               drm_atomic_crtc_needs_modeset(new_crtc_state))
                update_stream_scaling_settings(
                        &new_crtc_state->mode, dm_new_conn_state, dm_new_crtc_state->stream);