AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring
@ 2026-12-04 14:24 Frank Min
  2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Hawking Zhang

skip vm inv for kiq ring

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 23354bf366880..75c3ded068db5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -675,7 +675,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
 		if (ring == &adev->mes.ring[0] ||
 		    ring == &adev->mes.ring[1] ||
 		    ring == &adev->umsch_mm.ring ||
-		    ring == &adev->cper.ring_buf)
+		    ring == &adev->cper.ring_buf ||
+		    ring == &adev->gfx.kiq[0].ring)
 			continue;
 
 		/* Skip if the ring is a shared ring */
-- 
2.43.0


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

* [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 14:55   ` sashiko-bot
  2026-12-04 16:05   ` Alex Deucher
  2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Hawking Zhang

Disable gfx13 pipe 1 ring usage from the driver.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c  | 9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 75c3ded068db5..1a1d176357b30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -676,7 +676,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
 		    ring == &adev->mes.ring[1] ||
 		    ring == &adev->umsch_mm.ring ||
 		    ring == &adev->cper.ring_buf ||
-		    ring == &adev->gfx.kiq[0].ring)
+		    ring == &adev->gfx.kiq[0].ring ||
+		    ring == &adev->gfx.gfx_ring[1])
 			continue;
 
 		/* Skip if the ring is a shared ring */
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
index c06fa6b9b2991..f0ac919a43480 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
@@ -990,10 +990,13 @@ static int gfx_v13_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,
 	ring->ring_obj = NULL;
 	ring->use_doorbell = true;
 
-	if (!ring_id)
+	if (!ring_id) {
 		ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
-	else
+	} else {
 		ring->doorbell_index = adev->doorbell_index.gfx_ring1 << 1;
+		ring->no_scheduler = true;
+	}
+
 	ring->vm_hub = AMDGPU_GFXHUB(0);
 	sprintf(ring->name, "gfx_%d.%d.%d", ring->me, ring->pipe, ring->queue);
 
@@ -3658,6 +3661,8 @@ static int gfx_v13_0_hw_init(struct amdgpu_ip_block *ip_block)
 	if (r)
 		return r;
 
+	adev->gfx.gfx_ring[1].sched.ready = false;
+
 	return r;
 }
 
-- 
2.43.0


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

* [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
  2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 15:14   ` sashiko-bot
  2026-12-04 16:19   ` Alex Deucher
  2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Hawking Zhang

Update table info retrieval from discovery binary to align with
discovery table update.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-By: Hawking Zhang <Hawking.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 47 +++++++++++++------
 1 file changed, 33 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 6fba2560a2abe..50b0112825c42 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -609,18 +609,36 @@ amdgpu_discovery_get_table_info_from_bin(uint8_t *discovery_bin,
 					 uint16_t table_id)
 {
 	struct binary_header *bhdr = (struct binary_header *)discovery_bin;
-	struct binary_header_v2 *bhdrv2;
-
-	switch (bhdr->version_major) {
-	case 2:
-		bhdrv2 = (struct binary_header_v2 *)discovery_bin;
-		return &bhdrv2->table_list[table_id];
-	case 1:
+	struct binary_header_v2 *bhdrv2 = (struct binary_header_v2 *)discovery_bin;
+	uint16_t version = le16_to_cpu(bhdr->version_major);
+	uint16_t binary_size = le16_to_cpu(bhdr->binary_size);
+	struct table_info *table_list;
+	uint16_t num_tables, i;
+	size_t table_offset;
+
+	switch (version) {
 	case 0:
-		return &bhdr->table_list[table_id];
+	case 1:
+		table_list = bhdr->table_list;
+		num_tables = ARRAY_SIZE(bhdr->table_list);
+		break;
+	case 2:
+		table_list = bhdrv2->table_list;
+		num_tables = le16_to_cpu(bhdrv2->num_tables);
+		break;
 	default:
 		return NULL;
 	}
+
+	table_offset = (uint8_t *)table_list - discovery_bin;
+	if (table_offset + num_tables * sizeof(*table_list) > binary_size)
+		return NULL;
+
+	for (i = 0; i < num_tables; i++)
+		if (le16_to_cpu(table_list[i].table_id) == table_id)
+			return &table_list[i];
+
+	return NULL;
 }
 
 static int amdgpu_discovery_get_table_info(struct amdgpu_device *adev,
@@ -633,8 +651,8 @@ static int amdgpu_discovery_get_table_info(struct amdgpu_device *adev,
 	*info = amdgpu_discovery_get_table_info_from_bin(adev->discovery.bin,
 							 table_id);
 	if (!*info) {
-		dev_err(adev->dev, "Invalid ip discovery table version %d\n",
-			bhdr->version_major);
+		dev_err(adev->dev, "Not found table for header version %d table id %d\n",
+			bhdr->version_major, table_id);
 		return -EINVAL;
 	}
 
@@ -645,15 +663,16 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev,
 					uint8_t *discovery_bin,
 					uint16_t table_id)
 {
-	int r, act_val, exp_val, table_size;
+	int act_val, exp_val, table_size;
 	uint16_t offset, checksum;
 	struct table_info *info;
 	bool check_table = true;
 	char *table_name;
 
-	r = amdgpu_discovery_get_table_info(adev, &info, table_id);
-	if (r)
-		return r;
+	info = amdgpu_discovery_get_table_info_from_bin(discovery_bin, table_id);
+	if (!info)
+		return 0;
+
 	offset = le16_to_cpu(info->offset);
 	checksum = le16_to_cpu(info->checksum);
 
-- 
2.43.0


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

* [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
  2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
  2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 15:25   ` sashiko-bot
  2026-12-04 16:21   ` Alex Deucher
  2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Kevin Wang

Add lsdma v8 fw query interface.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kevin Wang <kevin.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++++++
 include/uapi/drm/amdgpu_drm.h           |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 75fc49fb4b319..e6872352e0035 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -332,6 +332,10 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
 		fw_info->ver = adev->sdma.instance[query_fw->index].fw_version;
 		fw_info->feature = adev->sdma.instance[query_fw->index].feature_version;
 		break;
+	case AMDGPU_INFO_FW_LSDMA:
+		fw_info->ver = adev->lsdma.fw_version;
+		fw_info->feature = adev->lsdma.feature_version;
+		break;
 	case AMDGPU_INFO_FW_SOS:
 		fw_info->ver = adev->psp.sos.fw_version;
 		fw_info->feature = adev->psp.sos.feature_version;
@@ -2028,6 +2032,16 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
 			   i, fw_info.feature, fw_info.ver);
 	}
 
+	/* LSDMA */
+	if (adev->lsdma.fw) {
+		query_fw.fw_type = AMDGPU_INFO_FW_LSDMA;
+		ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
+		if (ret)
+			return ret;
+		seq_printf(m, "LSDMA feature version: %u, firmware version: 0x%08x\n",
+			   fw_info.feature, fw_info.ver);
+	}
+
 	/* VCN */
 	query_fw.fw_type = AMDGPU_INFO_FW_VCN;
 	ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index a9aa08c8d3095..37eeef7f43145 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -1228,6 +1228,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
 	#define AMDGPU_INFO_FW_VPE		0x1c
 	/* Subquery id: Query MP5 firmware version */
 	#define AMDGPU_INFO_FW_MP5		0x1d
+	/* Subquery id: Query LSDMA firmware version */
+	#define AMDGPU_INFO_FW_LSDMA		0x1e
 
 /* number of bytes moved for TTM migration */
 #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
-- 
2.43.0


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

* [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (2 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 15:47   ` sashiko-bot
  2026-12-04 14:24 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 Frank Min
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Kevin Wang

Add lsdma v8 fw loading support.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kevin Wang <kevin.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c | 51 +++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h |  5 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c   |  3 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 12 ++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 +++++
 drivers/gpu/drm/amd/amdgpu/lsdma_v8_0.c   |  2 +
 drivers/gpu/drm/amd/amdgpu/psp_v15_0_3.c  |  3 ++
 drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c    |  7 ++++
 8 files changed, 93 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c
index 1f83d9b69135b..5d093e25cac6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/firmware.h>
 #include "amdgpu.h"
 #include "amdgpu_lsdma.h"
 
@@ -146,3 +147,53 @@ int amdgpu_lsdma_selftest(struct amdgpu_device *adev)
 
 	return r;
 }
+
+void amdgpu_lsdma_fini_microcode(struct amdgpu_device *adev)
+{
+	amdgpu_ucode_release(&adev->lsdma.fw);
+	adev->lsdma.fw_version = 0;
+	adev->lsdma.feature_version = 0;
+}
+
+int amdgpu_lsdma_init_microcode(struct amdgpu_device *adev)
+{
+	const struct lsdma_firmware_header_v1_0 *hdr;
+	struct amdgpu_firmware_info *info;
+	char ucode_prefix[30];
+	int err;
+
+	/* LSDMA before v8 has no firmware */
+	if (amdgpu_ip_version(adev, LSDMA_HWIP, 0) < IP_VERSION(8, 0, 0))
+		return 0;
+
+	amdgpu_ucode_ip_version_decode(adev, LSDMA_HWIP, ucode_prefix, sizeof(ucode_prefix));
+	err = amdgpu_ucode_request(adev, &adev->lsdma.fw, AMDGPU_UCODE_REQUIRED,
+				   "amdgpu/%s.bin", ucode_prefix);
+	if (err)
+		goto out;
+
+	hdr = (const struct lsdma_firmware_header_v1_0 *)adev->lsdma.fw->data;
+	switch (le16_to_cpu(hdr->header.header_version_major)) {
+	case 1:
+		break;
+	default:
+		err = -EINVAL;
+		goto out;
+	}
+
+	adev->lsdma.fw_version = le32_to_cpu(hdr->header.ucode_version);
+	adev->lsdma.feature_version = le32_to_cpu(hdr->ucode_feature_version);
+
+	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
+		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_LSDMA];
+		info->ucode_id = AMDGPU_UCODE_ID_LSDMA;
+		info->fw = adev->lsdma.fw;
+		adev->firmware.fw_size +=
+			ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE);
+	}
+
+out:
+	if (err)
+		amdgpu_lsdma_fini_microcode(adev);
+	return err;
+}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
index f0a5eeb3529fb..79ac16e352d71 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
@@ -30,6 +30,9 @@ struct amdgpu_lsdma {
 	struct mutex lock;
 	const struct amdgpu_lsdma_funcs      *funcs;
 	uint32_t inst_mask;
+	const struct firmware *fw;
+	uint32_t fw_version;
+	uint32_t feature_version;
 };
 
 struct amdgpu_lsdma_funcs {
@@ -47,5 +50,7 @@ int amdgpu_lsdma_fill_mem(struct amdgpu_device *adev, uint64_t dst_addr,
 int amdgpu_lsdma_wait_for(struct amdgpu_device *adev, uint32_t reg_index,
 			  uint32_t reg_val, uint32_t mask);
 int amdgpu_lsdma_selftest(struct amdgpu_device *adev);
+int amdgpu_lsdma_init_microcode(struct amdgpu_device *adev);
+void amdgpu_lsdma_fini_microcode(struct amdgpu_device *adev);
 
 #endif
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index da4672707755c..9624b3dc95bfe 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -3759,6 +3759,9 @@ int amdgpu_psp_get_fw_type(struct amdgpu_firmware_info *ucode,
 	case AMDGPU_UCODE_ID_SDMA_UCODE_TH1:
 		*type = GFX_FW_TYPE_SDMA_UCODE_TH1;
 		break;
+	case AMDGPU_UCODE_ID_LSDMA:
+		*type = GFX_FW_TYPE_LSDMA;
+		break;
 	case AMDGPU_UCODE_ID_IMU_I:
 		*type = GFX_FW_TYPE_IMU_I;
 		break;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index d2ce526dd95cc..c6b9078570456 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
@@ -729,6 +729,8 @@ const char *amdgpu_ucode_name(enum AMDGPU_UCODE_ID ucode_id)
 		return "JPEG";
 	case AMDGPU_UCODE_ID_SDMA_RS64:
 		return "RS64_SDMA";
+	case AMDGPU_UCODE_ID_LSDMA:
+		return "LSDMA";
 	case AMDGPU_UCODE_ID_CP_RS64_PFP:
 		return "RS64_PFP";
 	case AMDGPU_UCODE_ID_CP_RS64_ME:
@@ -878,6 +880,7 @@ static int amdgpu_ucode_init_single_fw(struct amdgpu_device *adev,
 	const struct mes_firmware_header_v1_0 *mes_hdr = NULL;
 	const struct sdma_firmware_header_v2_0 *sdma_hdr = NULL;
 	const struct sdma_firmware_header_v3_0 *sdmav3_hdr = NULL;
+	const struct lsdma_firmware_header_v1_0 *lsdma_hdr = NULL;
 	const struct imu_firmware_header_v1_0 *imu_hdr = NULL;
 	const struct vpe_firmware_header_v1_0 *vpe_hdr = NULL;
 	const struct umsch_mm_firmware_header_v1_0 *umsch_mm_hdr = NULL;
@@ -900,6 +903,7 @@ static int amdgpu_ucode_init_single_fw(struct amdgpu_device *adev,
 	mes_hdr = (const struct mes_firmware_header_v1_0 *)ucode->fw->data;
 	sdma_hdr = (const struct sdma_firmware_header_v2_0 *)ucode->fw->data;
 	sdmav3_hdr = (const struct sdma_firmware_header_v3_0 *)ucode->fw->data;
+	lsdma_hdr = (const struct lsdma_firmware_header_v1_0 *)ucode->fw->data;
 	imu_hdr = (const struct imu_firmware_header_v1_0 *)ucode->fw->data;
 	vpe_hdr = (const struct vpe_firmware_header_v1_0 *)ucode->fw->data;
 	umsch_mm_hdr = (const struct umsch_mm_firmware_header_v1_0 *)ucode->fw->data;
@@ -921,6 +925,11 @@ static int amdgpu_ucode_init_single_fw(struct amdgpu_device *adev,
 			ucode_addr = (u8 *)ucode->fw->data +
 				le32_to_cpu(sdmav3_hdr->header.ucode_array_offset_bytes);
 			break;
+		case AMDGPU_UCODE_ID_LSDMA:
+			ucode->ucode_size = le32_to_cpu(lsdma_hdr->ucode_size_bytes);
+			ucode_addr = (u8 *)ucode->fw->data +
+				le32_to_cpu(lsdma_hdr->header.ucode_array_offset_bytes);
+			break;
 		case AMDGPU_UCODE_ID_CP_MEC1:
 		case AMDGPU_UCODE_ID_CP_MEC2:
 			ucode->ucode_size = le32_to_cpu(header->ucode_size_bytes) -
@@ -1500,6 +1509,9 @@ void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type,
 	case SDMA0_HWIP:
 		ip_name = "sdma";
 		break;
+	case LSDMA_HWIP:
+		ip_name = "lsdma";
+		break;
 	case MP0_HWIP:
 		ip_name = "psp";
 		break;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
index 7c809692807fc..f8a57ff454c58 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
@@ -375,6 +375,14 @@ struct sdma_firmware_header_v3_0 {
     uint32_t ucode_size_bytes;
 };
 
+/* version_major=1, version_minor=0 */
+struct lsdma_firmware_header_v1_0 {
+	struct common_firmware_header header;
+	uint32_t ucode_feature_version;
+	uint32_t ucode_offset_bytes;
+	uint32_t ucode_size_bytes;
+};
+
 /* gpu info payload */
 struct gpu_info_firmware_v1_0 {
 	uint32_t gc_num_se;
@@ -463,6 +471,7 @@ union amdgpu_firmware_header {
 	struct sdma_firmware_header_v1_1 sdma_v1_1;
 	struct sdma_firmware_header_v2_0 sdma_v2_0;
 	struct sdma_firmware_header_v3_0 sdma_v3_0;
+	struct lsdma_firmware_header_v1_0 lsdma;
 	struct gpu_info_firmware_header_v1_0 gpu_info;
 	struct dmcu_firmware_header_v1_0 dmcu;
 	struct dmcub_firmware_header_v1_0 dmcub;
@@ -489,6 +498,7 @@ enum AMDGPU_UCODE_ID {
 	AMDGPU_UCODE_ID_SDMA_UCODE_TH0,
 	AMDGPU_UCODE_ID_SDMA_UCODE_TH1,
 	AMDGPU_UCODE_ID_SDMA_RS64,
+	AMDGPU_UCODE_ID_LSDMA,
 	AMDGPU_UCODE_ID_CP_CE,
 	AMDGPU_UCODE_ID_CP_PFP,
 	AMDGPU_UCODE_ID_CP_ME,
diff --git a/drivers/gpu/drm/amd/amdgpu/lsdma_v8_0.c b/drivers/gpu/drm/amd/amdgpu/lsdma_v8_0.c
index d19d7f8add50e..722c85b2ccf3b 100644
--- a/drivers/gpu/drm/amd/amdgpu/lsdma_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/lsdma_v8_0.c
@@ -29,6 +29,8 @@
 #include "lsdma/lsdma_8_0_1_offset.h"
 #include "lsdma/lsdma_8_0_1_sh_mask.h"
 
+MODULE_FIRMWARE("amdgpu/lsdma_8_0_1.bin");
+
 static int lsdma_v8_0_wait_pio_status(struct amdgpu_device *adev)
 {
 	u32 error_mask;
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v15_0_3.c b/drivers/gpu/drm/amd/amdgpu/psp_v15_0_3.c
index a7c7dcb74d989..3c77db281068d 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v15_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v15_0_3.c
@@ -684,6 +684,9 @@ static int psp_v15_0_3_get_fw_type(struct amdgpu_firmware_info *ucode,
 	case AMDGPU_UCODE_ID_SDMA_RS64:
 		*type = GFX_FW_TYPE_SDMA0;
 		break;
+	case AMDGPU_UCODE_ID_LSDMA:
+		*type = GFX_FW_TYPE_LSDMA;
+		break;
 	case AMDGPU_UCODE_ID_CP_MES:
 		*type = GFX_FW_TYPE_CP_MES;
 		break;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
index 58b85fbba2ca3..e39a005b0faf4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
@@ -1293,6 +1293,12 @@ static int sdma_v8_0_early_init(struct amdgpu_ip_block *ip_block)
 		return r;
 	}
 
+	r = amdgpu_lsdma_init_microcode(adev);
+	if (r) {
+		DRM_ERROR("Failed to init lsdma firmware!\n");
+		return r;
+	}
+
 	sdma_v8_0_set_ring_funcs(adev);
 	amdgpu_sdma_set_vm_pte_scheds(adev, &sdma_v8_0_vm_pte_funcs);
 	sdma_v8_0_set_irq_funcs(adev);
@@ -1377,6 +1383,7 @@ static int sdma_v8_0_sw_fini(struct amdgpu_ip_block *ip_block)
 
 	amdgpu_sdma_sysfs_reset_mask_fini(adev);
 	amdgpu_sdma_destroy_inst_ctx(adev, true);
+	amdgpu_lsdma_fini_microcode(adev);
 
 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)
 		sdma_v8_0_0_free_ucode_buffer(adev);
-- 
2.43.0


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

* [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (3 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 16:01   ` sashiko-bot
  2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min, Kevin Wang

Gfx13 vram layout introduced vram offset, but aperture space should
not be affected. So fix system aperture size to align with it.

Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kevin Wang <kevin.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
index 49fee18eb5253..b548b748d670e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
@@ -618,10 +618,14 @@ static int gmc_v13_0_late_init(struct amdgpu_ip_block *ip_block)
 	return amdgpu_irq_get(adev, &adev->gmc.vm_fault, 0);
 }
 
-static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc, u64 base, u64 offset)
+static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev,
+					struct amdgpu_gmc *mc, u64 base)
 {
 	amdgpu_gmc_set_agp_default(adev, mc);
 	amdgpu_gmc_vram_location(adev, mc, base);
+
+	if (!amdgpu_sriov_vf(adev))
+		mc->fb_start = adev->mmhub.funcs->get_fb_location(adev);
 	amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_LOW);
 	if (!amdgpu_sriov_vf(adev) && (amdgpu_agp == 1))
 		amdgpu_gmc_agp_location(adev, mc);
@@ -630,7 +634,9 @@ static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgp
 	if (amdgpu_sriov_vf(adev))
 		adev->vm_manager.vram_base_offset = 0;
 	else
-		adev->vm_manager.vram_base_offset = adev->mmhub.funcs->get_mc_fb_offset(adev) + offset;
+		adev->vm_manager.vram_base_offset =
+			adev->mmhub.funcs->get_mc_fb_offset(adev) +
+			mc->vram_start - mc->fb_start;
 }
 
 /**
@@ -689,7 +695,7 @@ static int gmc_v13_0_mc_init(struct amdgpu_device *adev)
 	/* set the gart size */
 	amdgpu_gmc_set_gart_size(adev, SZ_512M);
 
-	gmc_v13_0_vram_gtt_location(adev, &adev->gmc, base, mc_vram_offset);
+	gmc_v13_0_vram_gtt_location(adev, &adev->gmc, base);
 
 	return 0;
 }
-- 
2.43.0


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

* [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() for gfx13
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (4 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 16:03   ` Alex Deucher
  2026-12-04 16:11   ` sashiko-bot
  2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min

remove the unused ring parameter in update_spm_vmid() for gfx13.

Signed-off-by: Frank Min <Frank.Min@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
index f0ac919a43480..9ef249b95f916 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
@@ -2134,7 +2134,7 @@ static int gfx_v13_0_rlc_resume(struct amdgpu_device *adev)
 
 	/* init spm vmid with 0xf */
 	if (adev->gfx.rlc.funcs->update_spm_vmid)
-		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, NULL, adev->vm_manager.spm_vmid);
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, adev->vm_manager.spm_vmid);
 
 	return 0;
 }
@@ -3963,22 +3963,12 @@ static void gfx_v13_0_update_perf_clk(struct amdgpu_device *adev,
 
 static void gfx_v13_0_update_spm_vmid(struct amdgpu_device *adev,
 				      int xcc_id,
-				      struct amdgpu_ring *ring,
 				      unsigned vmid)
 {
 	u32 reg, data;
 
 	reg = SOC15_REG_OFFSET(GC, 0, regRLC_SPM_MC_CNTL);
 
-	if (ring) {
-		if ((ring->funcs->type == AMDGPU_RING_TYPE_GFX) ||
-		    (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)) {
-			data = (vmid & RLC_SPM_MC_CNTL__RLC_SPM_VMID_MASK) << RLC_SPM_MC_CNTL__RLC_SPM_VMID__SHIFT;
-			amdgpu_ring_emit_wreg(ring, reg, data);
-		}
-		return;
-	}
-
 	amdgpu_gfx_off_ctrl(adev, false);
 	if (amdgpu_sriov_is_pp_one_vf(adev))
 		data = RREG32_NO_KIQ(reg);
-- 
2.43.0


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

* [PATCH 8/9] drm/amdgpu: enable uni-mes for gfx13
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (5 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 16:41   ` sashiko-bot
  2026-12-04 17:24   ` Alex Deucher
  2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min

Enable uni-mes for gfx13.

Signed-off-by: Frank Min <Frank.Min@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 50b0112825c42..c8fe1cb45dd95 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -3424,10 +3424,10 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(13, 0, 1):
 	case IP_VERSION(13, 0, 4):
 		amdgpu_device_ip_block_add(adev, &mes_v13_0_ip_block);
-		adev->enable_mes = false;
-		adev->enable_mes_kiq = false;
+		adev->enable_mes = true;
+		adev->enable_mes_kiq = true;
 		if (amdgpu_uni_mes)
-			adev->enable_uni_mes = false;
+			adev->enable_uni_mes = true;
 		break;
 	default:
 		break;
-- 
2.43.0


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

* [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (6 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
@ 2026-12-04 14:24 ` Frank Min
  2026-12-04 16:12   ` Alex Deucher
  2026-12-04 16:52   ` sashiko-bot
  2026-12-04 14:41 ` [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring sashiko-bot
  2026-12-04 16:16 ` Alex Deucher
  9 siblings, 2 replies; 25+ messages in thread
From: Frank Min @ 2026-12-04 14:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Frank Min

Reset the GRBM selection before dropping srbm_mutex.

Fix gfx v11.0/v12.0/v12.1 and v13.0.

Signed-off-by: Frank Min <Frank.Min@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c | 3 ++-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index ea74defe7fea0..13ff74ec3a540 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -3030,8 +3030,8 @@ static int gfx_v11_0_config_mec_cache_rs64(struct amdgpu_device *adev, uint64_t
 		WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
 		     upper_32_bits(addr));
 	}
-	mutex_unlock(&adev->srbm_mutex);
 	soc21_grbm_select(adev, 0, 0, 0, 0);
+	mutex_unlock(&adev->srbm_mutex);
 
 	/* Trigger an invalidation of the L1 instruction caches */
 	tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
@@ -3989,8 +3989,8 @@ static int gfx_v11_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
 		WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
 		     upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
 	}
-	mutex_unlock(&adev->srbm_mutex);
 	soc21_grbm_select(adev, 0, 0, 0, 0);
+	mutex_unlock(&adev->srbm_mutex);
 
 	/* Trigger an invalidation of the L1 instruction caches */
 	tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 8d6e74167d1c4..02894a2bb4bf3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -2860,8 +2860,8 @@ static int gfx_v12_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
 		WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
 			     upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
 	}
-	mutex_unlock(&adev->srbm_mutex);
 	soc24_grbm_select(adev, 0, 0, 0, 0);
+	mutex_unlock(&adev->srbm_mutex);
 
 	/* Trigger an invalidation of the L1 instruction caches */
 	tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index d393435e994b2..b200863bad906 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -2183,8 +2183,8 @@ static int gfx_v12_1_xcc_cp_compute_load_microcode_rs64(struct amdgpu_device *ad
 		WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_CPC_IC_BASE_HI,
 				upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
 	}
-	mutex_unlock(&adev->srbm_mutex);
 	soc_v1_0_grbm_select(adev, 0, 0, 0, 0, GET_INST(GC, xcc_id));
+	mutex_unlock(&adev->srbm_mutex);
 
 	/* Trigger an invalidation of the L1 instruction caches */
 	tmp = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DC_OP_CNTL);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
index 9ef249b95f916..439e51ded70ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
@@ -2877,8 +2877,9 @@ static int gfx_v13_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
 				upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
 		}
 	}
-	mutex_unlock(&adev->srbm_mutex);
 	soc_v2_0_grbm_select(adev, 0, 0, 0, 0);
+	mutex_unlock(&adev->srbm_mutex);
+
 	/* Trigger an invalidation of the L1 instruction caches */
 	tmp = RREG32_SOC15(GC, 0, regCP_CPC_IC_OP_NATIVE_CNTL);
 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_OP_NATIVE_CNTL, INVALIDATE_CACHE, 1);
-- 
2.43.0


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

* Re: [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (7 preceding siblings ...)
  2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
@ 2026-12-04 14:41 ` sashiko-bot
  2026-12-04 16:16 ` Alex Deucher
  9 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 14:41 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/amdgpu: amdgpu_gmc_allocate_vm_inv_eng() only skips
  kiq[0] ring
- [Low] drm/amdgpu: commit message repeats subject without rationale
--

commit b1355b6a846065fc7eb680a37bdb10989818e156
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: skip vm inv for kiq ring
>
> skip vm inv for kiq ring
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>

[Severity: Low]
The commit body repeats the subject line without explaining why this change
is needed or why it is safe.  Could it briefly note that skipping KIQ
conserves limited per-GFXHUB VM invalidation engines and is safe because
KIQ rings do not implement emit_vm_flush or use ring->vm_inv_eng?

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index c3732a61f1c90..12165f20a2c73 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -669,7 +669,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
>  		if (ring == &adev->mes.ring[0] ||
>  		    ring == &adev->mes.ring[1] ||
>  		    ring == &adev->umsch_mm.ring ||
> -		    ring == &adev->cper.ring_buf)
> +		    ring == &adev->cper.ring_buf ||
> +		    ring == &adev->gfx.kiq[0].ring)
>  			continue;
>  
>  		/* Skip if the ring is a shared ring */

[Severity: Medium]
Does checking &adev->gfx.kiq[0].ring miss KIQ rings on secondary XCCs?

On multi-XCC devices such as GC 9.4.3, gfx_v9_4_3_sw_init() registers a KIQ
ring for every xcc_id via amdgpu_gfx_kiq_init_ring().  Only skipping index 0
leaves kiq[1..num_xcc-1].ring consuming a VM invalidation engine on their
GFXHUB, risking -EINVAL during probe if per-GFXHUB engines run out.

Checking ring->funcs->type == AMDGPU_RING_TYPE_KIQ would skip KIQ rings
across all XCC instances.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=1

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

* Re: [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring
  2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
@ 2026-12-04 14:55   ` sashiko-bot
  2026-12-04 16:05   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 14:55 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] drm/amdgpu: amdgpu_gmc_allocate_vm_inv_eng() breaks gfx_ring[1]
  on GFX10/11
- [Medium] drm/amdgpu: gfx_v13_0_gfx_ring_init() leaves gfx_ring[1]
  re-enableable
- [Medium] drm/amdgpu: gfx_v13_0_hw_init() clears
  gfx_ring[1].sched.ready too late
- [Low] drm/amdgpu: commit message lacks rationale for disabling gfx13
  pipe 1
--

commit 99b1a1cd968d2f39334b32d40212198583f21ae0
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: disable gfx 13 pipe 1 ring
>
> Disable gfx13 pipe 1 ring usage from the driver.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>

[Severity: Low]
Could the commit message explain why gfx13 pipe 1 ring needs to be disabled?
It currently only restates the subject, without saying why gfx_ring[1]
remains initialized and ring-tested in hardware or why the shared
amdgpu_gmc_allocate_vm_inv_eng() path is changed.

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 12165f20a2c73..c7d7467730998 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -670,7 +670,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
>  		    ring == &adev->mes.ring[1] ||
>  		    ring == &adev->umsch_mm.ring ||
>  		    ring == &adev->cper.ring_buf ||
> -		    ring == &adev->gfx.kiq[0].ring)
> +		    ring == &adev->gfx.kiq[0].ring ||
> +		    ring == &adev->gfx.gfx_ring[1])
>  			continue;

[Severity: High]
Does unconditionally skipping gfx_ring[1] here break active pipe 1 rings on
GFX 10.3 and GFX 11?

amdgpu_gmc_allocate_vm_inv_eng() is shared across GMC generations.  On
GFX 10.3 (and GFX 11 with kernel queues enabled and RS64/TMZ disabled),
gfx_ring[1] is still an active scheduled ring on AMDGPU_GFXHUB(0).
Skipping it leaves gfx_ring[1].vm_inv_eng at 0, aliasing gfx_ring[0].

Because AMDGPU_GFXHUB(0) flushes in gmc_v10_0_emit_flush_gpu_tlb() and
gmc_v11_0_emit_flush_gpu_tlb() do not use hardware semaphores, concurrent
submissions on gfx_ring[0] and gfx_ring[1] will race on engine 0, risking
stale GPU TLB entries or wait timeouts and GPU hangs.

Checking ring->no_scheduler (or scoping the skip to GFX 13) would preserve
dedicated invalidation engines on earlier ASICs.

> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> index c06fa6b9b2991..f0ac919a43480 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> @@ -990,10 +990,13 @@ static int gfx_v13_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,
>  	ring->ring_obj = NULL;
>  	ring->use_doorbell = true;
>  
> -	if (!ring_id)
> +	if (!ring_id) {
>  		ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
> -	else
> +	} else {
>  		ring->doorbell_index = adev->doorbell_index.gfx_ring1 << 1;
> +		ring->no_scheduler = true;
> +	}

[Severity: Medium]
Can debugfs still re-enable gfx_ring[1] when only no_scheduler is set?

With adev->gfx.num_gfx_rings still at 2, amdgpu_debugfs_gfx_sched_mask_set()
flips ring->sched.ready back to true without checking ring->no_scheduler.
Because ring->no_user_submission is still false, amdgpu_hw_ip_info() then
counts gfx_ring[1] as a usable user ring and amdgpu_ib_ring_tests() tests it.

Keeping num_gfx_rings at 2 also still allocates, maps, and ring-tests pipe 1
in gfx_v13_0_cp_resume(), so a pipe 1 test failure still aborts hw_init.

Setting ring->no_user_submission = true and checking ring->no_scheduler in
amdgpu_debugfs_gfx_sched_mask_set() (or setting num_gfx_rings to 1 if
firmware does not require pipe 1 to be mapped) would avoid this.

[ ... ]

> @@ -3658,6 +3661,8 @@ static int gfx_v13_0_hw_init(struct amdgpu_ip_block *ip_block)
>  	if (r)
>  		return r;
>  
> +	adev->gfx.gfx_ring[1].sched.ready = false;
> +
>  	return r;
>  }

[Severity: Medium]
Will an error in gfx_v13_0_cp_resume() leave gfx_ring[1].sched.ready set to
true?

gfx_v13_0_cp_resume() calls amdgpu_ring_test_helper() on gfx_ring[1], which
sets ring->sched.ready = true before testing the compute rings.  If a
compute ring test fails, gfx_v13_0_hw_init() returns early before clearing
sched.ready, leaving the unscheduled ring marked ready.

Even when all ring tests succeed during resume or GPU reset, sched.ready is
transiently true while the compute ring tests run.  Using
amdgpu_ring_test_ring() instead of amdgpu_ring_test_helper() when
ring->no_scheduler is set would avoid publishing sched.ready at all.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=2

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

* Re: [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary
  2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
@ 2026-12-04 15:14   ` sashiko-bot
  2026-12-04 16:19   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 15:14 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 6 potential
issues to consider:
- [High] drm/amdgpu: v0/v1 discovery lookup broken by table_id scan
- [Medium] drm/amdgpu: amdgpu_discovery_table_check() ignores invalid
  headers
- [Medium] drm/amdgpu: amdgpu_discovery_refresh_nps_info() misses v2
  table_id lookup
- [Medium] drm/amdgpu: OOB read in
  amdgpu_discovery_get_table_info_from_bin()
- [Low] drm/amdgpu: commit message omits discovery table format and
  lookup rationale
- [Low] drm/amdgpu: spurious dev_err() in
  amdgpu_discovery_get_table_info()
--

commit 2a203845aec3dbcd54cbcfc1a749319c4ba689f3
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: update table info retrieval from discovery binary
>
> Update table info retrieval from discovery binary to align with
> discovery table update.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-By: Hawking Zhang <Hawking.Zhang@amd.com>

[Severity: Low]
Can the commit message explain what changed in the discovery table format
and why the lookup and error handling changed?  It does not mention that v2
binaries populate table_info.table_id and may omit unused entries, why v0
and v1 are also changed, or why amdgpu_discovery_table_check() returns 0.

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index c52b0d9ac00b7..5997946fb1171 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -609,18 +609,36 @@ amdgpu_discovery_get_table_info_from_bin(uint8_t *discovery_bin,
>  					 uint16_t table_id)
>  {
>  	struct binary_header *bhdr = (struct binary_header *)discovery_bin;
> -	struct binary_header_v2 *bhdrv2;
> -
> -	switch (bhdr->version_major) {
> -	case 2:
> -		bhdrv2 = (struct binary_header_v2 *)discovery_bin;
> -		return &bhdrv2->table_list[table_id];
> -	case 1:
> +	struct binary_header_v2 *bhdrv2 = (struct binary_header_v2 *)discovery_bin;
> +	uint16_t version = le16_to_cpu(bhdr->version_major);
> +	uint16_t binary_size = le16_to_cpu(bhdr->binary_size);
> +	struct table_info *table_list;
> +	uint16_t num_tables, i;
> +	size_t table_offset;
> +
> +	switch (version) {
>  	case 0:
> -		return &bhdr->table_list[table_id];
> +	case 1:
> +		table_list = bhdr->table_list;
> +		num_tables = ARRAY_SIZE(bhdr->table_list);
> +		break;
> +	case 2:
> +		table_list = bhdrv2->table_list;
> +		num_tables = le16_to_cpu(bhdrv2->num_tables);
> +		break;
>  	default:
>  		return NULL;
>  	}
> +
> +	table_offset = (uint8_t *)table_list - discovery_bin;
> +	if (table_offset + num_tables * sizeof(*table_list) > binary_size)
> +		return NULL;

[Severity: Medium]
Can this bounds check still read past the end of discovery_bin?  It compares
against bhdr->binary_size from the binary itself (up to 65535 bytes) rather
than the allocated buffer size.

adev->discovery.bin defaults to DISCOVERY_TMR_SIZE (10 KiB), and
amdgpu_discovery_sysfs_early_init() always copies DISCOVERY_TMR_SIZE bytes
into ip_top->discovery_bin.  A v2 header with a larger binary_size and
num_tables passes this check and reads out of bounds during the scan.

In addition, case 2 reads bhdrv2->num_tables before checking that the buffer
is at least sizeof(*bhdrv2) bytes, while
amdgpu_discovery_read_binary_from_file() only enforces a 12-byte minimum.
Passing the allocated buffer size into this helper and checking both
binary_size and sizeof(*bhdrv2) against it would close both over-reads.

> +
> +	for (i = 0; i < num_tables; i++)
> +		if (le16_to_cpu(table_list[i].table_id) == table_id)
> +			return &table_list[i];
> +
> +	return NULL;
>  }

[Severity: High]
Does routing v0 and v1 headers through this table_id scan break table
lookups on every GPU with a v0 or v1 discovery binary?

In drivers/gpu/drm/amd/include/discovery.h, table_info.table_id is padding
for v1 (and v0) headers and is zero-filled, while bhdr->table_list is
indexed directly by enum table.

Every non-zero table_id (GC, HARVEST_INFO, VCN_INFO, MALL_INFO, NPS_INFO)
will therefore return NULL, leaving harvest masks and GFX/MALL/VCN
configuration unpopulated during probe because
amdgpu_discovery_set_ip_blocks() ignores those lookup failures.

Scanning all 8 entries of bhdr->table_list on older 6-slot v0/v1 binaries
also reads 16 bytes past table_list into adjacent table data.  Versions 0
and 1 should keep direct indexing (&bhdr->table_list[table_id]) with bounds
checks, reserving the table_id scan for v2.

[Severity: Medium]
Should amdgpu_discovery_refresh_nps_info() also be updated for the v2
table_id lookup?

It reads the discovery header directly from VRAM and still indexes
bhdrv2.table_list[NPS_INFO] by fixed position under case 2, which will read
the wrong entry or fail checksum verification during NPS refresh after reset
on v2 binaries with sparse or reordered tables.  It also switches on
bhdr.version_major without le16_to_cpu() and omits case 0.

[ ... ]

> @@ -633,8 +651,8 @@ static int amdgpu_discovery_get_table_info(struct amdgpu_device *adev,
>  	*info = amdgpu_discovery_get_table_info_from_bin(adev->discovery.bin,
>  							 table_id);
>  	if (!*info) {
> -		dev_err(adev->dev, "Invalid ip discovery table version %d\n",
> -			bhdr->version_major);
> +		dev_err(adev->dev, "Not found table for header version %d table id %d\n",
> +			bhdr->version_major, table_id);
>  		return -EINVAL;
>  	}

[Severity: Low]
Will this emit spurious dev_err() messages during normal probe on v2
binaries that omit optional tables?

Previously dev_err() only fired on unsupported header versions.  Now
amdgpu_discovery_init() probes the optional MEM_RESERVED_INFO table (whose
caller logs absence at dev_dbg()) and amdgpu_discovery_set_ip_blocks()
probes MALL_INFO and VCN_INFO, logging errors whenever they are absent.

[ ... ]

> @@ -645,15 +663,16 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev,
>  					uint8_t *discovery_bin,
>  					uint16_t table_id)
>  {
> -	int r, act_val, exp_val, table_size;
> +	int act_val, exp_val, table_size;
>  	uint16_t offset, checksum;
>  	struct table_info *info;
>  	bool check_table = true;
>  	char *table_name;
>  
> -	r = amdgpu_discovery_get_table_info(adev, &info, table_id);
> -	if (r)
> -		return r;
> +	info = amdgpu_discovery_get_table_info_from_bin(discovery_bin, table_id);
> +	if (!info)
> +		return 0;

[Severity: Medium]
Does returning 0 on NULL bypass header validation and mandatory
IP_DISCOVERY checks in amdgpu_discovery_init()?

amdgpu_discovery_get_table_info_from_bin() returns NULL for an unsupported
version_major, an out-of-bounds num_tables, and a missing IP_DISCOVERY
table, not just absent optional tables.

Because amdgpu_discovery_init() has no other check on version_major or
num_tables, it will return 0 on an invalid binary instead of freeing
adev->discovery.bin and calling amdgpu_ras_query_boot_status().

That lets amdgpu_discovery_sysfs_early_init() copy the invalid binary in
amdgpu_discovery_reg_base_init(), and on legacy ASICs leaves
adev->discovery.bin non-NULL so amdgpu_discovery_sysfs_init() leaks ip_top
and die_kset when amdgpu_discovery_sysfs_recurse() fails.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=3

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

* Re: [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface
  2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
@ 2026-12-04 15:25   ` sashiko-bot
  2026-12-04 16:21   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 15:25 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/amdgpu: build failure in amdgpu_kms.c from missing
  amdgpu_lsdma fields
--

commit a926f15d698b8e97f1a0c23946c2b960f6427223
Author: Frank Min <Frank.Min@amd.com>

drm/amdgpu: add lsdma v8 fw query interface

This commit adds the AMDGPU_INFO_FW_LSDMA firmware query subquery and
exposes LSDMA firmware and feature versions through amdgpu_firmware_info()
and debugfs.

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 21ca29ff9eb78..a8d2acfabbd0e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -335,6 +335,10 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
>  		fw_info->ver = adev->sdma.instance[query_fw->index].fw_version;
>  		fw_info->feature = adev->sdma.instance[query_fw->index].feature_version;
>  		break;
> +	case AMDGPU_INFO_FW_LSDMA:
> +		fw_info->ver = adev->lsdma.fw_version;
> +		fw_info->feature = adev->lsdma.feature_version;
> +		break;
>  	case AMDGPU_INFO_FW_SOS:
>  		fw_info->ver = adev->psp.sos.fw_version;
>  		fw_info->feature = adev->psp.sos.feature_version;
> @@ -2022,6 +2026,16 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
>  			   i, fw_info.feature, fw_info.ver);
>  	}
>  
> +	/* LSDMA */
> +	if (adev->lsdma.fw) {
> +		query_fw.fw_type = AMDGPU_INFO_FW_LSDMA;
> +		ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
> +		if (ret)
> +			return ret;
> +		seq_printf(m, "LSDMA feature version: %u, firmware version: 0x%08x\n",
> +			   fw_info.feature, fw_info.ver);
> +	}
> +
>  	/* VCN */
>  	query_fw.fw_type = AMDGPU_INFO_FW_VCN;
>  	ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);

[Severity: High]
Does this fail to build because struct amdgpu_lsdma does not yet define
fw_version, feature_version, or fw?

In drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h, struct amdgpu_lsdma only
has lock, funcs, and inst_mask here, so building amdgpu_kms.c fails and
breaks git bisect.

Those fields are added in the next commit "drm/amdgpu: add lsdma v8 fw
loading support", so moving that patch before this one would keep the
series bisectable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=4

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

* Re: [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support
  2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
@ 2026-12-04 15:47   ` sashiko-bot
  0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 15:47 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] drm/amdgpu: struct amdgpu_lsdma fields added after parent
  commit uses them
- [Medium] drm/amdgpu: missing LSDMA firmware header, payload, and ALIGN
  bounds checks
- [Medium] drm/amdgpu: sdma_v8_0_early_init() leaks SDMA fw on LSDMA
  init failure
- [Medium] drm/amdgpu: leak LSDMA firmware on probe failure before
  sdma_v8_0_sw_init()
--

commit 8d33406c65061fd80329c2978329e7275ecae49b
Author: Frank Min <Frank.Min@amd.com>

drm/amdgpu: add lsdma v8 fw loading support

This commit adds LSDMA v8 firmware loading support, including the v1.0
firmware header definition, microcode initialization and teardown helpers,
and PSP/SDMA v8.0 integration.

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c
> index 1f83d9b69135b..5d093e25cac6d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.c

[ ... ]

> +	hdr = (const struct lsdma_firmware_header_v1_0 *)adev->lsdma.fw->data;
> +	switch (le16_to_cpu(hdr->header.header_version_major)) {
> +	case 1:
> +		break;
> +	default:
> +		err = -EINVAL;
> +		goto out;
> +	}
> +
> +	adev->lsdma.fw_version = le32_to_cpu(hdr->header.ucode_version);
> +	adev->lsdma.feature_version = le32_to_cpu(hdr->ucode_feature_version);
> +
> +	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
> +		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_LSDMA];
> +		info->ucode_id = AMDGPU_UCODE_ID_LSDMA;
> +		info->fw = adev->lsdma.fw;
> +		adev->firmware.fw_size +=
> +			ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE);
> +	}

[Severity: Medium]
Can a truncated or malformed LSDMA firmware image cause an out-of-bounds
read from fw->data or an out-of-bounds write into fw_buf here?

amdgpu_ucode_validate() only checks fw->size == le32_to_cpu(hdr->size_bytes),
so fw->data may be smaller than sizeof(*hdr), and neither this function nor
amdgpu_ucode_init_single_fw() checks that ucode_array_offset_bytes +
ucode_size_bytes fits within fw->size before memcpy().  In addition,
ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE) and the addition into
32-bit adev->firmware.fw_size can wrap around, causing
amdgpu_ucode_create_bo() to allocate an undersized firmware BO.

[ ... ]

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
> index f0a5eeb3529fb..79ac16e352d71 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_lsdma.h
> @@ -30,6 +30,9 @@ struct amdgpu_lsdma {
>  	struct mutex lock;
>  	const struct amdgpu_lsdma_funcs      *funcs;
>  	uint32_t inst_mask;
> +	const struct firmware *fw;
> +	uint32_t fw_version;
> +	uint32_t feature_version;
>  };

[Severity: High]
Does adding fw, fw_version, and feature_version here break git bisect with
the preceding commit "drm/amdgpu: add lsdma v8 fw query interface"?

That earlier commit already references adev->lsdma.fw_version and
adev->lsdma.feature_version in amdgpu_firmware_info() and adev->lsdma.fw in
amdgpu_debugfs_firmware_info_show(), so the tree fails to build at that
commit.  These struct fields (or this whole commit) should be ordered before
the query interface patch.

[ ... ]

> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
> index 58b85fbba2ca3..e39a005b0faf4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v8_0.c
> @@ -1293,6 +1293,12 @@ static int sdma_v8_0_early_init(struct amdgpu_ip_block *ip_block)
>  		return r;
>  	}
>  
> +	r = amdgpu_lsdma_init_microcode(adev);
> +	if (r) {
> +		DRM_ERROR("Failed to init lsdma firmware!\n");
> +		return r;
> +	}
> +
>  	sdma_v8_0_set_ring_funcs(adev);
>  	amdgpu_sdma_set_vm_pte_scheds(adev, &sdma_v8_0_vm_pte_funcs);
>  	sdma_v8_0_set_irq_funcs(adev);

[Severity: Medium]
Does returning here leak the SDMA firmware loaded just above by
amdgpu_sdma_init_microcode()?

When sdma_v8_0_early_init() fails, status.sw stays false and
amdgpu_device_ip_fini() skips sdma_v8_0_sw_fini(), so
amdgpu_sdma_destroy_inst_ctx(adev, true) never runs to release
adev->sdma.instance[0].fw.

> @@ -1377,6 +1383,7 @@ static int sdma_v8_0_sw_fini(struct amdgpu_ip_block *ip_block)
>  
>  	amdgpu_sdma_sysfs_reset_mask_fini(adev);
>  	amdgpu_sdma_destroy_inst_ctx(adev, true);
> +	amdgpu_lsdma_fini_microcode(adev);
>  
>  	if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)
>  		sdma_v8_0_0_free_ucode_buffer(adev);

[Severity: Medium]
Can adev->lsdma.fw be leaked if device probe fails after
sdma_v8_0_early_init() succeeds but before sdma_v8_0_sw_init() completes?

amdgpu_device_ip_init() only sets status.sw after sw_init() returns 0, and
sdma_v8_0_ip_funcs has no early_fini callback, so amdgpu_device_ip_fini()
skips sdma_v8_0_sw_fini() on an earlier probe failure (such as another IP
block's early_init() or an error inside sdma_v8_0_sw_init()).  Moving the
microcode init into sw_init() or providing an early_fini callback would
ensure adev->lsdma.fw is released.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=5

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

* Re: [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13
  2026-12-04 14:24 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 Frank Min
@ 2026-12-04 16:01   ` sashiko-bot
  0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 16:01 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/amdgpu: fb_start split in gmc_v13_0_vram_gtt_location()
  breaks DMUB
- [Low] drm/amdgpu: missing Fixes trailer for
  gmc_v13_0_vram_gtt_location() bug fix
--

commit 161a9a2ab1dbbfb524cfebbbafa5623789e83c80
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: Fix system aperture size for gfx13
>
> Gfx13 vram layout introduced vram offset, but aperture space should
> not be affected. So fix system aperture size to align with it.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Kevin Wang <kevin.wang@amd.com>

[Severity: Low]
This looks like a bug fix for the GFX13 aperture setup.  Should this
include:

  Fixes: 41a7a8f5012e ("drm/amdgpu: Add gmc v13_0 support")

> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
> index 49fee18eb5253..b548b748d670e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
> @@ -618,10 +618,14 @@ static int gmc_v13_0_late_init(struct amdgpu_ip_block *ip_block)
>  	return amdgpu_irq_get(adev, &adev->gmc.vm_fault, 0);
>  }
>  
> -static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc, u64 base, u64 offset)
> +static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev,
> +					struct amdgpu_gmc *mc, u64 base)
>  {
>  	amdgpu_gmc_set_agp_default(adev, mc);
>  	amdgpu_gmc_vram_location(adev, mc, base);
> +
> +	if (!amdgpu_sriov_vf(adev))
> +		mc->fb_start = adev->mmhub.funcs->get_fb_location(adev);
>  	amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_LOW);
>  	if (!amdgpu_sriov_vf(adev) && (amdgpu_agp == 1))
>  		amdgpu_gmc_agp_location(adev, mc);
> @@ -630,7 +634,9 @@ static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgp
>  	if (amdgpu_sriov_vf(adev))
>  		adev->vm_manager.vram_base_offset = 0;
>  	else
> -		adev->vm_manager.vram_base_offset = adev->mmhub.funcs->get_mc_fb_offset(adev) + offset;
> +		adev->vm_manager.vram_base_offset =
> +			adev->mmhub.funcs->get_mc_fb_offset(adev) +
> +			mc->vram_start - mc->fb_start;
>  }

[Severity: Medium]
Does splitting mc->fb_start from mc->vram_start here break DMUB address
translation during backdoor firmware loading?

dm_dmub_hw_init() pairs adev->gmc.fb_start with
adev->vm_manager.vram_base_offset:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c:dm_dmub_hw_init() {
	...
	hw_params.soc_fb_info.fb_base = adev->gmc.fb_start;
	hw_params.soc_fb_info.fb_offset = adev->vm_manager.vram_base_offset;
	...
}

On bare-metal GFX13 with a non-zero HDP VRAM offset, mc->fb_start is now
the unshifted FB location while adev->vm_manager.vram_base_offset stays
shifted by (mc->vram_start - mc->fb_start).  When
adev->firmware.load_type is not AMDGPU_FW_LOAD_PSP,
dmub_dcn60_backdoor_load() translates CW0 and CW1 VRAM addresses via
dmub_dcn60_translate_addr() (addr_in - fb_base + fb_offset), which
double-counts that offset.

This shifts DMCUB_REGION3_CW0_OFFSET and DMCUB_REGION3_CW1_OFFSET outside
the DMUB VRAM BO, causing backdoor boot to fail or stack DMA writes to
corrupt VRAM.  Should dm_dmub_hw_init() pair adev->gmc.vram_start with
adev->vm_manager.vram_base_offset instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=6

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

* Re: [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() for gfx13
  2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
@ 2026-12-04 16:03   ` Alex Deucher
  2026-12-04 16:11   ` sashiko-bot
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:03 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx

On Fri, Dec 4, 2026 at 9:31 AM Frank Min <Frank.Min@amd.com> wrote:
>
> remove the unused ring parameter in update_spm_vmid() for gfx13.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>

What branch is this against?  Ring is a valid parameter.

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> index f0ac919a43480..9ef249b95f916 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> @@ -2134,7 +2134,7 @@ static int gfx_v13_0_rlc_resume(struct amdgpu_device *adev)
>
>         /* init spm vmid with 0xf */
>         if (adev->gfx.rlc.funcs->update_spm_vmid)
> -               adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, NULL, adev->vm_manager.spm_vmid);
> +               adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, adev->vm_manager.spm_vmid);
>
>         return 0;
>  }
> @@ -3963,22 +3963,12 @@ static void gfx_v13_0_update_perf_clk(struct amdgpu_device *adev,
>
>  static void gfx_v13_0_update_spm_vmid(struct amdgpu_device *adev,
>                                       int xcc_id,
> -                                     struct amdgpu_ring *ring,
>                                       unsigned vmid)
>  {
>         u32 reg, data;
>
>         reg = SOC15_REG_OFFSET(GC, 0, regRLC_SPM_MC_CNTL);
>
> -       if (ring) {
> -               if ((ring->funcs->type == AMDGPU_RING_TYPE_GFX) ||
> -                   (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)) {
> -                       data = (vmid & RLC_SPM_MC_CNTL__RLC_SPM_VMID_MASK) << RLC_SPM_MC_CNTL__RLC_SPM_VMID__SHIFT;
> -                       amdgpu_ring_emit_wreg(ring, reg, data);
> -               }
> -               return;
> -       }
> -
>         amdgpu_gfx_off_ctrl(adev, false);
>         if (amdgpu_sriov_is_pp_one_vf(adev))
>                 data = RREG32_NO_KIQ(reg);
> --
> 2.43.0
>

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

* Re: [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring
  2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
  2026-12-04 14:55   ` sashiko-bot
@ 2026-12-04 16:05   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:05 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx, Hawking Zhang

On Fri, Dec 4, 2026 at 9:31 AM Frank Min <Frank.Min@amd.com> wrote:
>
> Disable gfx13 pipe 1 ring usage from the driver.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
>  drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c  | 9 +++++++--
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 75c3ded068db5..1a1d176357b30 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -676,7 +676,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
>                     ring == &adev->mes.ring[1] ||
>                     ring == &adev->umsch_mm.ring ||
>                     ring == &adev->cper.ring_buf ||
> -                   ring == &adev->gfx.kiq[0].ring)
> +                   ring == &adev->gfx.kiq[0].ring ||
> +                   ring == &adev->gfx.gfx_ring[1])

Won't this break other parts which use gfx ring 1?  I think this patch
should be dropped.

Alex

>                         continue;
>
>                 /* Skip if the ring is a shared ring */
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> index c06fa6b9b2991..f0ac919a43480 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> @@ -990,10 +990,13 @@ static int gfx_v13_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,
>         ring->ring_obj = NULL;
>         ring->use_doorbell = true;
>
> -       if (!ring_id)
> +       if (!ring_id) {
>                 ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
> -       else
> +       } else {
>                 ring->doorbell_index = adev->doorbell_index.gfx_ring1 << 1;
> +               ring->no_scheduler = true;
> +       }
> +
>         ring->vm_hub = AMDGPU_GFXHUB(0);
>         sprintf(ring->name, "gfx_%d.%d.%d", ring->me, ring->pipe, ring->queue);
>
> @@ -3658,6 +3661,8 @@ static int gfx_v13_0_hw_init(struct amdgpu_ip_block *ip_block)
>         if (r)
>                 return r;
>
> +       adev->gfx.gfx_ring[1].sched.ready = false;
> +
>         return r;
>  }
>
> --
> 2.43.0
>

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

* Re: [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() for gfx13
  2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
  2026-12-04 16:03   ` Alex Deucher
@ 2026-12-04 16:11   ` sashiko-bot
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 16:11 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] drm/amdgpu: update_spm_vmid() signature mismatch breaks
  gfx_v13_0.c build
- [High] drm/amdgpu: dropping ring path in gfx_v13_0_update_spm_vmid()
  breaks IB SPM
--

commit a118ecae2dc4a26b43bad4e4bf47f778ad08d52a
Author: Frank Min <Frank.Min@amd.com>

drm/amdgpu: remove the unused ring parameter in update_spm_vmid() for gfx13

This patch removes the ring parameter and its in-band ring write path from
gfx_v13_0_update_spm_vmid(), and updates its call site in
gfx_v13_0_rlc_resume() accordingly.

> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> index f0ac919a43480..9ef249b95f916 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> @@ -2134,7 +2134,7 @@ static int gfx_v13_0_rlc_resume(struct amdgpu_device *adev)
>  
>  	/* init spm vmid with 0xf */
>  	if (adev->gfx.rlc.funcs->update_spm_vmid)
> -		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, NULL, adev->vm_manager.spm_vmid);
> +		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0, adev->vm_manager.spm_vmid);

[Severity: High]
Does this break the build due to a signature mismatch with struct
amdgpu_rlc_funcs?

struct amdgpu_rlc_funcs in drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h still
declares update_spm_vmid with four parameters, including struct amdgpu_ring
*ring, as restored by e9ebb72a64b6 ("drm/amdgpu: bring back the ring
parameter for update_spm_vmid()").

Calling update_spm_vmid() with three arguments here fails compilation, as
does assigning the three-parameter gfx_v13_0_update_spm_vmid() to
gfx_v13_0_rlc_funcs.update_spm_vmid.

[ ... ]

> @@ -3963,22 +3963,12 @@ static void gfx_v13_0_update_perf_clk(struct amdgpu_device *adev,
>  
>  static void gfx_v13_0_update_spm_vmid(struct amdgpu_device *adev,
>  				      int xcc_id,
> -				      struct amdgpu_ring *ring,
>  				      unsigned vmid)
>  {
>  	u32 reg, data;
>  
>  	reg = SOC15_REG_OFFSET(GC, 0, regRLC_SPM_MC_CNTL);
>  
> -	if (ring) {
> -		if ((ring->funcs->type == AMDGPU_RING_TYPE_GFX) ||
> -		    (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)) {
> -			data = (vmid & RLC_SPM_MC_CNTL__RLC_SPM_VMID_MASK) << RLC_SPM_MC_CNTL__RLC_SPM_VMID__SHIFT;
> -			amdgpu_ring_emit_wreg(ring, reg, data);
> -		}
> -		return;
> -	}
> -
>  	amdgpu_gfx_off_ctrl(adev, false);
>  	if (amdgpu_sriov_is_pp_one_vf(adev))
>  		data = RREG32_NO_KIQ(reg);

[Severity: High]
Is the ring parameter actually unused, and does deleting this branch break
in-band SPM updates during IB submission?

amdgpu_ib_schedule() still passes a non-NULL ring to update_spm_vmid() on
every gfx and compute IB submission.  Both gfx_v13_0_ring_funcs_gfx and
gfx_v13_0_ring_funcs_compute also reserve 5 dwords in emit_frame_size for
this write.

Even if the signature were reconciled, dropping the if (ring) path loses
the ring-based regRLC_SPM_MC_CNTL update across gfxoff cycles and forces
every IB submission through amdgpu_gfx_off_ctrl() (acquiring
adev->gfx.gfx_off_mutex) and unlocked CPU register read-modify-writes.

Should this patch be dropped instead so gfx13 keeps the ring path?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=7

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

* Re: [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading
  2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
@ 2026-12-04 16:12   ` Alex Deucher
  2026-12-04 16:52   ` sashiko-bot
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:12 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx

On Fri, Dec 4, 2026 at 9:41 AM Frank Min <Frank.Min@amd.com> wrote:
>
> Reset the GRBM selection before dropping srbm_mutex.
>
> Fix gfx v11.0/v12.0/v12.1 and v13.0.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++--
>  drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +-
>  drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 2 +-
>  drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c | 3 ++-

Would be good to split this out per IP to make it easier to backport
to stable.  WIth that fixed,
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>  4 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index ea74defe7fea0..13ff74ec3a540 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -3030,8 +3030,8 @@ static int gfx_v11_0_config_mec_cache_rs64(struct amdgpu_device *adev, uint64_t
>                 WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
>                      upper_32_bits(addr));
>         }
> -       mutex_unlock(&adev->srbm_mutex);
>         soc21_grbm_select(adev, 0, 0, 0, 0);
> +       mutex_unlock(&adev->srbm_mutex);
>
>         /* Trigger an invalidation of the L1 instruction caches */
>         tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
> @@ -3989,8 +3989,8 @@ static int gfx_v11_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
>                 WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
>                      upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
>         }
> -       mutex_unlock(&adev->srbm_mutex);
>         soc21_grbm_select(adev, 0, 0, 0, 0);
> +       mutex_unlock(&adev->srbm_mutex);
>
>         /* Trigger an invalidation of the L1 instruction caches */
>         tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
> index 8d6e74167d1c4..02894a2bb4bf3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
> @@ -2860,8 +2860,8 @@ static int gfx_v12_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
>                 WREG32_SOC15(GC, 0, regCP_CPC_IC_BASE_HI,
>                              upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
>         }
> -       mutex_unlock(&adev->srbm_mutex);
>         soc24_grbm_select(adev, 0, 0, 0, 0);
> +       mutex_unlock(&adev->srbm_mutex);
>
>         /* Trigger an invalidation of the L1 instruction caches */
>         tmp = RREG32_SOC15(GC, 0, regCP_MEC_DC_OP_CNTL);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
> index d393435e994b2..b200863bad906 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
> @@ -2183,8 +2183,8 @@ static int gfx_v12_1_xcc_cp_compute_load_microcode_rs64(struct amdgpu_device *ad
>                 WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_CPC_IC_BASE_HI,
>                                 upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
>         }
> -       mutex_unlock(&adev->srbm_mutex);
>         soc_v1_0_grbm_select(adev, 0, 0, 0, 0, GET_INST(GC, xcc_id));
> +       mutex_unlock(&adev->srbm_mutex);
>
>         /* Trigger an invalidation of the L1 instruction caches */
>         tmp = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DC_OP_CNTL);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> index 9ef249b95f916..439e51ded70ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v13_0.c
> @@ -2877,8 +2877,9 @@ static int gfx_v13_0_cp_compute_load_microcode_rs64(struct amdgpu_device *adev)
>                                 upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
>                 }
>         }
> -       mutex_unlock(&adev->srbm_mutex);
>         soc_v2_0_grbm_select(adev, 0, 0, 0, 0);
> +       mutex_unlock(&adev->srbm_mutex);
> +
>         /* Trigger an invalidation of the L1 instruction caches */
>         tmp = RREG32_SOC15(GC, 0, regCP_CPC_IC_OP_NATIVE_CNTL);
>         tmp = REG_SET_FIELD(tmp, CP_CPC_IC_OP_NATIVE_CNTL, INVALIDATE_CACHE, 1);
> --
> 2.43.0
>

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

* Re: [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring
  2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
                   ` (8 preceding siblings ...)
  2026-12-04 14:41 ` [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring sashiko-bot
@ 2026-12-04 16:16 ` Alex Deucher
  9 siblings, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:16 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx, Hawking Zhang

On Fri, Dec 4, 2026 at 10:01 AM Frank Min <Frank.Min@amd.com> wrote:
>
> skip vm inv for kiq ring
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
> --->  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 23354bf366880..75c3ded068db5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -675,7 +675,8 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
>                 if (ring == &adev->mes.ring[0] ||
>                     ring == &adev->mes.ring[1] ||
>                     ring == &adev->umsch_mm.ring ||
> -                   ring == &adev->cper.ring_buf)
> +                   ring == &adev->cper.ring_buf ||
> +                   ring == &adev->gfx.kiq[0].ring)

Per Sashiko's comments, I think this skip all KIQ rings.

Alex

>                         continue;
>
>                 /* Skip if the ring is a shared ring */
> --
> 2.43.0
>

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

* Re: [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary
  2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
  2026-12-04 15:14   ` sashiko-bot
@ 2026-12-04 16:19   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:19 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx, Hawking Zhang

On Fri, Dec 4, 2026 at 9:41 AM Frank Min <Frank.Min@amd.com> wrote:
>
> Update table info retrieval from discovery binary to align with
> discovery table update.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-By: Hawking Zhang <Hawking.Zhang@amd.com>

Please double check Sashiko's comments.  Note that this patch caused
regressions in CI for IP discovery parsing when I checked it.  I
didn't check to see if you changed anything from the original patch.

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 47 +++++++++++++------
>  1 file changed, 33 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 6fba2560a2abe..50b0112825c42 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -609,18 +609,36 @@ amdgpu_discovery_get_table_info_from_bin(uint8_t *discovery_bin,
>                                          uint16_t table_id)
>  {
>         struct binary_header *bhdr = (struct binary_header *)discovery_bin;
> -       struct binary_header_v2 *bhdrv2;
> -
> -       switch (bhdr->version_major) {
> -       case 2:
> -               bhdrv2 = (struct binary_header_v2 *)discovery_bin;
> -               return &bhdrv2->table_list[table_id];
> -       case 1:
> +       struct binary_header_v2 *bhdrv2 = (struct binary_header_v2 *)discovery_bin;
> +       uint16_t version = le16_to_cpu(bhdr->version_major);
> +       uint16_t binary_size = le16_to_cpu(bhdr->binary_size);
> +       struct table_info *table_list;
> +       uint16_t num_tables, i;
> +       size_t table_offset;
> +
> +       switch (version) {
>         case 0:
> -               return &bhdr->table_list[table_id];
> +       case 1:
> +               table_list = bhdr->table_list;
> +               num_tables = ARRAY_SIZE(bhdr->table_list);
> +               break;
> +       case 2:
> +               table_list = bhdrv2->table_list;
> +               num_tables = le16_to_cpu(bhdrv2->num_tables);
> +               break;
>         default:
>                 return NULL;
>         }
> +
> +       table_offset = (uint8_t *)table_list - discovery_bin;
> +       if (table_offset + num_tables * sizeof(*table_list) > binary_size)
> +               return NULL;
> +
> +       for (i = 0; i < num_tables; i++)
> +               if (le16_to_cpu(table_list[i].table_id) == table_id)
> +                       return &table_list[i];
> +
> +       return NULL;
>  }
>
>  static int amdgpu_discovery_get_table_info(struct amdgpu_device *adev,
> @@ -633,8 +651,8 @@ static int amdgpu_discovery_get_table_info(struct amdgpu_device *adev,
>         *info = amdgpu_discovery_get_table_info_from_bin(adev->discovery.bin,
>                                                          table_id);
>         if (!*info) {
> -               dev_err(adev->dev, "Invalid ip discovery table version %d\n",
> -                       bhdr->version_major);
> +               dev_err(adev->dev, "Not found table for header version %d table id %d\n",
> +                       bhdr->version_major, table_id);
>                 return -EINVAL;
>         }
>
> @@ -645,15 +663,16 @@ static int amdgpu_discovery_table_check(struct amdgpu_device *adev,
>                                         uint8_t *discovery_bin,
>                                         uint16_t table_id)
>  {
> -       int r, act_val, exp_val, table_size;
> +       int act_val, exp_val, table_size;
>         uint16_t offset, checksum;
>         struct table_info *info;
>         bool check_table = true;
>         char *table_name;
>
> -       r = amdgpu_discovery_get_table_info(adev, &info, table_id);
> -       if (r)
> -               return r;
> +       info = amdgpu_discovery_get_table_info_from_bin(discovery_bin, table_id);
> +       if (!info)
> +               return 0;
> +
>         offset = le16_to_cpu(info->offset);
>         checksum = le16_to_cpu(info->checksum);
>
> --
> 2.43.0
>

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

* Re: [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface
  2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
  2026-12-04 15:25   ` sashiko-bot
@ 2026-12-04 16:21   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 16:21 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx, Kevin Wang

On Fri, Dec 4, 2026 at 9:41 AM Frank Min <Frank.Min@amd.com> wrote:
>
> Add lsdma v8 fw query interface.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>
> Reviewed-by: Kevin Wang <kevin.wang@amd.com>

This should come after patch 5 to avoid breaking the build.  WIth that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++++++
>  include/uapi/drm/amdgpu_drm.h           |  2 ++
>  2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 75fc49fb4b319..e6872352e0035 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -332,6 +332,10 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
>                 fw_info->ver = adev->sdma.instance[query_fw->index].fw_version;
>                 fw_info->feature = adev->sdma.instance[query_fw->index].feature_version;
>                 break;
> +       case AMDGPU_INFO_FW_LSDMA:
> +               fw_info->ver = adev->lsdma.fw_version;
> +               fw_info->feature = adev->lsdma.feature_version;
> +               break;
>         case AMDGPU_INFO_FW_SOS:
>                 fw_info->ver = adev->psp.sos.fw_version;
>                 fw_info->feature = adev->psp.sos.feature_version;
> @@ -2028,6 +2032,16 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
>                            i, fw_info.feature, fw_info.ver);
>         }
>
> +       /* LSDMA */
> +       if (adev->lsdma.fw) {
> +               query_fw.fw_type = AMDGPU_INFO_FW_LSDMA;
> +               ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
> +               if (ret)
> +                       return ret;
> +               seq_printf(m, "LSDMA feature version: %u, firmware version: 0x%08x\n",
> +                          fw_info.feature, fw_info.ver);
> +       }
> +
>         /* VCN */
>         query_fw.fw_type = AMDGPU_INFO_FW_VCN;
>         ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index a9aa08c8d3095..37eeef7f43145 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -1228,6 +1228,8 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
>         #define AMDGPU_INFO_FW_VPE              0x1c
>         /* Subquery id: Query MP5 firmware version */
>         #define AMDGPU_INFO_FW_MP5              0x1d
> +       /* Subquery id: Query LSDMA firmware version */
> +       #define AMDGPU_INFO_FW_LSDMA            0x1e
>
>  /* number of bytes moved for TTM migration */
>  #define AMDGPU_INFO_NUM_BYTES_MOVED            0x0f
> --
> 2.43.0
>

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

* Re: [PATCH 8/9] drm/amdgpu: enable uni-mes for gfx13
  2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
@ 2026-12-04 16:41   ` sashiko-bot
  2026-12-04 17:24   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 16:41 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 9 potential
issues to consider:
- [High] drm/amdgpu: GFX13 MES enabled with no-op
  suspend_gang/resume_gang stubs
- [High] drm/amdgpu: mes_v13_0_submit_pkt_and_poll_completion() returns
  0 on errors
- [High] drm/amdgpu: mes_v13_0_remove_hw_queue() omits queue_type and
  reset flag
- [Medium] drm/amdgpu: GFX13 uni-mes routes legacy KQs and resets to KIQ
  pipe
- [Medium] drm/amdgpu: amdgpu_mes_queue_reset_by_mes_supported() omits
  GC 13.x
- [Medium] drm/amdgpu: missing MODULE_FIRMWARE declarations for GC
  13.0.4 MES firmware
- [Medium] drm/amdgpu: literal 0 write clears regCP_MQD_CONTROL in
  mes_v13_0_queue_init_register()
- [Medium] drm/amdgpu: mes_v13_0_set_hw_resources_1() gated on 0x4b and
  unchecked
- [Low] drm/amdgpu: commit message omits unconditional enable_mes and
  enable_mes_kiq
--

commit bfe01128f1efb4aa22fc5a9f7950763067c635fd
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: enable uni-mes for gfx13
>
> Enable uni-mes for gfx13.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>

[Severity: Low]
The subject and body only mention enabling uni-mes, but this patch also
unconditionally enables adev->enable_mes and adev->enable_mes_kiq for both
GC 13.0.1 and GC 13.0.4 even when amdgpu.uni_mes=0 is set.  Could the
commit message describe all three changes and explain why GFX13 is ready
for MES enablement?

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 5997946fb1171..292245f167e07 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -3407,10 +3407,10 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
>  	case IP_VERSION(13, 0, 1):
>  	case IP_VERSION(13, 0, 4):
>  		amdgpu_device_ip_block_add(adev, &mes_v13_0_ip_block);
> -		adev->enable_mes = false;
> -		adev->enable_mes_kiq = false;
> +		adev->enable_mes = true;

[Severity: High]
Can GFX13 enable MES before mes_v13_0_suspend_gang() and
mes_v13_0_resume_gang() are implemented?

Both callbacks in drivers/gpu/drm/amd/amdgpu/mes_v13_0.c are empty stubs
returning 0 without submitting a packet or signaling the suspend fence.
During user queue preemption (such as S0ix suspend or enforce_isolation
switches), mes_userq_preempt() zeroes *fence_ptr, calls suspend_gang(),
and busy-waits in a udelay(1) loop for 2.1 seconds per queue before
failing with -ETIMEDOUT, marking healthy queues hung while leaving them
active on hardware.

In addition, amdgpu_mes_suspend_resume_all_supported() returns true for
GC 13.x, so amdgpu_gfx_reset_mes_compute() treats the stub 0 return from
amdgpu_mes_suspend() as all gangs suspended and skips
amdgpu_mes_detect_and_reset_hung_queues().

[Severity: High]
Does mes_v13_0_submit_pkt_and_poll_completion() silently return 0 on MES
command failures?

Per MES_API_STATUS in drivers/gpu/drm/amd/include/mes_v13_api_def.h, MES
v13 reports API rejections by writing 0 to the lower 32 bits and a
non-zero error code to the upper 32 bits.  Testing !*status_ptr across
all 64 bits instead of !lower_32_bits(*status_ptr) treats rejected
commands as success.

Similarly, when amdgpu_fence_wait_polling() times out waiting for ring
space, it returns 0, and jumping to error_undo returns 0 without
submitting the packet instead of -ETIMEDOUT.  If
mes_v13_0_remove_hw_queue() falsely succeeds on either error,
amdgpu_userq_destroy() skips GPU reset and frees the queue BOs while the
queue may still be active on hardware, risking DMA use-after-free.

[Severity: High]
Does mes_v13_0_remove_hw_queue() leave mes_remove_queue_pkt.queue_type at
0 (MES_QUEUE_TYPE_GFX) for compute and SDMA queues?

With adev->enable_mes enabled, KFD and userq tear down compute and SDMA
queues through this function, but it only populates doorbell_offset and
gang_context_addr.  As seen in commit 89db46e455ab ("drm/amdgpu,amdkfd:
correct setting MES queue type"), sending REMOVE_QUEUE with the wrong
queue type makes MES search the wrong queue class, causing unmap hangs
or leaving the queue active after its memory is freed.

It also ignores input->remove_queue_after_reset, breaking post-reset
cleanup in reset_queue_mes().

[Severity: Medium]
Should amdgpu_mes_queue_reset_by_mes_supported() in
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c also handle GC 13.x?

It currently only checks GC 11.x, 12.0, and 12.1, so it returns false on
GFX13 even though gfx_v13_0 advertises per-queue compute reset.  When a
KFD compute queue hangs, reset_queues_mes() fails with -ENOTRECOVERABLE
and escalates to a full GPU reset.

> +		adev->enable_mes_kiq = true;

[Severity: Medium]
Now that adev->enable_mes_kiq is enabled, does
mes_v13_0_queue_init_register() wipe regCP_MQD_CONTROL?

drivers/gpu/drm/amd/amdgpu/mes_v13_0.c:mes_v13_0_queue_init_register() {
    ...
	data = RREG32_SOC15(GC, 0, regCP_MQD_CONTROL);
	data = REG_SET_FIELD(data, CP_MQD_CONTROL, VMID, 0);
	WREG32_SOC15(GC, 0, regCP_MQD_CONTROL, 0);
    ...
}

Writing literal 0 instead of data clears PRIV_STATE and the other control
fields during MES KIQ HQD setup on every init, resume, and reset.

>  		if (amdgpu_uni_mes)
> -			adev->enable_uni_mes = false;
> +			adev->enable_uni_mes = true;

[Severity: Medium]
Should mes_v13_0_map_legacy_queue(), mes_v13_0_unmap_legacy_queue(), and
mes_v13_0_reset_hw_queue() use AMDGPU_MES_SCHED_PIPE for non-MES legacy
kernel queues when enable_uni_mes is set?

All three functions in drivers/gpu/drm/amd/amdgpu/mes_v13_0.c currently
send legacy kernel queues and is_kq resets to AMDGPU_MES_KIQ_PIPE.  As
fixed for GFX12 in commit 5ec4cc917083 ("drm/amdgpu/mes_v12_0: use mes
schedule pipe for legacy queues on unified MES"), pipe 0 MES only tracks
queues on the schedule pipe, leaving legacy kernel queues (when booted
with amdgpu.user_queue=0 or 1) inconsistent across suspend/resume and
resets.

[Severity: Medium]
Are MODULE_FIRMWARE declarations missing for GC 13.0.4 MES firmware?

drivers/gpu/drm/amd/amdgpu/mes_v13_0.c only declares MODULE_FIRMWARE for
gc_13_0_1, whereas enabling MES on IP_VERSION(13, 0, 4) makes
amdgpu_mes_init_microcode() require amdgpu/gc_13_0_4_uni_mes.bin (or
gc_13_0_4_mes.bin and gc_13_0_4_mes1.bin with amdgpu.uni_mes=0).
Initramfs builders using modinfo will omit them, causing probe to fail
with -ENODEV during early boot.

[Severity: Medium]
Should mes_v13_0_hw_init() call mes_v13_0_set_hw_resources_1()
unconditionally and check its return value in both mes_v13_0_hw_init()
and mes_v13_0_kiq_hw_init()?

On GFX13, mes_v13_0_set_hw_resources_1() is the only place sdma_hqd_mask
is sent to MES, yet mes_v13_0_hw_init() gates it on sched_version >= 0x4b
(a GFX12 check from commit 0180e0a5dd5c ("drm/amdgpu/mes: add
compatibility checks for set_hw_resource_1")) while
mes_v13_0_kiq_hw_init() calls it unconditionally.  On GFX13 firmware with
a version below 0x4b, this leaves sdma_hqd_mask zeroed and breaks MES
SDMA user-queue scheduling.

Both callers also discard the int return value of
mes_v13_0_set_hw_resources_1(), allowing MES initialization to succeed
even if the packet submission or completion fails.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=8

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

* Re: [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading
  2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
  2026-12-04 16:12   ` Alex Deucher
@ 2026-12-04 16:52   ` sashiko-bot
  1 sibling, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-12-04 16:52 UTC (permalink / raw)
  To: Frank Min, amd-gfx

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/amdgpu: missing Fixes trailers for srbm_mutex unlock
  ordering fix
--

commit daa9e4b41815085d7ee15f7c8391275134b52ff7
Author: Frank Min <Frank.Min@amd.com>

> drm/amdgpu: fix mutex unlock position for ucode loading
>
> Reset the GRBM selection before dropping srbm_mutex.
>
> Fix gfx v11.0/v12.0/v12.1 and v13.0.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>

[Severity: Low]
This fixes a locking bug across gfx v11.0, v12.0, v12.1, and v13.0 where
adev->srbm_mutex was unlocked before resetting GRBM_GFX_CNTL.  Should this
include Fixes tags for the introducing commits?

  Fixes: 3d879e81f0f9 ("drm/amdgpu: add init support for GFX11 (v2)")
  Fixes: 52cb80c12e8a ("drm/amdgpu: Add gfx v12_0 ip block support (v6)")
  Fixes: ad5f1ee0a9b0 ("drm/amdgpu: Add initial support for gfx v12_1")
  Fixes: bffef1cc5b3d ("drm/amdgpu: Add gfx v13 ip block")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142408.988734-1-Frank.Min@amd.com?part=9

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

* Re: [PATCH 8/9] drm/amdgpu: enable uni-mes for gfx13
  2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
  2026-12-04 16:41   ` sashiko-bot
@ 2026-12-04 17:24   ` Alex Deucher
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Deucher @ 2026-12-04 17:24 UTC (permalink / raw)
  To: Frank Min; +Cc: amd-gfx

On Fri, Dec 4, 2026 at 9:24 AM Frank Min <Frank.Min@amd.com> wrote:
>
> Enable uni-mes for gfx13.
>
> Signed-off-by: Frank Min <Frank.Min@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
We may want to get rid of the amdgpu_uni_mes parameter at some point?
I don't think any of the chips that support uni-mes actually support
non-uni-mes in production.

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 50b0112825c42..c8fe1cb45dd95 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -3424,10 +3424,10 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)
>         case IP_VERSION(13, 0, 1):
>         case IP_VERSION(13, 0, 4):
>                 amdgpu_device_ip_block_add(adev, &mes_v13_0_ip_block);
> -               adev->enable_mes = false;
> -               adev->enable_mes_kiq = false;
> +               adev->enable_mes = true;
> +               adev->enable_mes_kiq = true;
>                 if (amdgpu_uni_mes)
> -                       adev->enable_uni_mes = false;
> +                       adev->enable_uni_mes = true;
>                 break;
>         default:
>                 break;
> --
> 2.43.0
>

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

end of thread, other threads:[~2026-12-04 17:25 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
2026-12-04 14:55   ` sashiko-bot
2026-12-04 16:05   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
2026-12-04 15:14   ` sashiko-bot
2026-12-04 16:19   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
2026-12-04 15:25   ` sashiko-bot
2026-12-04 16:21   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
2026-12-04 15:47   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 Frank Min
2026-12-04 16:01   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
2026-12-04 16:03   ` Alex Deucher
2026-12-04 16:11   ` sashiko-bot
2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
2026-12-04 16:41   ` sashiko-bot
2026-12-04 17:24   ` Alex Deucher
2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
2026-12-04 16:12   ` Alex Deucher
2026-12-04 16:52   ` sashiko-bot
2026-12-04 14:41 ` [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring sashiko-bot
2026-12-04 16:16 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox