Claude review: drm/panthor: Localize register access by component

Claude Code Review Bot
2026-04-11T23:38:14Z

Overall Series Review

Subject: drm/panthor: Localize register access by component
Author: Karunika Choo <karunika.choo@arm.com>
Patches: 17
Reviewed: 2026-04-12T09:38:14.741274

---

This 8-patch series refactors the panthor GPU driver to use per-component `iomem` base pointers instead of routing all register accesses through the global `ptdev->iomem`. The goal is sound: scoping register accesses to the component that owns them makes the driver layout cleaner and prevents accidental cross-component register access.

The approach is well-structured, proceeding in logical stages: first make helpers take `iomem` pointers, then split register headers, then introduce helpers to eliminate cross-component accesses, then make each component use a local base.

However, **there are several issues that need to be addressed before merging**:

1. **Regression bug in `panthor_hw.c`**: Patch 6 changes PWR register offsets from absolute to relative, but `panthor_hw.c` still reads `PWR_L2_PRESENT`, `PWR_TILER_PRESENT`, and `PWR_SHADER_PRESENT` via `ptdev->iomem` with the now-relative offsets, causing reads from completely wrong register addresses.
2. **Bisection break between patches 4 and 5**: Patch 4 references `GPU_CONTROL_BASE` which is not defined until patch 5.
3. **Typo in function names**: `panthor_gpu_get_timestap` (patch 3) -- missing the second "m" in "timestamp".
4. **Stray backslash**: Trailing `\` in patch 3's `panthor_fw_ring_csg_doorbells`.

---

---
Generated by Claude Code Patch Reviewer