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/panfrost: Check another bo field for cache option query
Date: Fri, 05 Jun 2026 06:16:23 +1000	[thread overview]
Message-ID: <review-patch1-20260604-claude-fixes-v2-1-57c6bd4c1655@collabora.com> (raw)
In-Reply-To: <20260604-claude-fixes-v2-1-57c6bd4c1655@collabora.com>

Patch Review

**Verdict: Correct fix, but commit message could be clearer.**

The existing code:
```c
if (!bo->base.map_wc)
    args->create_flags |= PANFROST_BO_WB_MMAP;
```

This is indeed wrong. Looking at the source tree, `map_wc` is set by `should_map_wc()` which returns `false` for both coherent devices (where WC is impossible) AND for `wb_mmap` BOs. So on a coherent device, `!map_wc` is always true, meaning every BO would erroneously report `PANFROST_BO_WB_MMAP`. The fix to use `bo->wb_mmap` directly is correct — it reflects the actual creation flag:

```c
if (bo->wb_mmap)
    args->create_flags |= PANFROST_BO_WB_MMAP;
```

**Nit:** The commit message says "is recorded in a Panfrost BO's wb_mmap field" but doesn't explain *why* `!map_wc` was wrong. On a coherent device, `map_wc` is always false (line 460 in `panfrost_gem.c`), so `!map_wc` is always true — the old code would report all BOs as `WB_MMAP` on coherent devices. Explaining this would help reviewers.

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-06-04 20:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 17:35 [PATCH v2 0/7] RPM, perfcnt and other minor fixes for Panfrost Adrián Larumbe
2026-06-04 17:35 ` [PATCH v2 1/7] drm/panfrost: Check another bo field for cache option query Adrián Larumbe
2026-06-04 17:57   ` Boris Brezillon
2026-06-04 20:16   ` Claude Code Review Bot [this message]
2026-06-04 17:35 ` [PATCH v2 2/7] drm/panfrost: Prevent division by 0 Adrián Larumbe
2026-06-04 17:44   ` sashiko-bot
2026-06-04 20:16     ` Claude review: " Claude Code Review Bot
2026-06-04 18:02   ` Boris Brezillon
2026-06-04 17:35 ` [PATCH v2 3/7] drm/panfrost: Move shrinker initialization and unplug one level down Adrián Larumbe
2026-06-04 18:04   ` Boris Brezillon
2026-06-04 20:16   ` Claude review: " Claude Code Review Bot
2026-06-04 17:35 ` [PATCH v2 4/7] drm/panfrost: Move perfcnt GPU disable sequence into a helper Adrián Larumbe
2026-06-04 17:47   ` sashiko-bot
2026-06-04 20:16     ` Claude review: " Claude Code Review Bot
2026-06-04 18:05   ` Boris Brezillon
2026-06-04 17:35 ` [PATCH v2 5/7] drm/panfrost: Make reset sequence deal with an active HWPerf session Adrián Larumbe
2026-06-04 17:49   ` sashiko-bot
2026-06-04 20:16     ` Claude review: " Claude Code Review Bot
2026-06-04 18:26   ` Boris Brezillon
2026-06-04 17:35 ` [PATCH v2 6/7] drm/panfrost: Fix PM usage_count mishandling Adrián Larumbe
2026-06-04 17:50   ` sashiko-bot
2026-06-04 20:16     ` Claude review: " Claude Code Review Bot
2026-06-04 18:36   ` Boris Brezillon
2026-06-04 17:35 ` [PATCH v2 7/7] drm/panfrost: Explicitly enable MMU interrupts at device init Adrián Larumbe
2026-06-04 17:55   ` sashiko-bot
2026-06-04 20:16   ` Claude review: " Claude Code Review Bot
2026-06-04 20:16 ` Claude review: RPM, perfcnt and other minor fixes for Panfrost Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-25 23:03 [PATCH 0/4] RPM, percnt " Adrián Larumbe
2026-05-25 23:03 ` [PATCH 1/4] drm/panfrost: Check another bo field for cache option query Adrián Larumbe
2026-05-27  5:22   ` 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-patch1-20260604-claude-fixes-v2-1-57c6bd4c1655@collabora.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