Skip to contentSkip to conversation

drm/amdgpu: Add NAVI12 support from kfd side

PATCH In review Liu, Shaoyun 5 participants 7 messages Sep 24, 2019 – Sep 25, 2019 4 messages not in the archive

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

PATCH 1/1 drm/amdgpu: 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): 1569363225-18469-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Liu, Shaoyun <[email protected]>
Sent: Tuesday, September 24, 2019 6:13 PM
To: [email protected] <[email protected]>
Cc: Liu, Shaoyun <[email protected]>
Subject: [PATCH] drm/amdgpu: 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

#3 lore raw
In reply to a message not in the archive

You'll also need to add "case CHIP_NAVI12:" in a bunch of places. Grep for "CHIP_NAVI10" and you'll find them all pretty quickly.

Regards,
  Felix

Quoted 38 lines · Shaoyun

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 +18 -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",

drivers/gpu/drm/amd/amdkfd/kfd_device.c static const struct kfd_device_info *kfd_supported_devices[][2] = { · line 449

Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -0
@@ -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},
  };
 

_______________________________________________
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): 2b7c9fe9-0849-d3a5-99b4-3203c1b82de2-5C7GfCeVMHo@public.gmane.org

#5 lore raw

I sent out another change that set the asic_family as CHIP_NAVI10 since from KFD side there is no difference for navi10 and navi12.

Regards
Shaoyun.liu

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Wednesday, September 25, 2019 11:23 AM
To: Liu, Shaoyun <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Add NAVI12 support from kfd side

You'll also need to add "case CHIP_NAVI12:" in a bunch of places. Grep for "CHIP_NAVI10" and you'll find them all pretty quickly.

Regards,
  Felix

Quoted 39 lines · Shaoyun

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 +18 -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",

drivers/gpu/drm/amd/amdkfd/kfd_device.c static const struct kfd_device_info *kfd_supported_devices[][2] = { · line 449

Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -0
@@ -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},
  };
 

_______________________________________________
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): DM6PR12MB3241269E6B5007951F0B59BEF4870-lmeGfMZKVrEShx2hYn8pVQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#7 lore raw

I think it would be cleaner to add navi12 to all of the relevant cases. We should double check what we did for navi14 as well.

Alex

Quoted 60 lines · Shaoyun

I sent out another change that set the asic_family as CHIP_NAVI10 since from KFD side there is no difference for navi10 and navi12.

Regards
Shaoyun.liu

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Wednesday, September 25, 2019 11:23 AM
To: Liu, Shaoyun <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Add NAVI12 support from kfd side

You'll also need to add "case CHIP_NAVI12:" in a bunch of places. Grep for "CHIP_NAVI10" and you'll find them all pretty quickly.

Regards,
Felix

Quoted 42 lines · Shaoyun

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 +18 -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},
Quoted 8 lines

drivers/gpu/drm/amd/amdkfd/kfd_device.c static const struct kfd_device_info *kfd_supported_devices[][2] = { · line 449

Quoted 4 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -0
+     [CHIP_NAVI12] = {&navi12_device_info, &navi12_device_info},
      [CHIP_NAVI14] = {&navi14_device_info, NULL},
  };
 

_______________________________________________
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): CADnq5_PQV9mPSkzY98GoQU29Sm1ooY2MHhenko2j9_=HFNdYig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#9 lore raw

Agreed. KFD is part of amdgpu. We shouldn't use the CHIP_ IDs differently in KFD. The code duplication is minimal and we've done it for all chips so far. E.g. Fiji and all the Polaris versions are treated the same in KFD. Similarly Vega10, Vega20 and Arcturus are the same for most purposes.

Regards,
  Felix

Quoted 73 lines · Alex Deucher

I think it would be cleaner to add navi12 to all of the relevant cases. We should double check what we did for navi14 as well.

Alex

Quoted 67 lines · Shaoyun

I sent out another change that set the asic_family as CHIP_NAVI10 since from KFD side there is no difference for navi10 and navi12.

Regards
Shaoyun.liu

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Wednesday, September 25, 2019 11:23 AM
To: Liu, Shaoyun <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Add NAVI12 support from kfd side

You'll also need to add "case CHIP_NAVI12:" in a bunch of places. Grep for "CHIP_NAVI10" and you'll find them all pretty quickly.

Regards,
Felix

Quoted 39 lines · Shaoyun

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 +18 -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",

drivers/gpu/drm/amd/amdkfd/kfd_device.c static const struct kfd_device_info *kfd_supported_devices[][2] = { · line 449

Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -0
@@ -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},
   };
 

_______________________________________________
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

Reviewed-by Huang Rui
#10 lore raw
In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liu, Shaoyun
Sent: Wednesday, September 25, 2019 6:14 AM
To: [email protected]
Cc: Liu, Shaoyun <[email protected]>
Subject: [PATCH] drm/amdgpu: Add NAVI12 support from kfd side

Quoted 4 lines

Add device info for both navi12 PF and VF

Change-Id Ifb4035e65c12d153fc30e593fe109f9c7e0541f4
Quoted 47 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +18 -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,
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -1
 	.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

Quoted 4 lines

_______________________________________________
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