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: Refactor drm_writeback_connector structure
Date: Mon, 25 May 2026 19:19:14 +1000	[thread overview]
Message-ID: <review-overall-20260522050313.1800378-1-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20260522050313.1800378-1-suraj.kandpal@intel.com>

Overall Series Review

Subject: Refactor drm_writeback_connector structure
Author: Suraj Kandpal <suraj.kandpal@intel.com>
Patches: 9
Reviewed: 2026-05-25T19:19:14.562559

---

This is v5 of a series that refactors `drm_writeback_connector` by moving it from a standalone struct (that embeds `drm_connector`) into a field within `drm_connector` itself, in a union with the existing `hdmi` connector data. The motivation is sound: drivers like Intel cannot easily work with the current design where the connector is embedded inside `drm_writeback_connector`, because C's "inheritance via embedding" forces the writeback connector to be the outermost allocation owner, which conflicts with driver connector hierarchies.

The approach of unionizing writeback with HDMI inside `drm_connector` is reasonable since a connector cannot be both HDMI and writeback simultaneously. The series is well-structured, splitting the core refactor (patch 1) from incremental API migrations (patches 2-7).

**Key concerns:**

1. **Build-breaking bug in patch 4** (amdgpu): references `acrtc->connector` which doesn't exist -- the field is `acrtc->wb_conn` and it's a `struct drm_writeback_connector *`, so it needs `drm_writeback_to_connector(acrtc->wb_conn)`.

2. **The `encoder` field is silently dropped** from `drm_writeback_connector` without explanation. The old struct had an embedded `struct drm_encoder encoder` used by `drm_writeback_connector_init()` (the non-`_with_encoder` variant). This series does not address this; the new struct in `drm_connector.h` has no `encoder` field. This means `drm_writeback_connector_init()` (the old-style one that internally creates an encoder) would be broken. The series sits on Dmitry's series [3] which may handle this, but it should be mentioned.

3. **Inconsistency in patch 4** with the `malidp_hw.c` hunk: this is reverted from patch 1's changes, but the reverse direction looks identical to what patch 1 introduced. The diff shows the exact same changes being applied again (patch 1 already changed these lines to `.writeback`), suggesting the series was rebased onto Dmitry's patches that differ from what patch 1 targets.

4. **Minor typo** in the kerneldoc: `valriables` should be `variables` (patch 1, `drm_connector.h`).

Overall the design direction is good and most of the mechanical changes are correct. The amdgpu bug is the blocking issue.

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-25  9:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  5:03 [PATCH v5 0/7] Refactor drm_writeback_connector structure Suraj Kandpal
2026-05-22  5:03 ` [PATCH v5 1/7] drm: writeback: " Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 2/7] drm: writeback: Modify writeback init helpers Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 3/7] drm: writeback: Modify drm_writeback_queue_job helper Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 4/7] drm: writeback: Modify drm_writeback_signal_completion helper Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 5/7] drm: writeback: Modify drm_writeback_get_out_fence helper Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 6/7] drm: writeback: Modify prepare_writeback_job helper Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:03 ` [PATCH v5 7/7] drm: writeback: Modify cleanup_writeback_job helper Suraj Kandpal
2026-05-25  9:19   ` Claude review: " Claude Code Review Bot
2026-05-22  5:10 ` [PATCH v5 0/7] Refactor drm_writeback_connector structure Kandpal, Suraj
2026-05-25  9:19 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-21  5:37 [PATCH v4 " Suraj Kandpal
2026-05-25 10:57 ` 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-overall-20260522050313.1800378-1-suraj.kandpal@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