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/colorop: Preserve bypass value in duplicate_state()
Date: Wed, 11 Mar 2026 13:23:06 +1000	[thread overview]
Message-ID: <review-patch1-20260310113238.3495981-2-chaitanya.kumar.borah@intel.com> (raw)
In-Reply-To: <20260310113238.3495981-2-chaitanya.kumar.borah@intel.com>

Patch Review

**Verdict: Looks good.**

The fix removes the unconditional `state->bypass = true` assignment after `memcpy()` in `__drm_atomic_helper_colorop_duplicate_state()`:

```c
 	if (state->data)
 		drm_property_blob_get(state->data);
-
-	state->bypass = true;
```

This is clearly correct. The `memcpy()` on line 465 already copies the entire state including `bypass`. Overwriting it to `true` afterwards defeats the purpose of duplicating the current hardware state — exactly the same pattern used for plane and CRTC state duplication, where no fields are unconditionally reset to non-hardware values after the copy.

As the cover letter notes, this is also a problem for colorops where bypass is immutably false — the forced `true` would be contradicting the hardware capabilities.

One question: was there an original reason this line existed? Looking at the commit message for `8c5ea1745f4c` ("drm/colorop: Add BYPASS property") might reveal if this was intentional to ensure bypass-by-default semantics for userspace-initiated commits. If so, the change is still correct (userspace should set bypass explicitly), but it's worth understanding the original intent to ensure no regressions.

---
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 Code Review Bot [this message]
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 review: " Claude Code Review Bot
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-patch1-20260310113238.3495981-2-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