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: gpu: nova-core: gsp: make `Cmdq` a pinned type
Date: Fri, 27 Feb 2026 13:18:04 +1000	[thread overview]
Message-ID: <review-patch3-20260225-cmdq-locking-v1-3-bbf6b4156706@nvidia.com> (raw)
In-Reply-To: <20260225-cmdq-locking-v1-3-bbf6b4156706@nvidia.com>

Patch Review

Mechanical change to prepare for `Mutex` in patch 4.

**`#[pin_data]` annotation added:**
```rust
+#[pin_data]
 pub(crate) struct Cmdq {
```

**Constructor returns `PinInit` instead of `Result<Cmdq>`:**
```rust
-    pub(crate) fn new(dev: &device::Device<device::Bound>) -> Result<Cmdq> {
-        let gsp_mem = DmaGspMem::new(dev)?;
-        Ok(Cmdq {
+    pub(crate) fn new(dev: &device::Device<device::Bound>) -> impl PinInit<Self, Error> + '_ {
+        try_pin_init!(Self {
+            gsp_mem: DmaGspMem::new(dev)?,
             dev: dev.into(),
             seq: 0,
-            gsp_mem,
         })
```

**Parent struct uses pin-init syntax:**
```rust
-                cmdq: Cmdq::new(dev)?,
+                cmdq <- Cmdq::new(dev),
```

**Reference update for `GspArgumentsCached::new`:**
```rust
-                    dma_write!(rmargs[0].inner = fw::GspArgumentsCached::new(cmdq))?;
+                    dma_write!(rmargs[0].inner = fw::GspArgumentsCached::new(&cmdq))?;
```
Correct — after pin-init, `cmdq` is accessed by reference via the pin projection, so the explicit `&` is needed.

Straightforward and correct. **Reviewed-by worthy.**

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-02-27  3:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 13:41 [PATCH 0/4] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-02-25 13:41 ` [PATCH 1/4] gpu: nova-core: gsp: fix stale doc comments on command queue methods Eliot Courtney
2026-02-25 19:42   ` Zhi Wang
2026-02-27  3:18   ` Claude review: " Claude Code Review Bot
2026-02-25 13:41 ` [PATCH 2/4] gpu: nova-core: gsp: add sync and async command queue API to `Cmdq` Eliot Courtney
2026-02-25 19:42   ` Zhi Wang
2026-02-26  0:42     ` Eliot Courtney
2026-02-27  3:18   ` Claude review: " Claude Code Review Bot
2026-02-25 13:41 ` [PATCH 3/4] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-02-25 19:43   ` Zhi Wang
2026-02-27  3:18   ` Claude Code Review Bot [this message]
2026-02-25 13:41 ` [PATCH 4/4] gpu: nova-core: gsp: add mutex locking to Cmdq Eliot Courtney
2026-02-25 19:48   ` Zhi Wang
2026-02-27  3:18   ` Claude review: " Claude Code Review Bot
2026-02-27  3:18 ` Claude review: gpu: nova-core: gsp: add " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-02-26 14:50 [PATCH v2 0/4] " Eliot Courtney
2026-02-26 14:50 ` [PATCH v2 3/4] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-02-27  2:04   ` Claude review: " Claude Code Review Bot
2026-03-04  2:46 [PATCH v3 0/5] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-03-04  2:46 ` [PATCH v3 4/5] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-03-05  3:53   ` Claude review: " Claude Code Review Bot
2026-03-10  8:09 [PATCH v4 0/5] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-03-10  8:09 ` [PATCH v4 4/5] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-03-11  3:32   ` 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-patch3-20260225-cmdq-locking-v1-3-bbf6b4156706@nvidia.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