@@ -73,6 +73,7 @@
#define CP_PQ_WPTR_POLL_CNTL 0xC20C
#define WPTR_POLL_EN (1 << 31)
+#define CPC_INT_CNTL 0xC2D0
#define CP_ME1_PIPE0_INT_CNTL 0xC214
#define CP_ME1_PIPE1_INT_CNTL 0xC218
#define CP_ME1_PIPE2_INT_CNTL 0xC21C
@@ -127,6 +127,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
radeon_kfd_doorbell_init(kfd);
+ if (radeon_kfd_interrupt_init(kfd))
+ return false;
+
if (!device_iommu_pasid_init(kfd))
return false;
@@ -155,10 +158,13 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd)
BUG_ON(err != 0);
- if (kfd->init_complete) {
+ if (kfd->init_complete)
kfd->device_info->scheduler_class->stop(kfd->scheduler);
- kfd->device_info->scheduler_class->destroy(kfd->scheduler);
+ radeon_kfd_interrupt_exit(kfd);
+
+ if (kfd->init_complete) {
+ kfd->device_info->scheduler_class->destroy(kfd->scheduler);
amd_iommu_free_device(kfd->pdev);
}
This patch add calls to initialize and finalize the KFD interrupt module. The calls are done per device initialize/finalize inside the kgd-->kfd interface. Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> --- drivers/gpu/hsa/radeon/cik_regs.h | 1 + drivers/gpu/hsa/radeon/kfd_device.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)