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: Wed, 27 May 2026 15:22:49 +1000 [thread overview]
Message-ID: <review-patch1-20260526-claude-fixes-v1-1-16e92eaa4949@collabora.com> (raw)
In-Reply-To: <20260526-claude-fixes-v1-1-16e92eaa4949@collabora.com>
Patch Review
**Status: Looks correct, good fix.**
The change in `panfrost_drv.c`:
```c
- if (!bo->base.map_wc)
+ if (bo->wb_mmap)
```
The old code infers WB_MMAP by checking `!map_wc`. But `map_wc` is derived from *two* inputs, as seen in `panfrost_gem.c:should_map_wc()`:
```c
if (pfdev->coherent)
return false;
if (bo->wb_mmap)
return false;
return true;
```
On a coherent device, `map_wc` is always `false` regardless of `wb_mmap`. So `!bo->base.map_wc` would be `true` for *every* BO on a coherent device, incorrectly reporting `PANFROST_BO_WB_MMAP` for BOs that were never created with that flag. The fix to check `bo->wb_mmap` directly is the right thing to do -- it queries the user's original intent rather than a derived value.
**Minor**: The commit message could be clearer about *why* `map_wc` is wrong -- specifically mentioning the coherent-device case would help reviewers understand the concrete bug.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 5:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 23:03 [PATCH 0/4] RPM, percnt and other minor fixes for Panfrost 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 Code Review Bot [this message]
2026-05-25 23:03 ` [PATCH 2/4] drm/panfrost: Make reset sequence deal with an active HWPerf session Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-25 23:03 ` [PATCH 3/4] drm/panfrost: Prevent division by 0 Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-25 23:03 ` [PATCH 4/4] drm/panfrost: Fix RPM so device suspends when no jobs are in flight Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-27 5:22 ` Claude review: RPM, percnt and other minor fixes for Panfrost 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-20260526-claude-fixes-v1-1-16e92eaa4949@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