diff options
author | Ben Goz <ben.goz@amd.com> | 2015-01-01 10:10:01 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-01 10:10:01 -0500 |
commit | 0da7558c690708259617417d3ddc5b5042f1cca4 (patch) | |
tree | 422d8e12811fcabced2870c8d18982c2f0491f2e /drivers/gpu/drm/amd | |
parent | 85d258f9a7e827dc321d54d15ce1c6d5b0048a17 (diff) |
drm/amdkfd: Add asic property to kfd_device_info
This patch adds a new property to kfd_device_info structure. That structure
holds information that is H/W specific.
The new property is called asic_family and its purpose is to distinguish
between different asic families in amdkfd operations, mainly in QCM (queue
control & management)
This patch also adds a new enum, to select different ASICs. We set the current
kfd_device_info instance as Kaveri and create a new instance which describes
the new AMD APU, codenamed 'Carrizo'.
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 994a9c1bdd04..24b37ffad5c6 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c | |||
@@ -31,6 +31,14 @@ | |||
31 | #define MQD_SIZE_ALIGNED 768 | 31 | #define MQD_SIZE_ALIGNED 768 |
32 | 32 | ||
33 | static const struct kfd_device_info kaveri_device_info = { | 33 | static const struct kfd_device_info kaveri_device_info = { |
34 | .asic_family = CHIP_KAVERI, | ||
35 | .max_pasid_bits = 16, | ||
36 | .ih_ring_entry_size = 4 * sizeof(uint32_t), | ||
37 | .mqd_size_aligned = MQD_SIZE_ALIGNED | ||
38 | }; | ||
39 | |||
40 | static const struct kfd_device_info carrizo_device_info = { | ||
41 | .asic_family = CHIP_CARRIZO, | ||
34 | .max_pasid_bits = 16, | 42 | .max_pasid_bits = 16, |
35 | .ih_ring_entry_size = 4 * sizeof(uint32_t), | 43 | .ih_ring_entry_size = 4 * sizeof(uint32_t), |
36 | .num_of_watch_points = 4, | 44 | .num_of_watch_points = 4, |
@@ -65,7 +73,7 @@ static const struct kfd_deviceid supported_devices[] = { | |||
65 | { 0x1318, &kaveri_device_info }, /* Kaveri */ | 73 | { 0x1318, &kaveri_device_info }, /* Kaveri */ |
66 | { 0x131B, &kaveri_device_info }, /* Kaveri */ | 74 | { 0x131B, &kaveri_device_info }, /* Kaveri */ |
67 | { 0x131C, &kaveri_device_info }, /* Kaveri */ | 75 | { 0x131C, &kaveri_device_info }, /* Kaveri */ |
68 | { 0x131D, &kaveri_device_info }, /* Kaveri */ | 76 | { 0x131D, &kaveri_device_info } /* Kaveri */ |
69 | }; | 77 | }; |
70 | 78 | ||
71 | static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, | 79 | static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index a4e0ddd56778..872a1da4c02e 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |||
@@ -104,7 +104,13 @@ enum cache_policy { | |||
104 | cache_policy_noncoherent | 104 | cache_policy_noncoherent |
105 | }; | 105 | }; |
106 | 106 | ||
107 | enum asic_family_type { | ||
108 | CHIP_KAVERI = 0, | ||
109 | CHIP_CARRIZO | ||
110 | }; | ||
111 | |||
107 | struct kfd_device_info { | 112 | struct kfd_device_info { |
113 | unsigned int asic_family; | ||
108 | unsigned int max_pasid_bits; | 114 | unsigned int max_pasid_bits; |
109 | size_t ih_ring_entry_size; | 115 | size_t ih_ring_entry_size; |
110 | uint8_t num_of_watch_points; | 116 | uint8_t num_of_watch_points; |