mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-14 18:36:34 +00:00
drm/amdkfd: Add Vega10 topology and device info
* Report 64-bit doorbells as HSA_CAP_DOORBELL_TYPE_2_0 in topology * Report cache information in topology (duplicates GFXv8 info for now) * Add device info for Vega10 support in KFD Raven is not enabled at this time as it needs additional changes in DQM to work with a single SDMA engine. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
parent
6106dce955
commit
389056e5fe
4 changed files with 55 additions and 0 deletions
|
|
@ -132,6 +132,9 @@ static struct kfd_gpu_cache_info carrizo_cache_info[] = {
|
||||||
#define fiji_cache_info carrizo_cache_info
|
#define fiji_cache_info carrizo_cache_info
|
||||||
#define polaris10_cache_info carrizo_cache_info
|
#define polaris10_cache_info carrizo_cache_info
|
||||||
#define polaris11_cache_info carrizo_cache_info
|
#define polaris11_cache_info carrizo_cache_info
|
||||||
|
/* TODO - check & update Vega10 cache details */
|
||||||
|
#define vega10_cache_info carrizo_cache_info
|
||||||
|
#define raven_cache_info carrizo_cache_info
|
||||||
|
|
||||||
static void kfd_populated_cu_info_cpu(struct kfd_topology_device *dev,
|
static void kfd_populated_cu_info_cpu(struct kfd_topology_device *dev,
|
||||||
struct crat_subtype_computeunit *cu)
|
struct crat_subtype_computeunit *cu)
|
||||||
|
|
@ -603,6 +606,14 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
|
||||||
pcache_info = polaris11_cache_info;
|
pcache_info = polaris11_cache_info;
|
||||||
num_of_cache_types = ARRAY_SIZE(polaris11_cache_info);
|
num_of_cache_types = ARRAY_SIZE(polaris11_cache_info);
|
||||||
break;
|
break;
|
||||||
|
case CHIP_VEGA10:
|
||||||
|
pcache_info = vega10_cache_info;
|
||||||
|
num_of_cache_types = ARRAY_SIZE(vega10_cache_info);
|
||||||
|
break;
|
||||||
|
case CHIP_RAVEN:
|
||||||
|
pcache_info = raven_cache_info;
|
||||||
|
num_of_cache_types = ARRAY_SIZE(raven_cache_info);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,34 @@ static const struct kfd_device_info polaris11_device_info = {
|
||||||
.needs_pci_atomics = true,
|
.needs_pci_atomics = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct kfd_device_info vega10_device_info = {
|
||||||
|
.asic_family = CHIP_VEGA10,
|
||||||
|
.max_pasid_bits = 16,
|
||||||
|
.max_no_of_hqd = 24,
|
||||||
|
.doorbell_size = 8,
|
||||||
|
.ih_ring_entry_size = 8 * sizeof(uint32_t),
|
||||||
|
.event_interrupt_class = &event_interrupt_class_v9,
|
||||||
|
.num_of_watch_points = 4,
|
||||||
|
.mqd_size_aligned = MQD_SIZE_ALIGNED,
|
||||||
|
.supports_cwsr = true,
|
||||||
|
.needs_iommu_device = false,
|
||||||
|
.needs_pci_atomics = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct kfd_device_info vega10_vf_device_info = {
|
||||||
|
.asic_family = CHIP_VEGA10,
|
||||||
|
.max_pasid_bits = 16,
|
||||||
|
.max_no_of_hqd = 24,
|
||||||
|
.doorbell_size = 8,
|
||||||
|
.ih_ring_entry_size = 8 * sizeof(uint32_t),
|
||||||
|
.event_interrupt_class = &event_interrupt_class_v9,
|
||||||
|
.num_of_watch_points = 4,
|
||||||
|
.mqd_size_aligned = MQD_SIZE_ALIGNED,
|
||||||
|
.supports_cwsr = true,
|
||||||
|
.needs_iommu_device = false,
|
||||||
|
.needs_pci_atomics = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct kfd_deviceid {
|
struct kfd_deviceid {
|
||||||
unsigned short did;
|
unsigned short did;
|
||||||
|
|
@ -261,6 +289,15 @@ static const struct kfd_deviceid supported_devices[] = {
|
||||||
{ 0x67EB, &polaris11_device_info }, /* Polaris11 */
|
{ 0x67EB, &polaris11_device_info }, /* Polaris11 */
|
||||||
{ 0x67EF, &polaris11_device_info }, /* Polaris11 */
|
{ 0x67EF, &polaris11_device_info }, /* Polaris11 */
|
||||||
{ 0x67FF, &polaris11_device_info }, /* Polaris11 */
|
{ 0x67FF, &polaris11_device_info }, /* Polaris11 */
|
||||||
|
{ 0x6860, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6861, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6862, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6863, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6864, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6867, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x6868, &vega10_device_info }, /* Vega10 */
|
||||||
|
{ 0x686C, &vega10_vf_device_info }, /* Vega10 vf*/
|
||||||
|
{ 0x687F, &vega10_device_info }, /* Vega10 */
|
||||||
};
|
};
|
||||||
|
|
||||||
static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
|
static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
|
||||||
|
|
|
||||||
|
|
@ -1239,6 +1239,12 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
|
||||||
HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &
|
HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &
|
||||||
HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK);
|
HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK);
|
||||||
break;
|
break;
|
||||||
|
case CHIP_VEGA10:
|
||||||
|
case CHIP_RAVEN:
|
||||||
|
dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_2_0 <<
|
||||||
|
HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &
|
||||||
|
HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARN(1, "Unexpected ASIC family %u",
|
WARN(1, "Unexpected ASIC family %u",
|
||||||
dev->gpu->device_info->asic_family);
|
dev->gpu->device_info->asic_family);
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
|
|
||||||
#define HSA_CAP_DOORBELL_TYPE_PRE_1_0 0x0
|
#define HSA_CAP_DOORBELL_TYPE_PRE_1_0 0x0
|
||||||
#define HSA_CAP_DOORBELL_TYPE_1_0 0x1
|
#define HSA_CAP_DOORBELL_TYPE_1_0 0x1
|
||||||
|
#define HSA_CAP_DOORBELL_TYPE_2_0 0x2
|
||||||
#define HSA_CAP_AQL_QUEUE_DOUBLE_MAP 0x00004000
|
#define HSA_CAP_AQL_QUEUE_DOUBLE_MAP 0x00004000
|
||||||
|
|
||||||
struct kfd_node_properties {
|
struct kfd_node_properties {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue