summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamza Mahfooz <hamza.mahfooz@amd.com>2023-08-18 09:11:11 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-08-30 14:59:43 -0400
commit95dd6efc6bd322cf6268b41cf635281704d827fe (patch)
tree3be5101696bf12492c781e314843361ead0fd44a
parentd28e6d5aab475eac7b8e72a278f792c3712b2d5f (diff)
downloadlinux-95dd6efc6bd322cf6268b41cf635281704d827fe.tar.gz
linux-95dd6efc6bd322cf6268b41cf635281704d827fe.tar.bz2
linux-95dd6efc6bd322cf6268b41cf635281704d827fe.zip
drm/amd/display: fix mode scaling (RMX_.*)
As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't call drm_mode_set_crtcinfo() once the crtc timings have been decided. Since, it can cause settings to be unintentionally overwritten. So, since dm_state is never NULL now, we can use old_stream to determine if we should call drm_mode_set_crtcinfo() because we only need to set the crtc timing parameters for entirely new streams. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Fixes: bd49f19039c1 ("drm/amd/display: Always set crtcinfo from create_stream_for_sink") Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c2
1 files changed, 1 insertions, 1 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 3ce63e98e9ce..d14ffb871ae8 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6031,7 +6031,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
if (recalculate_timing)
drm_mode_set_crtcinfo(&saved_mode, 0);
- else
+ else if (!old_stream)
drm_mode_set_crtcinfo(&mode, 0);
/*