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: make lut(1/3)d_interpolation mutable
Date: Thu, 07 May 2026 13:05:38 +1000	[thread overview]
Message-ID: <review-patch4-20260506192633.16066-5-mwen@igalia.com> (raw)
In-Reply-To: <20260506192633.16066-5-mwen@igalia.com>

Patch Review

**Assessment: Good, well-structured**

This patch moves `lut1d_interpolation` and `lut3d_interpolation` from `struct drm_colorop` (the immutable hardware object) to `struct drm_colorop_state` (the per-commit mutable state). This is the right pattern — properties that userspace can change per atomic commit must live in the state struct.

The changes are consistent:
- **drm_colorop.h**: Fields moved from `drm_colorop` to `drm_colorop_state`
- **drm_atomic.c**: Print state reads from `state->lut1d_interpolation` / `state->lut3d_interpolation` instead of `colorop->...`
- **drm_atomic_uapi.c**: Set/get property uses `state->...` instead of `colorop->...`
- **drm_colorop.c**: Default values initialized in `__drm_colorop_state_reset()` via `drm_object_property_get_default_value()`, and the assignment `colorop->lut1d_interpolation = interpolation` removed from init functions

The initialization in `__drm_colorop_state_reset()` correctly mirrors the pattern already used for `curve_1d_type`:

```c
if (colorop->lut1d_interpolation_property) {
    drm_object_property_get_default_value(&colorop->base,
                          colorop->lut1d_interpolation_property,
                          &val);
    colorop_state->lut1d_interpolation = val;
}
```

Since `__drm_atomic_helper_colorop_duplicate_state()` does a `memcpy` of the entire state, the new fields will be correctly preserved during state duplication without additional code.

**Note**: The return value of `drm_object_property_get_default_value()` is not checked for errors (unlike the existing `curve_1d_type` case which uses `if (!drm_object_property_get_default_value(...))`). The existing code for `curve_1d_type` wraps the call in an `if (!drm_object_property_get_default_value(...))` condition. The new code for `lut1d_interpolation` and `lut3d_interpolation` does not check the return value — the value will be used even if the call fails. This is inconsistent with the existing pattern but practically harmless since the property existence check (`if (colorop->lut1d_interpolation_property)`) ensures the property exists and the default value lookup should succeed.

---
Generated by Claude Code Patch Reviewer

  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 review: " Claude Code Review Bot
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 Code Review Bot [this message]
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 4/6] drm/colorop: make lut(1/3)d_interpolation mutable 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-patch4-20260506192633.16066-5-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