amdkfd: Add interrupt handling module
authorAndrew Lewycky <Andrew.Lewycky@amd.com>
Wed, 16 Jul 2014 22:37:30 +0000 (01:37 +0300)
committerOded Gabbay <oded.gabbay@amd.com>
Wed, 16 Jul 2014 22:37:30 +0000 (01:37 +0300)
commitb3f5e6b4412e69ebd7094c51aa345188a30a5cbe
tree7179f70691224e8c26c542794a5b40a5a234526b
parent64c7f8cf792776aaca036fb983006b6b21204934
amdkfd: Add interrupt handling module

This patch adds the interrupt handling module, in kfd_interrupt.c, and its
related members in different data structures to the amdkfd driver.

The amdkfd interrupt module maintains an internal interrupt ring per amdkfd
device. The internal interrupt ring contains interrupts that needs further
handling. The extra handling is deferred to a later time through a workqueue.

There's no acknowledgment for the interrupts we use. The hardware simply queues
a new interrupt each time without waiting.

The fixed-size internal queue means that it's possible for us to lose
interrupts because we have no back-pressure to the hardware.

v3:

Move amdkfd from drm/radeon/ to drm/amd/
Change device init
Made sure spin lock is taken only if init is complete
Moved bool field to the end of the structure

Signed-off-by: Andrew Lewycky <Andrew.Lewycky@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
drivers/gpu/drm/amd/amdkfd/Makefile
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdkfd/kfd_priv.h