AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zeng, Oak" <Oak.Zeng-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>,
	"Zeng, Oak" <Oak.Zeng-5C7GfCeVMHo@public.gmane.org>,
	"Keely, Sean" <Sean.Keely-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 7/7] drm/amdkfd: PM4 packets change to support GWS
Date: Wed, 15 May 2019 20:37:59 +0000	[thread overview]
Message-ID: <1557952664-12218-7-git-send-email-Oak.Zeng@amd.com> (raw)
In-Reply-To: <1557952664-12218-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>

Add a field in map_queues packet to indicate whether
this is a gws control queue. Only one queue per process
can be gws control queue. Change num_gws field in
map_process packet to 7 bits

Change-Id: I0db91d99c6962d14f9202b2eb950f8e7e497b79e
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 1 +
 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h  | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c
index 3dd731c..07f02f8e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c
@@ -159,6 +159,7 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,
 
 	packet->bitfields2.engine_sel =
 		engine_sel__mes_map_queues__compute_vi;
+	packet->bitfields2.gws_control_queue = q->gws ? 1 : 0;
 	packet->bitfields2.queue_type =
 		queue_type__mes_map_queues__normal_compute_vi;
 
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h b/drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h
index 0661339..49ab66b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h
@@ -176,8 +176,7 @@ struct pm4_mes_map_process {
 
 	union {
 		struct {
-			uint32_t num_gws:6;
-			uint32_t reserved7:1;
+			uint32_t num_gws:7;
 			uint32_t sdma_enable:1;
 			uint32_t num_oac:4;
 			uint32_t reserved8:4;
@@ -272,7 +271,9 @@ struct pm4_mes_map_queues {
 		struct {
 			uint32_t reserved1:4;
 			enum mes_map_queues_queue_sel_enum queue_sel:2;
-			uint32_t reserved2:15;
+			uint32_t reserved5:6;
+			uint32_t gws_control_queue:1;
+			uint32_t reserved2:8;
 			enum mes_map_queues_queue_type_enum queue_type:3;
 			uint32_t reserved3:2;
 			enum mes_map_queues_engine_sel_enum engine_sel:3;
-- 
2.7.4

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

  parent reply	other threads:[~2019-05-15 20:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 20:37 [PATCH 1/7] drm/amdkfd: Add gws number to kfd topology node properties Zeng, Oak
     [not found] ` <1557952664-12218-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-15 20:37   ` [PATCH 2/7] drm/amdgpu: Add interface to alloc gws from amdgpu Zeng, Oak
2019-05-15 20:37   ` [PATCH 3/7] drm/amdkfd: Allocate gws on device initialization Zeng, Oak
2019-05-15 20:37   ` [PATCH 4/7] drm/amdkfd: Add function to set queue gws Zeng, Oak
     [not found]     ` <1557952664-12218-4-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-21 19:54       ` Kuehling, Felix
2019-05-21 20:29       ` Kuehling, Felix
2019-05-15 20:37   ` [PATCH 5/7] drm/amdgpu: Add function to add/remove gws to kfd process Zeng, Oak
     [not found]     ` <1557952664-12218-5-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-21 20:16       ` Kuehling, Felix
2019-05-15 20:37   ` [PATCH 6/7] drm/amdkfd: New IOCTL to allocate queue GWS Zeng, Oak
     [not found]     ` <1557952664-12218-6-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-21 20:20       ` Kuehling, Felix
2019-05-15 20:37   ` Zeng, Oak [this message]
2019-05-21 20:31   ` [PATCH 1/7] drm/amdkfd: Add gws number to kfd topology node properties Kuehling, Felix
  -- strict thread matches above, loose matches on Subject: below --
2019-05-22 15:51 Zeng, Oak
     [not found] ` <1558540278-23734-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-22 15:51   ` [PATCH 7/7] drm/amdkfd: PM4 packets change to support GWS Zeng, Oak
2019-05-23 18:40 [PATCH 1/7] drm/amdkfd: Add gws number to kfd topology node properties Zeng, Oak
     [not found] ` <1558636843-9867-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
2019-05-23 18:41   ` [PATCH 7/7] drm/amdkfd: PM4 packets change to support GWS Zeng, Oak

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=1557952664-12218-7-git-send-email-Oak.Zeng@amd.com \
    --to=oak.zeng-5c7gfcevmho@public.gmane.org \
    --cc=Felix.Kuehling-5C7GfCeVMHo@public.gmane.org \
    --cc=Sean.Keely-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox