All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>,
	"Russell, Kent" <Kent.Russell-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 24/27] drm/amdkfd: Add VegaM support
Date: Sun, 28 Apr 2019 07:44:20 +0000	[thread overview]
Message-ID: <20190428074331.30107-25-Felix.Kuehling@amd.com> (raw)
In-Reply-To: <20190428074331.30107-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>

From: Kent Russell <kent.russell@amd.com>

Add the VegaM information to KFD

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c         |  5 +++++
 drivers/gpu/drm/amd/amdkfd/kfd_device.c       | 20 +++++++++++++++++++
 .../drm/amd/amdkfd/kfd_device_queue_manager.c |  1 +
 drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c  |  1 +
 drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c |  1 +
 .../gpu/drm/amd/amdkfd/kfd_packet_manager.c   |  1 +
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c     |  1 +
 7 files changed, 30 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
index 1714900035d7..59f8ca4297db 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -134,6 +134,7 @@ static struct kfd_gpu_cache_info carrizo_cache_info[] = {
 #define polaris10_cache_info carrizo_cache_info
 #define polaris11_cache_info carrizo_cache_info
 #define polaris12_cache_info carrizo_cache_info
+#define vegam_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
@@ -652,6 +653,10 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
 		pcache_info = polaris12_cache_info;
 		num_of_cache_types = ARRAY_SIZE(polaris12_cache_info);
 		break;
+	case CHIP_VEGAM:
+		pcache_info = vegam_cache_info;
+		num_of_cache_types = ARRAY_SIZE(vegam_cache_info);
+		break;
 	case CHIP_VEGA10:
 	case CHIP_VEGA12:
 	case CHIP_VEGA20:
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 1368b41cb92b..a53dda9071b1 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -232,6 +232,23 @@ static const struct kfd_device_info polaris12_device_info = {
 	.num_sdma_queues_per_engine = 2,
 };
 
+static const struct kfd_device_info vegam_device_info = {
+	.asic_family = CHIP_VEGAM,
+	.max_pasid_bits = 16,
+	.max_no_of_hqd  = 24,
+	.doorbell_size  = 4,
+	.ih_ring_entry_size = 4 * sizeof(uint32_t),
+	.event_interrupt_class = &event_interrupt_class_cik,
+	.num_of_watch_points = 4,
+	.mqd_size_aligned = MQD_SIZE_ALIGNED,
+	.supports_cwsr = true,
+	.needs_iommu_device = false,
+	.needs_pci_atomics = true,
+	.num_sdma_engines = 2,
+	.num_xgmi_sdma_engines = 0,
+	.num_sdma_queues_per_engine = 2,
+};
+
 static const struct kfd_device_info vega10_device_info = {
 	.asic_family = CHIP_VEGA10,
 	.max_pasid_bits = 16,
@@ -387,6 +404,9 @@ static const struct kfd_deviceid supported_devices[] = {
 	{ 0x6995, &polaris12_device_info },	/* Polaris12 */
 	{ 0x6997, &polaris12_device_info },	/* Polaris12 */
 	{ 0x699F, &polaris12_device_info },	/* Polaris12 */
+	{ 0x694C, &vegam_device_info },		/* VegaM */
+	{ 0x694E, &vegam_device_info },		/* VegaM */
+	{ 0x694F, &vegam_device_info },		/* VegaM */
 	{ 0x6860, &vega10_device_info },	/* Vega10 */
 	{ 0x6861, &vega10_device_info },	/* Vega10 */
 	{ 0x6862, &vega10_device_info },	/* Vega10 */
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 0bfdb141b6e7..ece35c7a77b5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1811,6 +1811,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
+	case CHIP_VEGAM:
 		device_queue_manager_init_vi_tonga(&dqm->asic_ops);
 		break;
 
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
index 213ea5454d11..dc7339825b5c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c
@@ -398,6 +398,7 @@ int kfd_init_apertures(struct kfd_process *process)
 			case CHIP_POLARIS10:
 			case CHIP_POLARIS11:
 			case CHIP_POLARIS12:
+			case CHIP_VEGAM:
 				kfd_init_apertures_vi(pdd, id);
 				break;
 			case CHIP_VEGA10:
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
index 7a737b50bed4..1cc03b3ddbb9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
@@ -315,6 +315,7 @@ struct kernel_queue *kernel_queue_init(struct kfd_dev *dev,
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
+	case CHIP_VEGAM:
 		kernel_queue_init_vi(&kq->ops_asic_specific);
 		break;
 
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
index 077c47fd4fee..808194663a7d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
@@ -228,6 +228,7 @@ int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm)
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
+	case CHIP_VEGAM:
 		pm->pmf = &kfd_vi_pm_funcs;
 		break;
 	case CHIP_VEGA10:
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index e536f4b6698f..64099a8494e1 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1306,6 +1306,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
 	case CHIP_POLARIS10:
 	case CHIP_POLARIS11:
 	case CHIP_POLARIS12:
+	case CHIP_VEGAM:
 		pr_debug("Adding doorbell packet type capability\n");
 		dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_1_0 <<
 			HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT) &
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-04-28  7:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28  7:44 [PATCH 00/27] KFD upstreaming Kuehling, Felix
     [not found] ` <20190428074331.30107-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2019-04-28  7:44   ` [PATCH 01/27] drm/amdkfd: Use 64 bit sdma_bitmap Kuehling, Felix
2019-04-28  7:44   ` [PATCH 02/27] drm/amdkfd: Add sdma allocation debug message Kuehling, Felix
2019-04-28  7:44   ` [PATCH 03/27] drm/amdkfd: Differentiate b/t sdma_id and sdma_queue_id Kuehling, Felix
2019-04-28  7:44   ` [PATCH 05/27] drm/amdkfd: Fix a potential memory leak Kuehling, Felix
2019-04-28  7:44   ` [PATCH 04/27] drm/amdkfd: Shift sdma_engine_id and sdma_queue_id in mqd Kuehling, Felix
2019-04-28  7:44   ` [PATCH 06/27] drm/amdkfd: Introduce asic-specific mqd_manager_init function Kuehling, Felix
2019-04-28  7:44   ` [PATCH 07/27] drm/amdkfd: Introduce DIQ type mqd manager Kuehling, Felix
2019-04-28  7:44   ` [PATCH 08/27] drm/amdkfd: Init mqd managers in device queue manager init Kuehling, Felix
2019-04-28  7:44   ` [PATCH 09/27] drm/amdkfd: Add mqd size in mqd manager struct Kuehling, Felix
2019-04-28  7:44   ` [PATCH 10/27] drm/amdkfd: Allocate MQD trunk for HIQ and SDMA Kuehling, Felix
2019-04-28  7:44   ` [PATCH 11/27] drm/amdkfd: Move non-sdma mqd allocation out of init_mqd Kuehling, Felix
2019-04-28  7:44   ` [PATCH 12/27] drm/amdkfd: Allocate hiq and sdma mqd from mqd trunk Kuehling, Felix
2019-04-28  7:44   ` [PATCH 13/27] drm/amdkfd: Move sdma_queue_id calculation into allocate_sdma_queue() Kuehling, Felix
2019-04-28  7:44   ` [PATCH 14/27] drm/amdkfd: Fix compute profile switching Kuehling, Felix
2019-04-28  7:44   ` [PATCH 15/27] drm/amdkfd: Fix sdma queue map issue Kuehling, Felix
2019-04-28  7:44   ` [PATCH 16/27] drm/amdkfd: Introduce XGMI SDMA queue type Kuehling, Felix
2019-04-28  7:44   ` [PATCH 17/27] drm/amdkfd: Expose sdma engine numbers to topology Kuehling, Felix
2019-04-28  7:44   ` [PATCH 18/27] drm/amdkfd: Delete alloc_format field from map_queue struct Kuehling, Felix
2019-04-28  7:44   ` [PATCH 19/27] drm/amdkfd: Fix a circular lock dependency Kuehling, Felix
2019-04-28  7:44   ` [PATCH 20/27] drm/amdkfd: Fix gfx8 MEM_VIOL exception handler Kuehling, Felix
2019-04-28  7:44   ` [PATCH 21/27] drm/amdkfd: Preserve wave state after instruction fetch MEM_VIOL Kuehling, Felix
2019-04-28  7:44   ` [PATCH 22/27] drm/amdkfd: Fix gfx9 XNACK state save/restore Kuehling, Felix
2019-04-28  7:44   ` [PATCH 23/27] drm/amdkfd: Preserve ttmp[4:5] instead of ttmp[14:15] Kuehling, Felix
2019-04-28  7:44   ` Kuehling, Felix [this message]
2019-04-28  7:44   ` [PATCH 25/27] drm/amdkfd: Add domain number into gpu_id Kuehling, Felix
2019-04-28  7:44   ` [PATCH 26/27] drm/amdgpu: Use heavy weight for tlb invalidation on xgmi configuration Kuehling, Felix
2019-04-28  7:44   ` [PATCH 27/27] drm/amdgpu: Fix GTT size calculation Kuehling, Felix
     [not found]     ` <20190428074331.30107-28-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2019-04-29 12:34       ` Christian König
     [not found]         ` <86fa9fc3-7a8f-9855-ae1d-5c7ccf2b5260-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-29 23:16           ` Kuehling, Felix
     [not found]             ` <1b1ec993-1c4b-8661-9b3f-ac0ad8ae64c7-5C7GfCeVMHo@public.gmane.org>
2019-04-30  9:32               ` Christian König
     [not found]                 ` <134a4999-776f-44c6-99a2-42e8b9366a73-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-04-30 15:36                   ` Kuehling, Felix
     [not found]                     ` <9f882acd-c48f-3bbd-2d90-659c2edead39-5C7GfCeVMHo@public.gmane.org>
2019-04-30 17:03                       ` Koenig, Christian
     [not found]                         ` <f5c698ad-2aff-b3c5-2041-05a10983438a-5C7GfCeVMHo@public.gmane.org>
2019-04-30 17:25                           ` Kuehling, Felix
     [not found]                             ` <8ba952ab-4836-4ca3-cd80-99f7367a7979-5C7GfCeVMHo@public.gmane.org>
2019-05-02 13:06                               ` Koenig, Christian
2019-07-13 20:24                           ` Felix Kuehling
2019-04-29 23:23   ` [PATCH 00/27] KFD upstreaming Kuehling, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190428074331.30107-25-Felix.Kuehling@amd.com \
    --to=felix.kuehling-5c7gfcevmho@public.gmane.org \
    --cc=Kent.Russell-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.