Commit 06e75b88 authored by Tao Zhou's avatar Tao Zhou Committed by Alex Deucher

drm/amdkfd: enable cyan_skillfish KFD

Add KFD support for cyan_skillfish.

v2: whitespace fixes (Alex)
Signed-off-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d9393f9b
...@@ -1404,6 +1404,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev, ...@@ -1404,6 +1404,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
break; break;
case CHIP_NAVI10: case CHIP_NAVI10:
case CHIP_NAVI12: case CHIP_NAVI12:
case CHIP_CYAN_SKILLFISH:
pcache_info = navi10_cache_info; pcache_info = navi10_cache_info;
num_of_cache_types = ARRAY_SIZE(navi10_cache_info); num_of_cache_types = ARRAY_SIZE(navi10_cache_info);
break; break;
......
...@@ -84,6 +84,7 @@ static const struct kfd2kgd_calls *kfd2kgd_funcs[] = { ...@@ -84,6 +84,7 @@ static const struct kfd2kgd_calls *kfd2kgd_funcs[] = {
[CHIP_DIMGREY_CAVEFISH] = &gfx_v10_3_kfd2kgd, [CHIP_DIMGREY_CAVEFISH] = &gfx_v10_3_kfd2kgd,
[CHIP_BEIGE_GOBY] = &gfx_v10_3_kfd2kgd, [CHIP_BEIGE_GOBY] = &gfx_v10_3_kfd2kgd,
[CHIP_YELLOW_CARP] = &gfx_v10_3_kfd2kgd, [CHIP_YELLOW_CARP] = &gfx_v10_3_kfd2kgd,
[CHIP_CYAN_SKILLFISH] = &gfx_v10_kfd2kgd,
}; };
#ifdef KFD_SUPPORT_IOMMU_V2 #ifdef KFD_SUPPORT_IOMMU_V2
...@@ -596,6 +597,24 @@ static const struct kfd_device_info yellow_carp_device_info = { ...@@ -596,6 +597,24 @@ static const struct kfd_device_info yellow_carp_device_info = {
.num_sdma_queues_per_engine = 2, .num_sdma_queues_per_engine = 2,
}; };
static const struct kfd_device_info cyan_skillfish_device_info = {
.asic_family = CHIP_CYAN_SKILLFISH,
.asic_name = "cyan_skillfish",
.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,
.needs_iommu_device = false,
.supports_cwsr = true,
.needs_pci_atomics = true,
.num_sdma_engines = 2,
.num_xgmi_sdma_engines = 0,
.num_sdma_queues_per_engine = 8,
};
/* For each entry, [0] is regular and [1] is virtualisation device. */ /* For each entry, [0] is regular and [1] is virtualisation device. */
static const struct kfd_device_info *kfd_supported_devices[][2] = { static const struct kfd_device_info *kfd_supported_devices[][2] = {
#ifdef KFD_SUPPORT_IOMMU_V2 #ifdef KFD_SUPPORT_IOMMU_V2
...@@ -625,6 +644,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = { ...@@ -625,6 +644,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
[CHIP_DIMGREY_CAVEFISH] = {&dimgrey_cavefish_device_info, &dimgrey_cavefish_device_info}, [CHIP_DIMGREY_CAVEFISH] = {&dimgrey_cavefish_device_info, &dimgrey_cavefish_device_info},
[CHIP_BEIGE_GOBY] = {&beige_goby_device_info, &beige_goby_device_info}, [CHIP_BEIGE_GOBY] = {&beige_goby_device_info, &beige_goby_device_info},
[CHIP_YELLOW_CARP] = {&yellow_carp_device_info, NULL}, [CHIP_YELLOW_CARP] = {&yellow_carp_device_info, NULL},
[CHIP_CYAN_SKILLFISH] = {&cyan_skillfish_device_info, NULL},
}; };
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,
......
...@@ -1947,6 +1947,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev) ...@@ -1947,6 +1947,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP: case CHIP_YELLOW_CARP:
case CHIP_CYAN_SKILLFISH:
device_queue_manager_init_v10_navi10(&dqm->asic_ops); device_queue_manager_init_v10_navi10(&dqm->asic_ops);
break; break;
default: default:
......
...@@ -422,6 +422,7 @@ int kfd_init_apertures(struct kfd_process *process) ...@@ -422,6 +422,7 @@ int kfd_init_apertures(struct kfd_process *process)
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP: case CHIP_YELLOW_CARP:
case CHIP_CYAN_SKILLFISH:
kfd_init_apertures_v9(pdd, id); kfd_init_apertures_v9(pdd, id);
break; break;
default: default:
......
...@@ -251,6 +251,7 @@ int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm) ...@@ -251,6 +251,7 @@ int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm)
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP: case CHIP_YELLOW_CARP:
case CHIP_CYAN_SKILLFISH:
pm->pmf = &kfd_v9_pm_funcs; pm->pmf = &kfd_v9_pm_funcs;
break; break;
case CHIP_ALDEBARAN: case CHIP_ALDEBARAN:
......
...@@ -1424,6 +1424,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu) ...@@ -1424,6 +1424,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP: case CHIP_YELLOW_CARP:
case CHIP_CYAN_SKILLFISH:
dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_2_0 << dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_2_0 <<
HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) & HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &
HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK); HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment