Commit d74c5b06 authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amdgpu: define ring structure to access rptr/wptr/fence

Define ring structure to access the cpu/gpu address of rptr/wptr/fence
instead of dynamic calculation.
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c6abbcbc
...@@ -230,6 +230,8 @@ struct amdgpu_ring { ...@@ -230,6 +230,8 @@ struct amdgpu_ring {
struct amdgpu_bo *ring_obj; struct amdgpu_bo *ring_obj;
volatile uint32_t *ring; volatile uint32_t *ring;
unsigned rptr_offs; unsigned rptr_offs;
u64 rptr_gpu_addr;
volatile u32 *rptr_cpu_addr;
u64 wptr; u64 wptr;
u64 wptr_old; u64 wptr_old;
unsigned ring_size; unsigned ring_size;
...@@ -250,7 +252,11 @@ struct amdgpu_ring { ...@@ -250,7 +252,11 @@ struct amdgpu_ring {
bool use_doorbell; bool use_doorbell;
bool use_pollmem; bool use_pollmem;
unsigned wptr_offs; unsigned wptr_offs;
u64 wptr_gpu_addr;
volatile u32 *wptr_cpu_addr;
unsigned fence_offs; unsigned fence_offs;
u64 fence_gpu_addr;
volatile u32 *fence_cpu_addr;
uint64_t current_ctx; uint64_t current_ctx;
char name[16]; char name[16];
u32 trail_seq; u32 trail_seq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment