aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorKen Wang <Qingqing.Wang@amd.com>2016-03-11 20:32:30 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:53:35 -0400
commit536fbf946cf84ff60cdef471c23ab96058e62f39 (patch)
treec0bfe185e68c9dfb00c3ac9ade96b9e5f1541c31 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parent8fe733289bc00914e9ace101088857cda20a1c51 (diff)
drm/amdgpu: change wptr to 64 bits (v2)
Newer asics need 64 bit wptrs. If the wptr is now smaller than the rptr that doesn't indicate a wrap-around anymore. v2: integrate Christian's comments. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index da702dc6e2e5..dada0a022bed 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -96,10 +96,11 @@ struct amdgpu_ring_funcs {
96 enum amdgpu_ring_type type; 96 enum amdgpu_ring_type type;
97 uint32_t align_mask; 97 uint32_t align_mask;
98 u32 nop; 98 u32 nop;
99 bool support_64bit_ptrs;
99 100
100 /* ring read/write ptr handling */ 101 /* ring read/write ptr handling */
101 u32 (*get_rptr)(struct amdgpu_ring *ring); 102 u64 (*get_rptr)(struct amdgpu_ring *ring);
102 u32 (*get_wptr)(struct amdgpu_ring *ring); 103 u64 (*get_wptr)(struct amdgpu_ring *ring);
103 void (*set_wptr)(struct amdgpu_ring *ring); 104 void (*set_wptr)(struct amdgpu_ring *ring);
104 /* validating and patching of IBs */ 105 /* validating and patching of IBs */
105 int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx); 106 int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx);
@@ -148,13 +149,14 @@ struct amdgpu_ring {
148 struct amdgpu_bo *ring_obj; 149 struct amdgpu_bo *ring_obj;
149 volatile uint32_t *ring; 150 volatile uint32_t *ring;
150 unsigned rptr_offs; 151 unsigned rptr_offs;
151 unsigned wptr; 152 u64 wptr;
152 unsigned wptr_old; 153 u64 wptr_old;
153 unsigned ring_size; 154 unsigned ring_size;
154 unsigned max_dw; 155 unsigned max_dw;
155 int count_dw; 156 int count_dw;
156 uint64_t gpu_addr; 157 uint64_t gpu_addr;
157 uint32_t ptr_mask; 158 uint64_t ptr_mask;
159 uint32_t buf_mask;
158 bool ready; 160 bool ready;
159 u32 idx; 161 u32 idx;
160 u32 me; 162 u32 me;