summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
diff options
context:
space:
mode:
authorAndres Rodriguez <andres.rodriguez@amd.com>2017-10-28 02:35:31 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2017-10-28 02:35:31 +0300
commit04ad47bd14a0f7a268124c4fc468e964e457a702 (patch)
treee523b60f027638ac52d3a59d0731c783c3a78fa7 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h
parent7e86a365a8319970e002f83c73701a86d95a69e6 (diff)
downloadlinux-04ad47bd14a0f7a268124c4fc468e964e457a702.tar.xz
drm/amdkfd: use standard kernel kfifo for IH
Replace our implementation of a lockless ring buffer with the standard linux kernel kfifo. We shouldn't maintain our own version of a standard data structure. Signed-off-by: Andres Rodriguez <andres.rodriguez@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_priv.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_priv.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index ba26da81d8ec..0aec5ca8a964 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -32,6 +32,7 @@
#include <linux/spinlock.h>
#include <linux/kfd_ioctl.h>
#include <linux/idr.h>
+#include <linux/kfifo.h>
#include <kgd_kfd_interface.h>
#include "amd_shared.h"
@@ -182,10 +183,7 @@ struct kfd_dev {
unsigned int gtt_sa_num_of_chunks;
/* Interrupts */
- void *interrupt_ring;
- size_t interrupt_ring_size;
- atomic_t interrupt_ring_rptr;
- atomic_t interrupt_ring_wptr;
+ struct kfifo ih_fifo;
struct work_struct interrupt_work;
spinlock_t interrupt_lock;