amd/amdkfd: Add ASIC ARCTURUS to kfd
authorYong Zhao <Yong.Zhao@amd.com>
Tue, 9 Jul 2019 14:37:04 +0000 (09:37 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jul 2019 19:18:03 +0000 (14:18 -0500)
Add initial support for ARCTURUS to kfd.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index 9fa4f25a3745ad9889a87afe704dda1d0577b960..af6b1eae94c1ac03628f2499bfdc93d4742a882c 100644 (file)
@@ -85,6 +85,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
        case CHIP_VEGA12:
        case CHIP_VEGA20:
        case CHIP_RAVEN:
+       case CHIP_ARCTURUS:
                kfd2kgd = amdgpu_amdkfd_gfx_9_0_get_functions();
                break;
        case CHIP_NAVI10:
index 7923714421955a9cce8e57d9745518ecac50f55e..b30ccbfeb648337a112de28143b4955b5a7fad26 100644 (file)
@@ -662,6 +662,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
        case CHIP_VEGA10:
        case CHIP_VEGA12:
        case CHIP_VEGA20:
+       case CHIP_ARCTURUS:
                pcache_info = vega10_cache_info;
                num_of_cache_types = ARRAY_SIZE(vega10_cache_info);
                break;
index 3322a443dfb233f7a1786bb754ee54a2245e3d8b..81602fb89d875ece86ab5215b06e3f50c556a090 100644 (file)
@@ -317,6 +317,22 @@ static const struct kfd_device_info vega20_device_info = {
        .num_sdma_queues_per_engine = 8,
 };
 
+static const struct kfd_device_info arcturus_device_info = {
+       .asic_family = CHIP_ARCTURUS,
+       .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,
+       .num_sdma_engines = 2,
+       .num_sdma_queues_per_engine = 8,
+};
+
 static const struct kfd_device_info navi10_device_info = {
        .asic_family = CHIP_NAVI10,
        .max_pasid_bits = 16,
index e6a4288bfaa6ab5824ca672653875c49144be803..d7794c8dc9cceddac9e581a09ed2873b7e059c54 100644 (file)
@@ -1786,6 +1786,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)
        case CHIP_VEGA12:
        case CHIP_VEGA20:
        case CHIP_RAVEN:
+       case CHIP_ARCTURUS:
                device_queue_manager_init_v9(&dqm->asic_ops);
                break;
        case CHIP_NAVI10:
index 60521366dd3117d71db620d0692b773bfacd4958..9dc4bff8085e21e0e6b1b19bf38d263fc4b42eb9 100644 (file)
@@ -405,6 +405,7 @@ int kfd_init_apertures(struct kfd_process *process)
                        case CHIP_VEGA12:
                        case CHIP_VEGA20:
                        case CHIP_RAVEN:
+                       case CHIP_ARCTURUS:
                        case CHIP_NAVI10:
                                kfd_init_apertures_v9(pdd, id);
                                break;
index 29c0bd2d7a5ca67f316cf39fd966c8adee5e1483..8b4564f71a7a56c11f33d61509b3cb27880c8d69 100644 (file)
@@ -330,6 +330,7 @@ struct kernel_queue *kernel_queue_init(struct kfd_dev *dev,
        case CHIP_VEGA12:
        case CHIP_VEGA20:
        case CHIP_RAVEN:
+       case CHIP_ARCTURUS:
                kernel_queue_init_v9(&kq->ops_asic_specific);
                break;
        case CHIP_NAVI10:
index ccf6b2310316e563fce4086e5c8d865b3d23a240..2c8624c5b42c136002da2e56f71ba8b9cdc4519d 100644 (file)
@@ -239,6 +239,7 @@ int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm)
        case CHIP_VEGA12:
        case CHIP_VEGA20:
        case CHIP_RAVEN:
+       case CHIP_ARCTURUS:
                pm->pmf = &kfd_v9_pm_funcs;
                break;
        case CHIP_NAVI10:
index c2e6e47abaf20d1e76e079d7ca0beddabaebb70e..36fa98fe858bc0c02e66840eee6e9fcbd43b121c 100644 (file)
@@ -1321,6 +1321,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
        case CHIP_VEGA12:
        case CHIP_VEGA20:
        case CHIP_RAVEN:
+       case CHIP_ARCTURUS:
        case CHIP_NAVI10:
                dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_2_0 <<
                        HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &