Skip to content

Commit bc13f2f

Browse files
leo-sunli1alexdeucher
authored andcommitted
drm/amd/display: Update color props when modeset is required
This fixes issues where color management properties don't persist over DPMS on/off, or when the CRTC is moved across connectors. Signed-off-by: Leo (Sunpeng) Li <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Cc: [email protected] Signed-off-by: Alex Deucher <[email protected]>
1 parent a9e8d27 commit bc13f2f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4717,8 +4717,12 @@ static int dm_update_crtcs_state(struct dc *dc,
47174717
update_stream_scaling_settings(
47184718
&new_crtc_state->mode, dm_new_conn_state, dm_new_crtc_state->stream);
47194719

4720-
/* Color managment settings */
4721-
if (dm_new_crtc_state->base.color_mgmt_changed) {
4720+
/*
4721+
* Color management settings. We also update color properties
4722+
* when a modeset is needed, to ensure it gets reprogrammed.
4723+
*/
4724+
if (dm_new_crtc_state->base.color_mgmt_changed ||
4725+
drm_atomic_crtc_needs_modeset(new_crtc_state)) {
47224726
ret = amdgpu_dm_set_regamma_lut(dm_new_crtc_state);
47234727
if (ret)
47244728
goto fail;

0 commit comments

Comments
 (0)