Claude review: drm/panthor: Replace cross-component register accesses with helpers

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

Patch Review

**Issues found:**

1. **Typo in function names**: The new helper functions are misspelled:
```c
u64 panthor_gpu_get_timestap(struct panthor_device *ptdev);
u64 panthor_gpu_get_timestap_offset(struct panthor_device *ptdev);
```
Should be `panthor_gpu_get_timestamp` and `panthor_gpu_get_timestamp_offset`. This typo propagates through `panthor_gpu.h`, `panthor_gpu.c`, and `panthor_drv.c`.

2. **Stray backslash** in `panthor_fw.c` inside `panthor_fw_ring_csg_doorbells`:
```c
panthor_fw_toggle_reqs(glb_iface, doorbell_req, doorbell_ack, csg_mask);\
panthor_fw_ring_doorbell(ptdev, CSF_GLB_DOORBELL_ID);
```
The trailing `\` is a stray line-continuation character. While it compiles (the two statements are joined on one logical line, both terminated by `;`), it's clearly unintentional and should be removed.

3. **Incomplete cross-component cleanup**: `panthor_hw.c` still directly accesses `PWR_L2_PRESENT`, `PWR_TILER_PRESENT`, and `PWR_SHADER_PRESENT` via `ptdev->iomem`. Since this patch's stated goal is to replace cross-component register accesses with helpers, these should also be converted (e.g., by adding helpers in `panthor_pwr.c`). Failing to do so causes a **regression bug** when patch 6 makes PWR offsets relative (see patch 6 review below).

The `panthor_gpu_coherency_init` move from `panthor_device.c` to `panthor_gpu.c` is appropriate, and the call site at `panthor_device.c:290` will still work since `panthor_gpu.h` is already included.

---
Generated by Claude Code Patch Reviewer