Skip to contentSkip to conversation

drm/amdkfd: Add NAVI12 support from kfd side

PATCH In review Liu, Shaoyun 2 participants 4 messages Sep 24, 2019 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: Add NAVI12 support from kfd side

Add device info for both navi12 PF and VF

Change-Id Ifb4035e65c12d153fc30e593fe109f9c7e0541f4
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +19 -0
index f329b82..edfbae5c 100644
@@ -387,6 +387,24 @@ static const struct kfd_device_info navi10_device_info = {
 	.num_sdma_queues_per_engine = 8,
 };
 
+static const struct kfd_device_info navi12_device_info = {
+	.asic_family = CHIP_NAVI12,
+	.asic_name = "navi12",
+	.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 = false,
+	.num_sdma_engines = 2,
+	.num_xgmi_sdma_engines = 0,
+	.num_sdma_queues_per_engine = 8,
+};
+
 static const struct kfd_device_info navi14_device_info = {
 	.asic_family = CHIP_NAVI14,
 	.asic_name = "navi14",
@@ -425,6 +443,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
 	[CHIP_RENOIR] = {&renoir_device_info, NULL},
 	[CHIP_ARCTURUS] = {&arcturus_device_info, &arcturus_device_info},
 	[CHIP_NAVI10] = {&navi10_device_info, NULL},
+	[CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
 	[CHIP_NAVI14] = {&navi14_device_info, NULL},
 };
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1569363372-18620-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Make sure to push to the new 5.3 branch.

Yong

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Liu, Shaoyun <[email protected]>
Sent: Tuesday, September 24, 2019 6:16 PM
To: [email protected] <[email protected]>
Cc: Liu, Shaoyun <[email protected]>
Subject: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

Add device info for both navi12 PF and VF

Change-Id Ifb4035e65c12d153fc30e593fe109f9c7e0541f4
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +19 -0
index f329b82..edfbae5c 100644
@@ -387,6 +387,24 @@ static const struct kfd_device_info navi10_device_info = {
         .num_sdma_queues_per_engine = 8,
 };
 
+static const struct kfd_device_info navi12_device_info = {
+       .asic_family = CHIP_NAVI12,
+       .asic_name = "navi12",
+       .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 = false,
+       .num_sdma_engines = 2,
+       .num_xgmi_sdma_engines = 0,
+       .num_sdma_queues_per_engine = 8,
+};
+
 static const struct kfd_device_info navi14_device_info = {
         .asic_family = CHIP_NAVI14,
         .asic_name = "navi14",
@@ -425,6 +443,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
         [CHIP_RENOIR] = {&renoir_device_info, NULL},
         [CHIP_ARCTURUS] = {&arcturus_device_info, &arcturus_device_info},
         [CHIP_NAVI10] = {&navi10_device_info, NULL},
+       [CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
         [CHIP_NAVI14] = {&navi14_device_info, NULL},
 };
 

--
2.7.4

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): DM6PR12MB27788F751A7E9247F1BC1EF1F0840-lmeGfMZKVrFSet88YzIdmgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author Reviewed-by Yong Zhao
#4 lore raw

I will push to drm-next branch . After check the code again , this change will cause issue in the kfd since CHIP_NAVI12 not added in other place where check the device_info->asic_family in kfd code . I think it's better just set the family ID as CHIP_NAVI10 since there is no difference from the kfd side for NAVI10, NAVI12 and NAVI14. I will send another review .

Regards

shaoyun.liu

On 2019-09-24 6:17 p.m., Zhao, Yong wrote:

Make sure to push to the new 5.3 branch.

Yong

________________________________
From: amd-gfx <[email protected]><mailto:[email protected]> on behalf of Liu, Shaoyun <[email protected]><mailto:[email protected]>
Sent: Tuesday, September 24, 2019 6:16 PM
To: [email protected]<mailto:[email protected]> <[email protected]><mailto:[email protected]>
Cc: Liu, Shaoyun <[email protected]><mailto:[email protected]>
Subject: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

Add device info for both navi12 PF and VF

Change-Id Ifb4035e65c12d153fc30e593fe109f9c7e0541f4
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +19 -0
index f329b82..edfbae5c 100644
@@ -387,6 +387,24 @@ static const struct kfd_device_info navi10_device_info = {
         .num_sdma_queues_per_engine = 8,
 };
 
+static const struct kfd_device_info navi12_device_info = {
+       .asic_family = CHIP_NAVI12,
+       .asic_name = "navi12",
+       .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 = false,
+       .num_sdma_engines = 2,
+       .num_xgmi_sdma_engines = 0,
+       .num_sdma_queues_per_engine = 8,
+};
+
 static const struct kfd_device_info navi14_device_info = {
         .asic_family = CHIP_NAVI14,
         .asic_name = "navi14",
@@ -425,6 +443,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
         [CHIP_RENOIR] = {&renoir_device_info, NULL},
         [CHIP_ARCTURUS] = {&arcturus_device_info, &arcturus_device_info},
         [CHIP_NAVI10] = {&navi10_device_info, NULL},
+       [CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
         [CHIP_NAVI14] = {&navi14_device_info, NULL},
 };
 

--
2.7.4

_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): f2cb588a-f799-894b-6348-3bbdb9bf5cf0-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#6 lore raw

If Navi12 is the same as Navi10, then you can easily add the KFD support first, as it only involves a couple of lines because of recent simplification. Then have this patch next.

Regards,
Yong
________________________________
From: Liu, Shaoyun <[email protected]>
Sent: Tuesday, September 24, 2019 6:28 PM
To: Zhao, Yong <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

I will push to drm-next branch . After check the code again , this change will cause issue in the kfd since CHIP_NAVI12 not added in other place where check the device_info->asic_family in kfd code . I think it's better just set the family ID as CHIP_NAVI10 since there is no difference from the kfd side for NAVI10, NAVI12 and NAVI14. I will send another review .

Regards

shaoyun.liu

On 2019-09-24 6:17 p.m., Zhao, Yong wrote:

Make sure to push to the new 5.3 branch.

Yong

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Liu, Shaoyun <[email protected]><mailto:[email protected]>
Sent: Tuesday, September 24, 2019 6:16 PM
To: [email protected]<mailto:[email protected]> <[email protected]><mailto:[email protected]>
Cc: Liu, Shaoyun <[email protected]><mailto:[email protected]>
Subject: [PATCH] drm/amdkfd: Add NAVI12 support from kfd side

Add device info for both navi12 PF and VF

Change-Id Ifb4035e65c12d153fc30e593fe109f9c7e0541f4
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +19 -0
index f329b82..edfbae5c 100644
@@ -387,6 +387,24 @@ static const struct kfd_device_info navi10_device_info = {
         .num_sdma_queues_per_engine = 8,
 };
 
+static const struct kfd_device_info navi12_device_info = {
+       .asic_family = CHIP_NAVI12,
+       .asic_name = "navi12",
+       .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 = false,
+       .num_sdma_engines = 2,
+       .num_xgmi_sdma_engines = 0,
+       .num_sdma_queues_per_engine = 8,
+};
+
 static const struct kfd_device_info navi14_device_info = {
         .asic_family = CHIP_NAVI14,
         .asic_name = "navi14",
@@ -425,6 +443,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = {
         [CHIP_RENOIR] = {&renoir_device_info, NULL},
         [CHIP_ARCTURUS] = {&arcturus_device_info, &arcturus_device_info},
         [CHIP_NAVI10] = {&navi10_device_info, NULL},
+       [CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
         [CHIP_NAVI14] = {&navi14_device_info, NULL},
 };
 

--
2.7.4

_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx