Lines Matching refs:irq
65 adev->irq.ih.enabled = true; in tonga_ih_enable_interrupts()
85 adev->irq.ih.enabled = false; in tonga_ih_disable_interrupts()
86 adev->irq.ih.rptr = 0; in tonga_ih_disable_interrupts()
122 if (adev->irq.ih.use_bus_addr) in tonga_ih_irq_init()
123 WREG32(mmIH_RB_BASE, adev->irq.ih.rb_dma_addr >> 8); in tonga_ih_irq_init()
125 WREG32(mmIH_RB_BASE, adev->irq.ih.gpu_addr >> 8); in tonga_ih_irq_init()
127 rb_bufsz = order_base_2(adev->irq.ih.ring_size / 4); in tonga_ih_irq_init()
134 if (adev->irq.msi_enabled) in tonga_ih_irq_init()
140 if (adev->irq.ih.use_bus_addr) in tonga_ih_irq_init()
141 wptr_off = adev->irq.ih.rb_dma_addr + (adev->irq.ih.wptr_offs * 4); in tonga_ih_irq_init()
143 wptr_off = adev->wb.gpu_addr + (adev->irq.ih.wptr_offs * 4); in tonga_ih_irq_init()
152 if (adev->irq.ih.use_doorbell) { in tonga_ih_irq_init()
154 OFFSET, adev->irq.ih.doorbell_index); in tonga_ih_irq_init()
201 if (adev->irq.ih.use_bus_addr) in tonga_ih_get_wptr()
202 wptr = le32_to_cpu(adev->irq.ih.ring[adev->irq.ih.wptr_offs]); in tonga_ih_get_wptr()
204 wptr = le32_to_cpu(adev->wb.wb[adev->irq.ih.wptr_offs]); in tonga_ih_get_wptr()
213 wptr, adev->irq.ih.rptr, (wptr + 16) & adev->irq.ih.ptr_mask); in tonga_ih_get_wptr()
214 adev->irq.ih.rptr = (wptr + 16) & adev->irq.ih.ptr_mask; in tonga_ih_get_wptr()
219 return (wptr & adev->irq.ih.ptr_mask); in tonga_ih_get_wptr()
234 u32 ring_index = adev->irq.ih.rptr >> 2; in tonga_ih_decode_iv()
237 dw[0] = le32_to_cpu(adev->irq.ih.ring[ring_index + 0]); in tonga_ih_decode_iv()
238 dw[1] = le32_to_cpu(adev->irq.ih.ring[ring_index + 1]); in tonga_ih_decode_iv()
239 dw[2] = le32_to_cpu(adev->irq.ih.ring[ring_index + 2]); in tonga_ih_decode_iv()
240 dw[3] = le32_to_cpu(adev->irq.ih.ring[ring_index + 3]); in tonga_ih_decode_iv()
249 adev->irq.ih.rptr += 16; in tonga_ih_decode_iv()
261 if (adev->irq.ih.use_doorbell) { in tonga_ih_set_rptr()
263 if (adev->irq.ih.use_bus_addr) in tonga_ih_set_rptr()
264 adev->irq.ih.ring[adev->irq.ih.rptr_offs] = adev->irq.ih.rptr; in tonga_ih_set_rptr()
266 adev->wb.wb[adev->irq.ih.rptr_offs] = adev->irq.ih.rptr; in tonga_ih_set_rptr()
267 WDOORBELL32(adev->irq.ih.doorbell_index, adev->irq.ih.rptr); in tonga_ih_set_rptr()
269 WREG32(mmIH_RB_RPTR, adev->irq.ih.rptr); in tonga_ih_set_rptr()
290 adev->irq.ih.use_doorbell = true; in tonga_ih_sw_init()
291 adev->irq.ih.doorbell_index = AMDGPU_DOORBELL_IH; in tonga_ih_sw_init()
470 if (adev->irq.ih_funcs == NULL) in tonga_ih_set_interrupt_funcs()
471 adev->irq.ih_funcs = &tonga_ih_funcs; in tonga_ih_set_interrupt_funcs()