[RFC PATCH v2 4/5] drm/amdgpu: make ring rptr_cpu_addr and wptr_cpu_addr typeless
From: Runyu Xiao
Date: Thu Jul 16 2026 - 23:36:28 EST
Now that all ring writeback slot accesses go through typed helper
wrappers, the stored CPU pointers no longer need to pretend that every
slot is a u32-based carrier.
Change rptr_cpu_addr and wptr_cpu_addr in struct amdgpu_ring from u32 *
to void *. The actual access width is now chosen at the call sites
through the typed 32-bit and 64-bit helpers, which better matches how
the writeback slots are used across different ring implementations.
This patch just removes the misleading static type from struct
amdgpu_ring after the call site conversions. No functional change is
intended.
Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 82c6bc782..ced27dd11 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -316,7 +316,7 @@ struct amdgpu_ring {
bool reemit;
unsigned rptr_offs;
u64 rptr_gpu_addr;
- u32 *rptr_cpu_addr;
+ void *rptr_cpu_addr;
/**
* @wptr:
@@ -396,7 +396,7 @@ struct amdgpu_ring {
* This is the CPU address pointer in the writeback slot. This is used
* to commit changes to the GPU.
*/
- u32 *wptr_cpu_addr;
+ void *wptr_cpu_addr;
unsigned fence_offs;
u64 fence_gpu_addr;
u32 *fence_cpu_addr;
--
2.34.1