public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
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, 26 May 2026 07:18:47 +1000	[thread overview]
Message-ID: <review-patch3-20260525100524.304263-4-mwen@igalia.com> (raw)
In-Reply-To: <20260525100524.304263-4-mwen@igalia.com>

Patch Review

This is the core patch. It sets `plane_state->color_mgmt_changed` whenever a colorop property value actually changes.

**Change to `drm_atomic_set_colorop_for_plane`**: Now returns `bool` indicating whether the color pipeline pointer actually changed. The early-out when `plane_state->color_pipeline == colorop` avoids unnecessary state dirtying when userspace re-sets the same pipeline. The only call site at line 615 uses the return value correctly:

```c
state->color_mgmt_changed |= drm_atomic_set_colorop_for_plane(state, colorop);
```

The function is `EXPORT_SYMBOL` so theoretically out-of-tree callers exist, but since the return value is ignorable (void→bool), this is ABI-safe.

**Change to `drm_atomic_colorop_set_property`**: Each property branch now does a compare-before-assign and sets `*replaced = true` only on actual value change. This is correct for all scalar properties (bypass, lut1d_interpolation, curve_1d_type, multiplier, lut3d_interpolation). The `data_property` case passes `replaced` through to `drm_atomic_color_set_data_property` which delegates to `drm_property_replace_blob_from_id` — that function already computes `replaced` correctly for blobs.

**Change to `drm_atomic_set_property` (COLOROP case)**: After detecting a change, it pulls in the plane state and sets `color_mgmt_changed`:

```c
ret = drm_atomic_colorop_set_property(colorop, colorop_state,
                                      file_priv, prop, prop_value,
                                      &replaced);
if (ret || !replaced)
    break;

plane_state = drm_atomic_get_plane_state(state, colorop->plane);
...
plane_state->color_mgmt_changed |= replaced;
```

**Minor observation**: At line 1325, `plane_state->color_mgmt_changed |= replaced;` is guarded by `if (ret || !replaced)` above (line 1317), so `replaced` is always `true` when line 1325 is reached. The `|=` is harmless (and consistent with the style used elsewhere), but `= true` would be equivalent. This is not a bug — the existing code is fine for consistency and future-proofing.

**`#include <linux/types.h>`** added to `drm_atomic_uapi.h` for the `bool` return type — correct.

No issues.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25 21:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  9:49 [PATCH v7 0/4] drm/atomic: track individual colorop updates Melissa Wen
2026-05-25  9:49 ` [PATCH v7 1/4] drm/colorop: Remove read-only comments from interpolation fields Melissa Wen
2026-05-25 21:18   ` Claude review: " Claude Code Review Bot
2026-05-25  9:49 ` [PATCH v7 2/4] drm/colorop: make lut(1/3)d_interpolation mutable Melissa Wen
2026-05-25 21:18   ` Claude review: " Claude Code Review Bot
2026-05-25  9:50 ` [PATCH v7 3/4] drm/atomic: track individual colorop updates Melissa Wen
2026-05-25 21:18   ` Claude Code Review Bot [this message]
2026-05-25  9:50 ` [PATCH v7 4/4] drm/amd/display: use plane color_mgmt_changed to track colorop changes Melissa Wen
2026-05-25 21:18   ` Claude review: " Claude Code Review Bot
2026-05-25 21:18 ` Claude review: drm/atomic: track individual colorop updates Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
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-20260525100524.304263-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