ring->ring_size = roundup_pow_of_two(max_dw * 4 *
amdgpu_sched_hw_submission);
+ ring->buf_mask = (ring->ring_size / 4) - 1;
+ ring->ptr_mask = ring->funcs->support_64bit_ptrs ?
+ 0xffffffffffffffff : ring->buf_mask;
/* Allocate ring buffer */
if (ring->ring_obj == NULL) {
r = amdgpu_bo_create_kernel(adev, ring->ring_size, PAGE_SIZE,
}
amdgpu_ring_clear_ring(ring);
}
- ring->buf_mask = (ring->ring_size / 4) - 1;
- ring->ptr_mask = ring->funcs->support_64bit_ptrs ?
- 0xffffffffffffffff : ring->buf_mask;
ring->max_dw = max_dw;
static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
{
int i = 0;
- while (i <= ring->ptr_mask)
+ while (i <= ring->buf_mask)
ring->ring[i++] = ring->funcs->nop;
}