From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/atomic: only add colorop state from active color pipeline
Date: Thu, 07 May 2026 13:05:37 +1000 [thread overview]
Message-ID: <review-patch1-20260506192633.16066-2-mwen@igalia.com> (raw)
In-Reply-To: <20260506192633.16066-2-mwen@igalia.com>
Patch Review
**Assessment: Good, minor nit**
This patch changes `drm_atomic_add_affected_colorops()` to take a `drm_plane_state *` instead of `drm_atomic_state *`, and walks only the active `color_pipeline` linked list instead of iterating all colorops on the device and filtering by plane.
The key behavioral change is sound — previously `drm_for_each_colorop(colorop, plane->dev)` iterated *all* colorops across *all* planes on the device, filtering by `colorop->plane != plane`. Now it walks only the active pipeline chain:
```c
for (colorop = plane_state->color_pipeline;
colorop;
colorop = colorop->next) {
```
This is both more efficient and more correct (no states get created for colorops from inactive pipelines).
The NULL guard at the top is clean:
```c
if (!plane_state || !plane_state->color_pipeline)
return 0;
```
The callers in `drm_atomic_add_affected_planes()` and `drm_atomic_helper_duplicate_state()` are updated to remove the now-redundant `if (plane_state->color_pipeline)` check and pass `plane_state` instead of `state`.
**Nit**: The kernel-doc parameter name changed from `@state` to `@plane_state`, but the declaration in `drm_atomic.h` still uses the name `state`:
```c
drm_atomic_add_affected_colorops(struct drm_plane_state *state,
```
This is technically valid C, but calling a `drm_plane_state *` parameter "`state`" is confusing since "state" in the DRM atomic world typically refers to `drm_atomic_state`. Consider naming it `plane_state` in the header declaration to match the implementation.
The removal of `WARN_ON(!drm_atomic_get_new_plane_state(state, plane))` makes sense since the function now receives the plane_state directly.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-07 3:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 19:23 [PATCH v5 0/6] drm/atomic: track individual colorop updates Melissa Wen
2026-05-06 19:23 ` [PATCH v5 1/6] drm/atomic: only add colorop state from active color pipeline Melissa Wen
2026-05-07 3:05 ` Claude Code Review Bot [this message]
2026-05-06 19:23 ` [PATCH v5 2/6] drm/atomic: don't set colorop properties of inactive color pipelines Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-06 19:23 ` [PATCH v5 3/6] drm/colorop: Remove read-only comments from interpolation fields Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-06 19:23 ` [PATCH v5 4/6] drm/colorop: make lut(1/3)d_interpolation mutable Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-06 19:23 ` [PATCH v5 5/6] drm/atomic: track individual colorop updates Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-06 19:23 ` [PATCH v5 6/6] drm/amd/display: use plane color_mgmt_changed to track colorop changes Melissa Wen
2026-05-07 3:05 ` Claude review: " Claude Code Review Bot
2026-05-07 3:05 ` Claude review: drm/atomic: track individual colorop updates Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
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
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-patch1-20260506192633.16066-2-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