Lines Matching refs:wptr
61 /* add 8 bytes for the rptr/wptr shadows and
124 /* add 8 bytes for the rptr/wptr shadows and
146 * Writes an IV to the ring buffer using the CPU and increment the wptr.
152 uint32_t wptr = le32_to_cpu(*ih->wptr_cpu) >> 2;
156 ih->ring[wptr++] = cpu_to_le32(iv[i]);
158 wptr <<= 2;
159 wptr &= ih->ptr_mask;
161 /* Only commit the new wptr if we don't overflow */
162 if (wptr != READ_ONCE(ih->rptr)) {
164 WRITE_ONCE(*ih->wptr_cpu, cpu_to_le32(wptr));
167 wptr, ih->rptr);
190 /* Order wptr with ring data. */
211 u32 wptr;
216 wptr = amdgpu_ih_get_wptr(adev, ih);
220 DRM_DEBUG("%s: rptr %d, wptr %d\n", __func__, ih->rptr, wptr);
222 /* Order reading of wptr vs. reading of IH ring data */
225 while (ih->rptr != wptr && --count) {
233 /* make sure wptr hasn't changed while processing */
234 wptr = amdgpu_ih_get_wptr(adev, ih);
235 if (wptr != ih->rptr)
256 /* wptr/rptr are in bytes! */
283 /* wptr/rptr are in bytes! */