From: Roman Li <roman...@amd.com>

[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...@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlaus...@amd.com>
Acked-by: Stylon Wang <stylon.w...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 09bbec4dab7c..0b12299da93d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9737,7 +9737,8 @@ static int dm_update_crtc_state(struct 
amdgpu_display_manager *dm,
        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);
 
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to