Lines Matching refs:ih

67 	adev->irq.ih.enabled = true;  in tonga_ih_enable_interrupts()
87 adev->irq.ih.enabled = false; in tonga_ih_disable_interrupts()
88 adev->irq.ih.rptr = 0; in tonga_ih_disable_interrupts()
105 struct amdgpu_ih_ring *ih = &adev->irq.ih; in tonga_ih_irq_init() local
123 WREG32(mmIH_RB_BASE, ih->gpu_addr >> 8); in tonga_ih_irq_init()
125 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in tonga_ih_irq_init()
138 WREG32(mmIH_RB_WPTR_ADDR_LO, lower_32_bits(ih->wptr_addr)); in tonga_ih_irq_init()
139 WREG32(mmIH_RB_WPTR_ADDR_HI, upper_32_bits(ih->wptr_addr) & 0xFF); in tonga_ih_irq_init()
146 if (adev->irq.ih.use_doorbell) { in tonga_ih_irq_init()
148 OFFSET, adev->irq.ih.doorbell_index); in tonga_ih_irq_init()
192 struct amdgpu_ih_ring *ih) in tonga_ih_get_wptr() argument
196 wptr = le32_to_cpu(*ih->wptr_cpu); in tonga_ih_get_wptr()
205 wptr, ih->rptr, (wptr + 16) & ih->ptr_mask); in tonga_ih_get_wptr()
206 ih->rptr = (wptr + 16) & ih->ptr_mask; in tonga_ih_get_wptr()
211 return (wptr & ih->ptr_mask); in tonga_ih_get_wptr()
223 struct amdgpu_ih_ring *ih, in tonga_ih_decode_iv() argument
227 u32 ring_index = ih->rptr >> 2; in tonga_ih_decode_iv()
230 dw[0] = le32_to_cpu(ih->ring[ring_index + 0]); in tonga_ih_decode_iv()
231 dw[1] = le32_to_cpu(ih->ring[ring_index + 1]); in tonga_ih_decode_iv()
232 dw[2] = le32_to_cpu(ih->ring[ring_index + 2]); in tonga_ih_decode_iv()
233 dw[3] = le32_to_cpu(ih->ring[ring_index + 3]); in tonga_ih_decode_iv()
243 ih->rptr += 16; in tonga_ih_decode_iv()
254 struct amdgpu_ih_ring *ih) in tonga_ih_set_rptr() argument
256 if (ih->use_doorbell) { in tonga_ih_set_rptr()
258 *ih->rptr_cpu = ih->rptr; in tonga_ih_set_rptr()
259 WDOORBELL32(ih->doorbell_index, ih->rptr); in tonga_ih_set_rptr()
261 WREG32(mmIH_RB_RPTR, ih->rptr); in tonga_ih_set_rptr()
284 r = amdgpu_ih_ring_init(adev, &adev->irq.ih, 64 * 1024, true); in tonga_ih_sw_init()
288 adev->irq.ih.use_doorbell = true; in tonga_ih_sw_init()
289 adev->irq.ih.doorbell_index = adev->doorbell_index.ih; in tonga_ih_sw_init()
301 amdgpu_ih_ring_fini(adev, &adev->irq.ih); in tonga_ih_sw_fini()