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: Tue, 05 May 2026 09:26:01 +1000 [thread overview]
Message-ID: <review-patch5-20260501132527.522320-6-mwen@igalia.com> (raw)
In-Reply-To: <20260501132527.522320-6-mwen@igalia.com>
Patch Review
**Purpose:** Uses the plane's `color_mgmt_changed` flag to track when any colorop property in the active pipeline changes value.
**Review:**
The approach of threading a `bool *replaced` through the set_property path is functional but adds some complexity. The pattern is:
```c
static int drm_atomic_colorop_set_property(..., bool *replaced)
{
if (property == colorop->bypass_property) {
if (state->bypass != val) {
state->bypass = val;
*replaced = true;
}
} ...
}
```
Then at the call site:
```c
bool replaced = false;
...
ret = drm_atomic_colorop_set_property(colorop, colorop_state,
file_priv, prop, prop_value,
&replaced);
if (!ret && replaced)
plane_state->color_mgmt_changed = true;
```
**This is correct and well-designed.** It avoids setting `color_mgmt_changed` when the same value is written (no-change commit), which prevents unnecessary driver work. The `|=` for pipeline changes in `drm_atomic_set_colorop_for_plane` is also correct:
```c
state->color_mgmt_changed |= drm_atomic_set_colorop_for_plane(state, colorop);
```
**Design note on `replaced` naming:** The name `replaced` is borrowed from the blob property API (`drm_property_replace_blob`), but for scalar properties it reads slightly oddly. Something like `changed` might be clearer. This is a minor style preference.
**`drm_atomic_set_colorop_for_plane` return value change:** The function now returns `bool` instead of `void` and adds an early-return optimization:
```c
if (plane_state->color_pipeline == colorop)
return false;
```
This is a good optimization — avoids logging and state changes when re-setting the same pipeline. The `#include <linux/types.h>` addition to `drm_atomic_uapi.h` for the `bool` return type is correct.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-04 23:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 1/6] drm/atomic: only add colorop state from active color pipeline Melissa Wen
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-05-01 13:06 ` [PATCH v4 2/6] drm/atomic: don't set colorop properties of inactive color pipelines Melissa Wen
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-05-01 13:06 ` [PATCH v4 3/6] drm/colorop: Remove read-only comments from interpolation fields Melissa Wen
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-05-01 13:06 ` [PATCH v4 4/6] drm/colorop: make lut(1/3)d_interpolation mutable Melissa Wen
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-05-01 13:06 ` [PATCH v4 5/6] drm/atomic: track individual colorop updates Melissa Wen
2026-05-04 23:26 ` Claude Code Review Bot [this message]
2026-05-01 13:06 ` [PATCH v4 6/6] drm/amd/display: use plane color_mgmt_changed to track colorop changes Melissa Wen
2026-05-04 21:08 ` kernel test robot
2026-05-04 23:26 ` Claude review: " Claude Code Review Bot
2026-05-04 23:26 ` Claude review: drm/atomic: track colorop changes of a given plane Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-23 13:15 [PATCH v2 0/2] " 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-patch5-20260501132527.522320-6-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