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: Add affected colorops with affected planes
Date: Wed, 11 Mar 2026 13:23:07 +1000	[thread overview]
Message-ID: <review-patch2-20260310113238.3495981-3-chaitanya.kumar.borah@intel.com> (raw)
In-Reply-To: <20260310113238.3495981-3-chaitanya.kumar.borah@intel.com>

Patch Review

**Verdict: Mostly good, one concern.**

The change adds colorops to the atomic state when `drm_atomic_add_affected_planes()` pulls in a plane:

```c
+		if (plane_state->color_pipeline) {
+			ret = drm_atomic_add_affected_colorops(state, plane);
+			if (ret)
+				return ret;
+		}
```

The guard on `plane_state->color_pipeline` (added in v2) is a reasonable optimization to avoid pulling in colorop state when no pipeline is active, keeping the atomic state small for the common case.

**Concern about which state is checked:** `plane_state` here is the return value of `drm_atomic_get_plane_state()`, which returns the **new** (duplicated) plane state. Since `__drm_atomic_helper_plane_duplicate_state()` preserves `color_pipeline` via `memcpy()`, this correctly reflects the committed hardware state. This is fine.

**Minor concern — should this be unconditional?** The `color_pipeline` check means that if a plane's pipeline was *just disabled* in the same transaction (e.g., userspace set `COLOR_PIPELINE` to NULL in this commit), the colorops won't be pulled in. In theory this could matter if the driver needs to see the colorop state transition from active→bypass. However, since `drm_atomic_add_affected_planes()` operates on the *old* crtc state's plane mask (planes that were enabled before this commit), and the plane state here is the duplicated (pre-commit) state, `color_pipeline` should still reflect the old active pipeline. So this should be fine in practice.

**The `Reviewed-by: Uma Shankar` tag says `#v1`** — this was reviewed on v1 but v2 added the `color_pipeline` guard. The tag should ideally be re-confirmed for v2 since the logic changed (previously it would unconditionally add colorops, now it's conditional).

**Overall:** Both patches are correct and well-scoped fixes for a real bug. The series is suitable for merging and stable backport.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-11  3:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 11:32 [PATCH v2 0/2] drm/colorop: Keep colorop state consistent across atomic commits Chaitanya Kumar Borah
2026-03-10 11:32 ` [PATCH v2 1/2] drm/colorop: Preserve bypass value in duplicate_state() Chaitanya Kumar Borah
2026-03-11  3:23   ` Claude review: " Claude Code Review Bot
2026-03-10 11:32 ` [PATCH v2 2/2] drm/atomic: Add affected colorops with affected planes Chaitanya Kumar Borah
2026-03-11  3:23   ` Claude Code Review Bot [this message]
2026-03-11  3:23 ` Claude review: drm/colorop: Keep colorop state consistent across atomic commits 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-patch2-20260310113238.3495981-3-chaitanya.kumar.borah@intel.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