From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amd/display: use plane color_mgmt_changed to track colorop changes Date: Wed, 25 Mar 2026 07:51:14 +1000 Message-ID: In-Reply-To: <20260323131942.494217-3-mwen@igalia.com> References: <20260323131942.494217-1-mwen@igalia.com> <20260323131942.494217-3-mwen@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Overall:** Straightforward driver-side consumption of the new flag. Very small and focused. **Observations:** 1. **`amdgpu_dm_commit_planes` change** (line 456): ```c if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { ``` This correctly triggers color block updates when either CRTC or plane colorop state changes. This is the actual bug fix for the gamescope night mode issue. 2. **`should_reset_plane` change** (lines 464-466): ```c if (new_plane_state->color_mgmt_changed) return true; ``` This ensures plane reset (remove + re-add to DC state) happens on colorop changes. This parallels the existing `new_crtc_state->color_mgmt_changed` check just above it. The comment is clear and appropriate. 3. **Potential concern - plane reset cost**: Returning `true` from `should_reset_plane` triggers a full plane remove/re-add cycle in DC. For frequent colorop updates (e.g., animated night mode transitions), this could be heavyweight. However, this matches the existing behavior for CRTC color mgmt changes, so it's consistent with current expectations. If performance becomes an issue, it could be optimized later to only do a surface update without full reset, but that's out of scope here. 4. **No changes needed for `amdgpu_dm_atomic_check`**: The existing check path already handles plane state validation, so no additional check-phase changes are needed. This is correct since the core DRM atomic code already sets up the plane state properly in patch 1. --- Generated by Claude Code Patch Reviewer