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/amdgpu/mes11: fix queue init wptr reset
Date: Thu, 04 Jun 2026 13:17:09 +1000	[thread overview]
Message-ID: <review-patch1-20260602050354.2237095-2-runyu.xiao@seu.edu.cn> (raw)
In-Reply-To: <20260602050354.2237095-2-runyu.xiao@seu.edu.cn>

Patch Review

**The change:**
```c
-		*(ring->wptr_cpu_addr) = 0;
+		atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
```

At `mes_v11_0.c:1311`, in the reset/suspend path of `mes_v11_0_queue_init()`.

**Correctness:** The fix is correct. The normal writer `mes_v11_0_ring_set_wptr()` (line 79) uses `atomic64_set((atomic64_t *)ring->wptr_cpu_addr, ring->wptr)`, and the reader `mes_v11_0_ring_get_wptr()` (line 97) uses `atomic64_read((atomic64_t *)ring->wptr_cpu_addr)`. Using `atomic64_set()` in the reset path makes the reset consistent with these accessors.

**Fixes tag:** `Fixes: d81d75c99936 ("drm/amdgpu/gfx11: enable kiq to map mes ring")` — this identifies when the queue_init code with the plain store was introduced, which seems reasonable.

**Minor note:** The adjacent `*(ring->rptr_cpu_addr) = 0` is left as a 32-bit store, but this is fine because `mes_v11_0_ring_get_rptr()` (line 89) reads rptr via `return *ring->rptr_cpu_addr` — also a 32-bit access — so the rptr path is internally consistent at 32 bits.

**No issues with this patch.**

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-06-04  3:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02  5:03 [PATCH 0/2] drm/amdgpu: fix MES queue init wptr reset on atomic64 carriers Runyu Xiao
2026-06-02  5:03 ` [PATCH 1/2] drm/amdgpu/mes11: fix queue init wptr reset Runyu Xiao
2026-06-02  9:49   ` Christian König
2026-06-02 10:53     ` 肖润宇
2026-06-02 11:19       ` Christian König
2026-06-02 12:03         ` Runyu Xiao
2026-06-03  9:00         ` Runyu Xiao
2026-06-04  3:17   ` Claude Code Review Bot [this message]
2026-06-02  5:03 ` [PATCH 2/2] drm/amdgpu/mes12: " Runyu Xiao
2026-06-04  3:17   ` Claude review: " Claude Code Review Bot
2026-06-04  3:17 ` Claude review: drm/amdgpu: fix MES queue init wptr reset on atomic64 carriers 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-20260602050354.2237095-2-runyu.xiao@seu.edu.cn \
    --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