From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/atomic: track individual colorop updates
Date: Thu, 04 Jun 2026 12:16:44 +1000 [thread overview]
Message-ID: <review-patch3-20260602215743.914265-4-mwen@igalia.com> (raw)
In-Reply-To: <20260602215743.914265-4-mwen@igalia.com>
Patch Review
**Author:** Melissa Wen
This is the largest patch and the core behavioral change. It ensures `plane_state->color_mgmt_changed` is set whenever any colorop property in the plane's color pipeline actually changes value.
**Changes reviewed:**
- **`drm_atomic_set_colorop_for_plane()`** now returns `bool` instead of `void`. It returns `false` (no change) when the same colorop pointer is set again, `true` when it actually changes. The early-return for no-change avoids unnecessary debug logging and change tracking. Only one caller exists in-tree, at line 615, which uses `|=` to combine the result into `color_mgmt_changed`. Correct.
- **`drm_atomic_colorop_set_property()`** gains a `bool *replaced` output parameter. Each property branch now compares old vs new value before writing, and only sets `*replaced = true` when the value actually changed:
```c
if (state->bypass != val) {
state->bypass = val;
*replaced = true;
}
```
This pattern is applied to `bypass`, `lut1d_interpolation`, `curve_1d_type`, `multiplier`, and `lut3d_interpolation`. The `data` property delegates to `drm_atomic_color_set_data_property()` which passes the pointer through to `drm_property_replace_blob_from_id()` — that function already has a `bool *replaced` parameter with the correct semantics.
- **`drm_atomic_set_property()` (DRM_MODE_OBJECT_COLOROP case)**: After calling `drm_atomic_colorop_set_property()`, if `ret || !replaced` it breaks early (no plane state needed). Otherwise it fetches the plane state and sets `plane_state->color_mgmt_changed |= replaced`. The `drm_atomic_get_plane_state()` call may fail (returns ERR_PTR), which is correctly handled.
- **`include/drm/drm_atomic_uapi.h`**: Adds `#include <linux/types.h>` for the `bool` return type, and updates the declaration. Clean.
**One minor observation:** At line 1325, `plane_state->color_mgmt_changed |= replaced;` — at this point `replaced` is guaranteed `true` (the `if (ret || !replaced) break;` on line 1317 already filtered the false case), so the `|=` is equivalent to `= true`. This is fine — using `|=` is defensive and matches the convention used elsewhere (e.g., line 615).
**Verdict:** Correct and well-implemented. No issues.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 2:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 21:53 [PATCH v8 0/4] drm/atomic: track individual colorop updates Melissa Wen
2026-06-02 21:53 ` [PATCH v8 1/4] drm/colorop: Remove read-only comments from interpolation fields Melissa Wen
2026-06-04 2:16 ` Claude review: " Claude Code Review Bot
2026-06-02 21:53 ` [PATCH v8 2/4] drm/colorop: make lut(1/3)d_interpolation props correctly behave as mutable Melissa Wen
2026-06-04 2:16 ` Claude review: " Claude Code Review Bot
2026-06-02 21:53 ` [PATCH v8 3/4] drm/atomic: track individual colorop updates Melissa Wen
2026-06-04 2:16 ` Claude Code Review Bot [this message]
2026-06-02 21:53 ` [PATCH v8 4/4] drm/amd/display: use plane color_mgmt_changed to track colorop changes Melissa Wen
2026-06-04 2:16 ` Claude review: " Claude Code Review Bot
2026-06-04 2:16 ` Claude review: drm/atomic: track individual colorop updates Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-25 9:49 [PATCH v7 0/4] " Melissa Wen
2026-05-25 9:50 ` [PATCH v7 3/4] " Melissa Wen
2026-05-25 21:18 ` Claude review: " Claude Code Review Bot
2026-05-25 21:18 ` Claude Code Review Bot
2026-05-19 21:09 [PATCH v6 0/6] " Melissa Wen
2026-05-19 21:09 ` [PATCH v6 5/6] " Melissa Wen
2026-05-25 12:24 ` Claude review: " Claude Code Review Bot
2026-05-25 12:24 ` Claude Code Review Bot
2026-05-06 19:23 [PATCH v5 0/6] " Melissa Wen
2026-05-06 19:23 ` [PATCH v5 5/6] " Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-07 3:05 ` Claude Code Review Bot
2026-05-01 13:06 [PATCH v4 0/6] drm/atomic: track colorop changes of a given plane Melissa Wen
2026-05-01 13:06 ` [PATCH v4 5/6] drm/atomic: track individual colorop updates Melissa Wen
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-03-23 13:15 [PATCH v2 0/2] drm/atomic: track colorop changes of a given plane Melissa Wen
2026-03-23 13:15 ` [PATCH v2 1/2] drm/atomic: track individual colorop updates Melissa Wen
2026-03-24 21:51 ` Claude review: " Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch3-20260602215743.914265-4-mwen@igalia.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox