All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/mes11: fix to unmap legacy queue
@ 2022-07-05  3:23 Jack Xiao
  2022-07-05 12:34 ` Zhang, Hawking
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Xiao @ 2022-07-05  3:23 UTC (permalink / raw)
  To: amd-gfx; +Cc: Jack Xiao

MES fw updated to support unmapping legacy gfx/compute queue.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        | 9 ++++-----
 drivers/gpu/drm/amd/include/mes_v11_api_def.h | 6 +++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
index 5bdc2babb070..6b07a8b23d67 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
@@ -216,7 +216,7 @@ static int mes_v11_0_unmap_legacy_queue(struct amdgpu_mes *mes,
 	mes_remove_queue_pkt.header.opcode = MES_SCH_API_REMOVE_QUEUE;
 	mes_remove_queue_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
 
-	mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset << 2;
+	mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset;
 	mes_remove_queue_pkt.gang_context_addr = 0;
 
 	mes_remove_queue_pkt.pipe_id = input->pipe_id;
@@ -228,10 +228,9 @@ static int mes_v11_0_unmap_legacy_queue(struct amdgpu_mes *mes,
 		mes_remove_queue_pkt.tf_data =
 			lower_32_bits(input->trail_fence_data);
 	} else {
-		if (input->queue_type == AMDGPU_RING_TYPE_GFX)
-			mes_remove_queue_pkt.unmap_legacy_gfx_queue = 1;
-		else
-			mes_remove_queue_pkt.unmap_kiq_utility_queue = 1;
+		mes_remove_queue_pkt.unmap_legacy_queue = 1;
+		mes_remove_queue_pkt.queue_type =
+			convert_to_mes_queue_type(input->queue_type);
 	}
 
 	mes_remove_queue_pkt.api_status.api_completion_fence_addr =
diff --git a/drivers/gpu/drm/amd/include/mes_v11_api_def.h b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index 1d37ec2cd737..80dab1146439 100644
--- a/drivers/gpu/drm/amd/include/mes_v11_api_def.h
+++ b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
@@ -227,6 +227,7 @@ union MESAPI_SET_HW_RESOURCES {
 			uint32_t	uint32_t_all;
 		};
 		uint32_t	oversubscription_timer;
+		uint64_t        doorbell_info;
 	};
 
 	uint32_t	max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
@@ -286,7 +287,8 @@ union MESAPI__REMOVE_QUEUE {
 			uint32_t unmap_legacy_gfx_queue   : 1;
 			uint32_t unmap_kiq_utility_queue  : 1;
 			uint32_t preempt_legacy_gfx_queue : 1;
-			uint32_t reserved                 : 29;
+			uint32_t unmap_legacy_queue       : 1;
+			uint32_t reserved                 : 28;
 		};
 		struct MES_API_STATUS	    api_status;
 
@@ -295,6 +297,8 @@ union MESAPI__REMOVE_QUEUE {
 
 		uint64_t                    tf_addr;
 		uint32_t                    tf_data;
+
+		enum MES_QUEUE_TYPE         queue_type;
 	};
 
 	uint32_t	max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] drm/amdgpu/mes11: fix to unmap legacy queue
  2022-07-05  3:23 [PATCH] drm/amdgpu/mes11: fix to unmap legacy queue Jack Xiao
@ 2022-07-05 12:34 ` Zhang, Hawking
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Hawking @ 2022-07-05 12:34 UTC (permalink / raw)
  To: Xiao, Jack, amd-gfx; +Cc: Xiao, Jack

[Public]

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>

Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Jack Xiao
Sent: Tuesday, July 5, 2022 11:24
To: amd-gfx@lists.freedesktop.org
Cc: Xiao, Jack <Jack.Xiao@amd.com>
Subject: [PATCH] drm/amdgpu/mes11: fix to unmap legacy queue

MES fw updated to support unmapping legacy gfx/compute queue.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        | 9 ++++-----
 drivers/gpu/drm/amd/include/mes_v11_api_def.h | 6 +++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
index 5bdc2babb070..6b07a8b23d67 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
@@ -216,7 +216,7 @@ static int mes_v11_0_unmap_legacy_queue(struct amdgpu_mes *mes,
 	mes_remove_queue_pkt.header.opcode = MES_SCH_API_REMOVE_QUEUE;
 	mes_remove_queue_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
 
-	mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset << 2;
+	mes_remove_queue_pkt.doorbell_offset = input->doorbell_offset;
 	mes_remove_queue_pkt.gang_context_addr = 0;
 
 	mes_remove_queue_pkt.pipe_id = input->pipe_id; @@ -228,10 +228,9 @@ static int mes_v11_0_unmap_legacy_queue(struct amdgpu_mes *mes,
 		mes_remove_queue_pkt.tf_data =
 			lower_32_bits(input->trail_fence_data);
 	} else {
-		if (input->queue_type == AMDGPU_RING_TYPE_GFX)
-			mes_remove_queue_pkt.unmap_legacy_gfx_queue = 1;
-		else
-			mes_remove_queue_pkt.unmap_kiq_utility_queue = 1;
+		mes_remove_queue_pkt.unmap_legacy_queue = 1;
+		mes_remove_queue_pkt.queue_type =
+			convert_to_mes_queue_type(input->queue_type);
 	}
 
 	mes_remove_queue_pkt.api_status.api_completion_fence_addr = diff --git a/drivers/gpu/drm/amd/include/mes_v11_api_def.h b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index 1d37ec2cd737..80dab1146439 100644
--- a/drivers/gpu/drm/amd/include/mes_v11_api_def.h
+++ b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
@@ -227,6 +227,7 @@ union MESAPI_SET_HW_RESOURCES {
 			uint32_t	uint32_t_all;
 		};
 		uint32_t	oversubscription_timer;
+		uint64_t        doorbell_info;
 	};
 
 	uint32_t	max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
@@ -286,7 +287,8 @@ union MESAPI__REMOVE_QUEUE {
 			uint32_t unmap_legacy_gfx_queue   : 1;
 			uint32_t unmap_kiq_utility_queue  : 1;
 			uint32_t preempt_legacy_gfx_queue : 1;
-			uint32_t reserved                 : 29;
+			uint32_t unmap_legacy_queue       : 1;
+			uint32_t reserved                 : 28;
 		};
 		struct MES_API_STATUS	    api_status;
 
@@ -295,6 +297,8 @@ union MESAPI__REMOVE_QUEUE {
 
 		uint64_t                    tf_addr;
 		uint32_t                    tf_data;
+
+		enum MES_QUEUE_TYPE         queue_type;
 	};
 
 	uint32_t	max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
--
2.35.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-05 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  3:23 [PATCH] drm/amdgpu/mes11: fix to unmap legacy queue Jack Xiao
2022-07-05 12:34 ` Zhang, Hawking

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.