drm/amd/display: use plane color_mgmt_changed to track colorop changes
Subsystems (3)
PATCH 1/1 drm/amd/display: use plane color_mgmt_changed to track colorop changes
This is a resubmission of d79716401a95 ("drm/amd/display: use plane color_mgmt_changed to track colorop changes") whose change was reverted by 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") during a merge conflict resolution.
Original commit message:
``` Ensure the driver tracks changes in any colorop property of a plane color pipeline by using the same mechanism of CRTC color management and update plane color blocks when any colorop property changes. It fixes an issue observed on gamescope settings for night mode which is done via shaper/3D-LUT updates. ```
---
Hey,
I noticed this problem in the resolution of a merge conflict after testing drm-misc-next on SteamDeck with KMS colorop API support and verifying the issue of missing updates in nightlight-mode was back.
Let me know what are the right steps to address it.
Thanks,
Melissa
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -1
@@ -4202,7 +4202,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_commit *state,continue ; bundle->surface_updates[planes_count].surface = dc_plane; -if (new_pcrtc_state->color_mgmt_changed) { +if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { bundle->surface_updates[planes_count].gamma = &dc_plane->gamma_correction; bundle->surface_updates[planes_count].in_transfer_func = &dc_plane->in_transfer_func; bundle->surface_updates[planes_count].gamut_remap_matrix = &dc_plane->gamut_remap_matrix;
@@ -6012,6 +6012,10 @@ static bool should_reset_plane(struct drm_atomic_commit *state,if (new_crtc_state->color_mgmt_changed)return true; +/* Plane color pipeline or its colorop changes. */ +if (new_plane_state->color_mgmt_changed) +return true; +/* * On zpos change, planes need to be reordered by removing and re-adding * them one by one to the dc state, in order of descending zpos.
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Plane color management changes (via `color_mgmt_changed`) force a reset for the modified plane but…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Plane color management changes (via color_mgmt_changed) force a reset for the modified plane but fail to trigger a reset of all other planes on the same CRTC, violating the AMD DC descending z-order requirement. --
--- Patch [1]: [PATCH] drm/amd/display: use plane color_mgmt_changed to track colorop changes --- commit 3d974c5531b17eb9dc9b94714b129841cee1a82c
Author: Melissa Wen <[email protected]>
drm/amd/display: use plane color_mgmt_changed to track colorop changes
This commit ensures the driver tracks changes in any colorop property of a plane color pipeline. It updates plane color blocks when any colorop property changes, which fixes missing updates observed in night mode settings via Gamescope.
Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
[ ... ]
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool should_reset_plane(struct drm_atomic_commit *state, · line 5681
Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4
-0@@ -5675,6 +5675,10 @@ static bool should_reset_plane(struct drm_atomic_commit *state,if (new_crtc_state->color_mgmt_changed)return true; +/* Plane color pipeline or its colorop changes. */ +if (new_plane_state->color_mgmt_changed) +return true; +
[Severity: High]
Does this change require a corresponding update to the cross-plane dependency loop further down in should_reset_plane()?
If one plane resets due to new_plane_state->color_mgmt_changed, the AMD DC architecture requires all other planes on the CRTC to be recreated to preserve descending z-order.
Currently, the loop over for_each_oldnew_plane_in_state() checks legacy properties like dm_new_other_state->degamma_tf, but doesn't check new_other_state->color_mgmt_changed.
Will this omission cause a plane with color_mgmt_changed to be removed and re-added while other planes remain, corrupting the hardware z-order?
Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0/* * On zpos change, planes need to be reordered by removing and re-adding * them one by one to the dc state, in order of descending zpos.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 17 lines · Melissa Wen
This is a resubmission of
d79716401a95("drm/amd/display: use planecolor_mgmt_changedto track colorop changes") whose change was reverted by0461ba9a7994("Merge tag 'amd-drm-next-7.3-2026-07-02' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") during a merge conflict resolution.Original commit message:
``` Ensure the driver tracks changes in any colorop property of a plane color pipeline by using the same mechanism of CRTC color management and update plane color blocks when any colorop property changes. It fixes an issue observed on gamescope settings for night mode which is done via shaper/3D-LUT updates. ```
Quoted 3 lines
Fixes 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")Signed-off-by Melissa Wen <[email protected]>
Quoted 45 lines
---
Hey,
I noticed this problem in the resolution of a merge conflict after testing drm-misc-next on SteamDeck with KMS colorop API support and verifying the issue of missing updates in nightlight-mode was back.
Let me know what are the right steps to address it.
Thanks,
Melissa
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-2@@ -4202,7 +4202,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_commit *state,continue ; bundle->surface_updates[planes_count].surface = dc_plane; -if (new_pcrtc_state->color_mgmt_changed) { +if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { bundle->surface_updates[planes_count].gamma = &dc_plane->gamma_correction; bundle->surface_updates[planes_count].in_transfer_func = &dc_plane->in_transfer_func; bundle->surface_updates[planes_count].gamut_remap_matrix = &dc_plane->gamut_remap_matrix;@@ -6012,6 +6012,10 @@ static bool should_reset_plane(struct drm_atomic_commit *state,if (new_crtc_state->color_mgmt_changed)return true; +/* Plane color pipeline or its colorop changes. */ +if (new_plane_state->color_mgmt_changed) +return true; +/* * On zpos change, planes need to be reordered by removing and re-adding * them one by one to the dc state, in order of descending zpos. -- 2.53.0
Quoted 17 lines · Alex Deucher
Quoted 16 lines · Melissa Wen
This is a resubmission of
d79716401a95("drm/amd/display: use planecolor_mgmt_changedto track colorop changes") whose change was reverted by0461ba9a7994("Merge tag 'amd-drm-next-7.3-2026-07-02' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") during a merge conflict resolution.Original commit message:
``` Ensure the driver tracks changes in any colorop property of a plane color pipeline by using the same mechanism of CRTC color management and update plane color blocks when any colorop property changes. It fixes an issue observed on gamescope settings for night mode which is done via shaper/3D-LUT updates. ```
Quoted 4 lines
Quoted 3 lines
Fixes 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")Signed-off-by Melissa Wen <[email protected]>Acked-by Alex Deucher <[email protected]>
Hey Dave,
Can you apply it to drm-next?
This a regression from https://lists.freedesktop.org/archives/amd-gfx/2026-July/148126.html
And AFAIU drm-misc's branches are not the right place.
Best Regards,
Melissa
Quoted 47 lines
Quoted 47 lines
---
Hey,
I noticed this problem in the resolution of a merge conflict after testing drm-misc-next on SteamDeck with KMS colorop API support and verifying the issue of missing updates in nightlight-mode was back.
Let me know what are the right steps to address it.
Thanks,
Melissa
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-2@@ -4202,7 +4202,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_commit *state,continue ; bundle->surface_updates[planes_count].surface = dc_plane; -if (new_pcrtc_state->color_mgmt_changed) { +if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { bundle->surface_updates[planes_count].gamma = &dc_plane->gamma_correction; bundle->surface_updates[planes_count].in_transfer_func = &dc_plane->in_transfer_func; bundle->surface_updates[planes_count].gamut_remap_matrix = &dc_plane->gamut_remap_matrix;@@ -6012,6 +6012,10 @@ static bool should_reset_plane(struct drm_atomic_commit *state,if (new_crtc_state->color_mgmt_changed)return true; +/* Plane color pipeline or its colorop changes. */ +if (new_plane_state->color_mgmt_changed) +return true; +/* * On zpos change, planes need to be reordered by removing and re-adding * them one by one to the dc state, in order of descending zpos. -- 2.53.0
Quoted 12 lines · Melissa Wen
Quoted 9 lines · Alex Deucher
Quoted 8 lines · Melissa Wen
This is a resubmission of
d79716401a95("drm/amd/display: use planecolor_mgmt_changedto track colorop changes") whose change was reverted by0461ba9a7994("Merge tag 'amd-drm-next-7.3-2026-07-02' of
https://gitlab.freedesktop.org/agd5f/linux into drm-next") during a merge conflict resolution.Original commit message:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
``` Ensure the driver tracks changes in any colorop property of a plane color pipeline by using the same mechanism of CRTC color management and update plane color blocks when any colorop property changes. It fixes an issue observed on gamescope settings for night mode which is done via shaper/3D-LUT updates. ```
After talking to Dave, I applied to drm-misc-fixes:
- 88f8113ab118 ("drm/amd/display: use plane color_mgmt_changed to track colorop changes")
Melissa
Quoted 68 lines
Quoted 5 lines
Quoted 4 lines
Fixes 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next")Signed-off-by Melissa Wen <[email protected]>Acked-by Alex Deucher <[email protected]>Hey Dave,
Can you apply it to drm-next?
This a regression from https://lists.freedesktop.org/archives/amd-gfx/2026-July/148126.html
And AFAIU drm-misc's branches are not the right place.Best Regards,
Melissa
Quoted 50 lines
Quoted 50 lines
---
Hey,
I noticed this problem in the resolution of a merge conflict after testing drm-misc-next on SteamDeck with KMS colorop API support and verifying the issue of missing updates in nightlight-mode was back.
Let me know what are the right steps to address it.
Thanks,
Melissa
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 6 +++++-1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -4202,7 +4202,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_commit *state, continue; bundle->surface_updates[planes_count].surface = dc_plane; - if (new_pcrtc_state->color_mgmt_changed) { + if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { bundle->surface_updates[planes_count].gamma = &dc_plane->gamma_correction;bundle->surface_updates[planes_count].in_transfer_func =
&dc_plane->in_transfer_func; bundle->surface_updates[planes_count].gamut_remap_matrix =&dc_plane->gamut_remap_matrix;drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4
-0@@ -6012,6 +6012,10 @@ static bool should_reset_plane(struct drm_atomic_commit *state, if (new_crtc_state->color_mgmt_changed) return true; + /* Plane color pipeline or its colorop changes. */ + if (new_plane_state->color_mgmt_changed) + return true; + /** On zpos change, planes need to be reordered by removing and re-adding * them one by one to the dc state, in order of descending zpos.
Signature · 1 line
2.53.0