drm/amd/display: fix mode scaling (RMX_.*)
Subsystems (3)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -6035,7 +6035,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 );/*
Signature · 1 line
2.41.0
Quoted 9 lines · Hamza Mahfooz
As made mention of in commit
4a2df0d1f28e("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't calldrm_mode_set_crtcinfo()once the crtc timings have been decided. Since, it can cause settings to be unintentionally overwritten. So, sincedm_stateis never NULL now, we can useold_streamto determine if we should calldrm_mode_set_crtcinfo()because we only need to set the crtc timing parameters for entirely new streams.
Quoted 4 lines
Cc Harry Wentland <[email protected]>Cc Rodrigo Siqueira <[email protected]>Fixes 712237a4a1b4 ("drm/amd/display: Always set crtcinfo from create_stream_for_sink")Signed-off-by Hamza Mahfooz <[email protected]>
Does this fix:
https://gitlab.freedesktop.org/drm/amd/-/issues/2783
If so, add a link tag for that.
Alex
Quoted 20 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-2@@ -6035,7 +6035,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 );/* -- 2.41.0
Quoted 10 lines · Alex Deucher
Quoted 9 lines · Hamza Mahfooz
As made mention of in commit
4a2df0d1f28e("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't calldrm_mode_set_crtcinfo()once the crtc timings have been decided. Since, it can cause settings to be unintentionally overwritten. So, sincedm_stateis never NULL now, we can useold_streamto determine if we should calldrm_mode_set_crtcinfo()because we only need to set the crtc timing parameters for entirely new streams.
Quoted 8 lines
Quoted 4 lines
Cc Harry Wentland <[email protected]>Cc Rodrigo Siqueira <[email protected]>Fixes 712237a4a1b4 ("drm/amd/display: Always set crtcinfo from create_stream_for_sink")Signed-off-by Hamza Mahfooz <[email protected]>Does this fix:
https://gitlab.freedesktop.org/drm/amd/-/issues/2783
If so, add a link tag for that.
The issue I'm addressing is specific to the colorspace patches (which weren't ported to 6.4.y to my knowledge). So, that's probably unrelated.
Quoted 23 lines
Alex
Quoted 20 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-2@@ -6035,7 +6035,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 );/* -- 2.41.0
Signature · 1 line
Hamza
Quoted 8 lines · Hamza Mahfooz
As made mention of in commit
4a2df0d1f28e("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't calldrm_mode_set_crtcinfo()once the crtc timings have been decided. Since, it can cause settings to be unintentionally overwritten. So, sincedm_stateis never NULL now, we can useold_streamto determine if we should calldrm_mode_set_crtcinfo()because we only need to set the crtc timing parameters for entirely new streams.
Quoted 4 lines
Cc Harry Wentland <[email protected]>Cc Rodrigo Siqueira <[email protected]>Fixes 712237a4a1b4 ("drm/amd/display: Always set crtcinfo from create_stream_for_sink")Signed-off-by Hamza Mahfooz <[email protected]>
Harry
Quoted 17 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -6035,7 +6035,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 );/*