summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
diff options
context:
space:
mode:
authorYong Zhao2017-09-21 00:10:19 +0200
committerOded Gabbay2017-09-21 00:10:19 +0200
commite596b90338126d08a8d90f08e79bb644b8c9f2b6 (patch)
treec10151d1e2bd485199e886ad762a262a0c81276e /drivers/gpu/drm/amd/amdkfd/kfd_priv.h
parentdrm/amdkfd: Use VMID bitmap from KGD v2 (diff)
downloadkernel-qcow2-linux-e596b90338126d08a8d90f08e79bb644b8c9f2b6.tar.gz
kernel-qcow2-linux-e596b90338126d08a8d90f08e79bb644b8c9f2b6.tar.xz
kernel-qcow2-linux-e596b90338126d08a8d90f08e79bb644b8c9f2b6.zip
drm/amdkfd: Reuse CHIP_* from amdgpu v2
There are already CHIP_* definitions under amd_shared.h file on amdgpu side, so KFD should reuse them rather than defining new ones. Using enum for asic type requires default cases on switch statements to prevent compiler warnings. WARN on unsupported ASICs. It should never get there because KFD should not be initialized on unsupported devices. v2: Replace BUG() with WARN and error return Signed-off-by: Yong Zhao <Yong.Zhao@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.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.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index f0ca60f27d9a..5ebe565fecb3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -33,6 +33,8 @@
#include <linux/kfd_ioctl.h>
#include <kgd_kfd_interface.h>
+#include "amd_shared.h"
+
#define KFD_SYSFS_FILE_MODE 0444
#define KFD_MMAP_DOORBELL_MASK 0x8000000000000
@@ -112,11 +114,6 @@ enum cache_policy {
cache_policy_noncoherent
};
-enum asic_family_type {
- CHIP_KAVERI = 0,
- CHIP_CARRIZO
-};
-
struct kfd_event_interrupt_class {
bool (*interrupt_isr)(struct kfd_dev *dev,
const uint32_t *ih_ring_entry);
@@ -125,7 +122,7 @@ struct kfd_event_interrupt_class {
};
struct kfd_device_info {
- unsigned int asic_family;
+ enum amd_asic_type asic_family;
const struct kfd_event_interrupt_class *event_interrupt_class;
unsigned int max_pasid_bits;
unsigned int max_no_of_hqd;