AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David (Ming Qiang) Wu" <David.Wu3@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <Christian.Koenig@amd.com>,
	<alexander.deucher@amd.com>
Cc: leo.liu@amd.com, Boyuan.Zhang@amd.com, David.Wu3@amd.com,
	"Saleemkhan Jamadar" <saleemkhan.jamadar@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 04/14] amdgpu/umsch: Update UMSCH interface and mqd structure
Date: Tue, 10 Feb 2026 16:47:19 -0500	[thread overview]
Message-ID: <20260210214729.80964-5-David.Wu3@amd.com> (raw)
In-Reply-To: <20260210214729.80964-1-David.Wu3@amd.com>

From: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>

Add mqd configuration for VCN IP.
Update the UMSCH interface w.r.t FW change.

Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.h     | 16 +++++++++-------
 drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c       |  4 ++--
 .../gpu/drm/amd/include/umsch_mm_4_0_api_def.h   | 12 +++++-------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.h
index 2c771a753778..af34faa5e1ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.h
@@ -26,10 +26,8 @@
 #define __AMDGPU_UMSCH_MM_H__
 
 enum UMSCH_SWIP_ENGINE_TYPE {
-	UMSCH_SWIP_ENGINE_TYPE_VCN0 = 0,
-	UMSCH_SWIP_ENGINE_TYPE_VCN1 = 1,
-	UMSCH_SWIP_ENGINE_TYPE_VCN = 2,
-	UMSCH_SWIP_ENGINE_TYPE_VPE = 3,
+	UMSCH_SWIP_ENGINE_TYPE_VCN = 0,
+	UMSCH_SWIP_ENGINE_TYPE_VPE = 1,
 	UMSCH_SWIP_ENGINE_TYPE_MAX
 };
 
@@ -92,8 +90,10 @@ struct umsch_mm_add_queue_input {
 	struct {
 		uint32_t is_context_suspended : 1;
 		uint32_t collaboration_mode : 1;
-		uint32_t reserved : 30;
+		uint32_t mqd_type : 2;
+		uint32_t reserved : 28;
 	};
+	u64 fence_signal_addr;
 };
 
 struct umsch_mm_remove_queue_input {
@@ -107,8 +107,10 @@ struct MQD_INFO {
 	uint32_t rb_base_hi;
 	uint32_t rb_base_lo;
 	uint32_t rb_size;
-	uint32_t wptr_val;
-	uint32_t rptr_val;
+	u32 wptr_addr_monotonic_hi;
+	u32 wptr_addr_monotonic_lo;
+	u32 rptr_addr_monotonic_hi;
+	u32 rptr_addr_monotonic_lo;
 	uint32_t unmapped;
 	uint32_t vmid;
 };
diff --git a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
index ce3bb12e3572..79e1ec9933c5 100644
--- a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
@@ -282,8 +282,6 @@ static int umsch_mm_v4_0_set_hw_resources(struct amdgpu_umsch_mm *umsch)
 		adev->vpe.collaborate_mode ? 0x3 : 0x0;
 	set_hw_resources.engine_mask = umsch->engine_mask;
 
-	set_hw_resources.vcn0_hqd_mask[0] = umsch->vcn0_hqd_mask;
-	set_hw_resources.vcn1_hqd_mask[0] = umsch->vcn1_hqd_mask;
 	set_hw_resources.vcn_hqd_mask[0] = umsch->vcn_hqd_mask[0];
 	set_hw_resources.vcn_hqd_mask[1] = umsch->vcn_hqd_mask[1];
 	set_hw_resources.vpe_hqd_mask[0] = umsch->vpe_hqd_mask;
@@ -356,6 +354,8 @@ static int umsch_mm_v4_0_add_queue(struct amdgpu_umsch_mm *umsch,
 	add_queue.vm_context_cntl = input_ptr->vm_context_cntl;
 	add_queue.is_context_suspended = input_ptr->is_context_suspended;
 	add_queue.collaboration_mode = adev->vpe.collaborate_mode ? 1 : 0;
+	add_queue.mqd_type = input_ptr->mqd_type;
+	add_queue.fence_signal_addr = input_ptr->fence_signal_addr;
 
 	add_queue.api_status.api_completion_fence_addr = umsch->ring.fence_drv.gpu_addr;
 	add_queue.api_status.api_completion_fence_value = ++umsch->ring.fence_drv.sync_seq;
diff --git a/drivers/gpu/drm/amd/include/umsch_mm_4_0_api_def.h b/drivers/gpu/drm/amd/include/umsch_mm_4_0_api_def.h
index ca83e9e5c3ff..735ec05859fe 100644
--- a/drivers/gpu/drm/amd/include/umsch_mm_4_0_api_def.h
+++ b/drivers/gpu/drm/amd/include/umsch_mm_4_0_api_def.h
@@ -159,10 +159,8 @@ enum UMSCH_AMD_PRIORITY_LEVEL {
 };
 
 enum UMSCH_ENGINE_TYPE {
-	UMSCH_ENGINE_TYPE_VCN0 = 0,
-	UMSCH_ENGINE_TYPE_VCN1 = 1,
-	UMSCH_ENGINE_TYPE_VCN = 2,
-	UMSCH_ENGINE_TYPE_VPE = 3,
+	UMSCH_ENGINE_TYPE_VCN = 0,
+	UMSCH_ENGINE_TYPE_VPE = 1,
 	UMSCH_ENGINE_TYPE_MAX
 };
 
@@ -215,8 +213,6 @@ union UMSCHAPI__SET_HW_RESOURCES {
 		uint32_t collaboration_mask_vpe;
 		uint32_t engine_mask;
 		uint32_t logging_vmid;
-		uint32_t vcn0_hqd_mask[MAX_VCN0_INSTANCES];
-		uint32_t vcn1_hqd_mask[MAX_VCN1_INSTANCES];
 		uint32_t vcn_hqd_mask[MAX_VCN_INSTANCES];
 		uint32_t vpe_hqd_mask[MAX_VPE_INSTANCES];
 		uint64_t g_sch_ctx_gpu_mc_ptr;
@@ -299,11 +295,13 @@ union UMSCHAPI__ADD_QUEUE {
 		struct {
 			uint32_t is_context_suspended : 1;
 			uint32_t collaboration_mode : 1;
-			uint32_t reserved : 30;
+			uint32_t mqd_type : 2;
+			uint32_t reserved : 28;
 		};
 		struct UMSCH_API_STATUS api_status;
 		uint32_t process_csa_array_index;
 		uint32_t context_csa_array_index;
+		u64 fence_signal_addr;
 	};
 
 	uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
-- 
2.43.0


  parent reply	other threads:[~2026-02-10 21:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 21:47 [PATCH 00/14] user queue support for VCN 4.0.5 David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 01/14] amdgpu: add global aggregated doorbell bo David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 02/14] drm/amdgpu: add AMDGPU_GEM_GLOBAL_AGGREGATED_DOORBELL David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 03/14] drm/amdgpu/userq: add doorbell size for VCN and VPE David (Ming Qiang) Wu
2026-02-10 21:47 ` David (Ming Qiang) Wu [this message]
2026-02-10 21:47 ` [PATCH 05/14] drm/amdgpu: use amdgpu_user_queue instead of amdgpu_umsch_mm David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 06/14] drm/amdgpu/vcn: changes when kernel queue is disabled David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 07/14] amdgpu/umsch: Add VCN IP init to umsch driver David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 08/14] drm/amdgpu/userq: change mes_userq_create_wptr_mapping() to be common David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 09/14] drm/amdgpu/userq: rework on amdgpu_userq_create_wptr_mapping David (Ming Qiang) Wu
2026-04-24 13:37   ` Alex Deucher
2026-04-27  8:44     ` Zhang, Jesse(Jie)
2026-02-10 21:47 ` [PATCH 10/14] drm/amdgpu/umsch: user queue support for vcn David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 11/14] drm/amdgpu: add AMDGPU_INFO_DOORBELL David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 12/14] drm/amdgpu/vcn: handle interrupt received from fw David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 13/14] drm/amdgpu/umsch: userq suspend and resume context David (Ming Qiang) Wu
2026-02-10 21:47 ` [PATCH 14/14] drm/amdgpu/vcn: handle the suspend context interrupt David (Ming Qiang) Wu
2026-02-18 15:37 ` [PATCH 00/14] user queue support for VCN 4.0.5 Saleemkhan
2026-02-18 18:13   ` Wu, David
2026-02-18 23:59     ` Saleemkhan
2026-02-19 18:00 ` David Wu
2026-04-17 15:22   ` Wu, David

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=20260210214729.80964-5-David.Wu3@amd.com \
    --to=david.wu3@amd.com \
    --cc=Boyuan.Zhang@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=leo.liu@amd.com \
    --cc=saleemkhan.jamadar@amd.com \
    /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