drm/panthor: Use a local iomem base for GPU registers
authorKarunika Choo <karunika.choo@arm.com>
Mon, 27 Apr 2026 15:59:31 +0000 (16:59 +0100)
committerLiviu Dudau <liviu.dudau@arm.com>
Thu, 30 Apr 2026 16:14:57 +0000 (17:14 +0100)
commit247ae9a8ab4d7ca347c1fa75163351f48231d1f1
treef8007825a7c35844a0f9788d1f228525eae088a0
parent77e5cc60fa172047ad3460f74db0699b3a7746f9
drm/panthor: Use a local iomem base for GPU registers

Add a GPU_CONTROL-local iomem pointer to struct panthor_gpu and use it
for GPU register accesses.

This limits GPU register accesses to the GPU block instead of using the
device-wide MMIO mapping directly. Interrupt register accesses continue
to use the IRQ-local base provided by the common IRQ helpers. Update
panthor_gpu_info_init() to also use a local iomem offset for GPU
features and capability.

This is a refactoring only and does not change behaviour.

v3:
- Pick up R-bs from Liviu and Steve
v2:
- Update panthor_gpu_info_init() to use block-local iomem pointer.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Karunika Choo <karunika.choo@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260427155934.416502-6-karunika.choo@arm.com
drivers/gpu/drm/panthor/panthor_gpu.c
drivers/gpu/drm/panthor/panthor_gpu_regs.h
drivers/gpu/drm/panthor/panthor_hw.c