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: duplicate state of all colorops
Date: Fri, 05 Jun 2026 06:13:39 +1000	[thread overview]
Message-ID: <review-patch2-20260604180457.1110110-3-mwen@igalia.com> (raw)
In-Reply-To: <20260604180457.1110110-3-mwen@igalia.com>

Patch Review

**Purpose:** Ensure `drm_atomic_helper_duplicate_state()` duplicates ALL colorops for a plane, not just those in the active pipeline, so that colorop settings persist across deactivation.

The change:
```c
// Before:
if (plane_state->color_pipeline) {
    err = drm_atomic_add_affected_colorops(state, plane);
    if (err)
        goto free;
}

// After:
err = drm_atomic_add_affected_colorops(state, plane);
if (err)
    goto free;
```

This unconditionally calls `drm_atomic_add_affected_colorops()`, which walks ALL colorops for the plane (the original function that iterates `drm_for_each_colorop` across the entire device, filtering by `colorop->plane`). This ensures that even colorops not in the current pipeline get their state duplicated.

**This is correct for the stated goal:** suspend/resume needs the full snapshot so that when a pipeline is re-activated, all the previously-configured colorop states are preserved.

**Interaction with Patch 1:** Note that Patch 1 changed `drm_atomic_add_affected_planes()` to use the new `drm_atomic_add_pipeline_colorops()` (narrower). This patch keeps using the broader `drm_atomic_add_affected_colorops()` in `drm_atomic_helper_duplicate_state()`. The distinction is intentional: the duplicate-state path needs everything; the affected-planes path only needs pipeline-active colorops. This is a clean separation.

**Possible concern:** The removed blank line between `goto free; }` and `}` (the closing brace of the `drm_for_each_plane` loop) results in slightly tighter formatting. This is fine.

Overall: **Looks good.** Simple, correct, well-motivated.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-06-04 20:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 17:59 [PATCH v2 0/3] don't allow changes to inactive colorops Melissa Wen
2026-06-04 17:59 ` [PATCH v2 1/3] drm/atomic: only add states of active or transient active colorops Melissa Wen
2026-06-04 18:24   ` sashiko-bot
2026-06-04 20:13   ` Claude review: " Claude Code Review Bot
2026-06-04 17:59 ` [PATCH v2 2/3] drm/atomic: duplicate state of all colorops Melissa Wen
2026-06-04 20:13   ` Claude Code Review Bot [this message]
2026-06-04 17:59 ` [PATCH v2 3/3] drm/atomic: reject colorop update from inactive color pipeline Melissa Wen
2026-06-04 20:13   ` Claude review: " Claude Code Review Bot
2026-06-04 20:13 ` Claude review: don't allow changes to inactive colorops Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-26 14:17 [PATCH 0/3] " Melissa Wen
2026-05-26 14:17 ` [PATCH 2/3] drm/atomic: duplicate state of all colorops Melissa Wen
2026-05-27  4:45   ` 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-patch2-20260604180457.1110110-3-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