Skip to contentSkip to conversation

drm/amdgpu: add UMSCH HW IP

PATCH In review Ruijing Dong 2 participants 2 messages Jun 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: add UMSCH HW IP

This part enumerates a UMSCH block under hardware id (22) at version 2.2.0 rather than under VCN. Add the UMSCH hardware id, an IP enum slot, and the discovery name/map entries so it is recognized.

The multimedia IP setup assumed VCN/VCE/UVD was always present; handle the case where it is absent so init does not fail with -EINVAL.

Assisted-by Claude:claude-opus-4-8 checkpatch
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c    | 9 ++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h           | 1 +
 drivers/gpu/drm/amd/include/soc15_hw_ip.h        | 1 +
 4 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +1 -0
index 322c55aaf15f..ba2f15d12751 100644
@@ -63,6 +63,7 @@ const char *hw_ip_names[MAX_HWIP] = {
 	[VCN1_HWIP]		= "VCN1",
 	[VCE_HWIP]		= "VCE",
 	[VPE_HWIP]		= "VPE",
+	[UMSCH_HWIP]		= "UMSCH",
 	[DF_HWIP]		= "DF",
 	[DCE_HWIP]		= "DCE",
 	[OSSSYS_HWIP]		= "OSSSYS",
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +8 -1
index 2cfcfa29204a..430f68181005 100644
@@ -226,6 +226,7 @@ static const char *hw_id_names[HW_ID_MAX] = {
 	[XGBE_HWID]		= "XGBE",
 	[MP0_HWID]		= "MP0",
 	[VPE_HWID]		= "VPE",
+	[UMSCH_HWID]		= "UMSCH",
 	[ATU_HWID]		= "ATU",
 	[AIGC_HWID]		= "AIGC",
 };
@@ -258,6 +259,7 @@ static int hw_id_map[MAX_HWIP] = {
 	[DCI_HWIP]	= DCI_HWID,
 	[PCIE_HWIP]	= PCIE_HWID,
 	[VPE_HWIP]	= VPE_HWID,
+	[UMSCH_HWIP]	= UMSCH_HWID,
 	[ISP_HWIP]	= ISP_HWID,
 	[ATU_HWIP]	= ATU_HWID,
 };
@@ -2631,7 +2633,12 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
 			return -EINVAL;
 		}
 	} else {
-		switch (amdgpu_ip_version(adev, UVD_HWIP, 0)) {
+		int vcn_version = amdgpu_ip_version(adev, UVD_HWIP, 0);
+
+		/* no VCN/JPEG discovered; nothing to add */
+		if (!vcn_version)
+			return 0;
+		switch (vcn_version) {
 		case IP_VERSION(1, 0, 0):
 		case IP_VERSION(1, 0, 1):
 			amdgpu_device_ip_block_add(adev, &vcn_v1_0_ip_block);
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h +1 -0
index 1d0df6d93957..590ad82f115e 100644
@@ -68,6 +68,7 @@ enum amd_hw_ip_block_type {
 	ISP_HWIP,
 	ATU_HWIP,
 	AIGC_HWIP,
+	UMSCH_HWIP,
 	MAX_HWIP
 };
 
drivers/gpu/drm/amd/include/soc15_hw_ip.h +1 -0
index a20e59584dde..60f588dd0130 100644
@@ -44,6 +44,7 @@
 #define SDPMUX_HWID                                       19
 #define NTB_HWID                                          20
 #define VPE_HWID                                          21
+#define UMSCH_HWID                                        22
 #define IOHC_HWID                                         24
 #define L2IMU_HWID                                        28
 #define VCE_HWID                                          32
Signature · 1 line
2.49.0.593.gd86a19f485
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Ruijing Dong

This part enumerates a UMSCH block under hardware id (22) at version 2.2.0 rather than under VCN. Add the UMSCH hardware id, an IP enum slot, and the discovery name/map entries so it is recognized.

The multimedia IP setup assumed VCN/VCE/UVD was always present; handle the case where it is absent so init does not fail with -EINVAL.

Assisted-by Claude:claude-opus-4-8 checkpatch
Quoted 80 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c    | 9 ++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h           | 1 +
 drivers/gpu/drm/amd/include/soc15_hw_ip.h        | 1 +
 4 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +1 -0
index 322c55aaf15f..ba2f15d12751 100644
@@ -63,6 +63,7 @@ const char *hw_ip_names[MAX_HWIP] = {
        [VCN1_HWIP]             = "VCN1",
        [VCE_HWIP]              = "VCE",
        [VPE_HWIP]              = "VPE",
+       [UMSCH_HWIP]            = "UMSCH",
        [DF_HWIP]               = "DF",
        [DCE_HWIP]              = "DCE",
        [OSSSYS_HWIP]           = "OSSSYS",
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +8 -1
index 2cfcfa29204a..430f68181005 100644
@@ -226,6 +226,7 @@ static const char *hw_id_names[HW_ID_MAX] = {
        [XGBE_HWID]             = "XGBE",
        [MP0_HWID]              = "MP0",
        [VPE_HWID]              = "VPE",
+       [UMSCH_HWID]            = "UMSCH",
        [ATU_HWID]              = "ATU",
        [AIGC_HWID]             = "AIGC",
 };
@@ -258,6 +259,7 @@ static int hw_id_map[MAX_HWIP] = {
        [DCI_HWIP]      = DCI_HWID,
        [PCIE_HWIP]     = PCIE_HWID,
        [VPE_HWIP]      = VPE_HWID,
+       [UMSCH_HWIP]    = UMSCH_HWID,
        [ISP_HWIP]      = ISP_HWID,
        [ATU_HWIP]      = ATU_HWID,
 };
@@ -2631,7 +2633,12 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
                        return -EINVAL;
                }
        } else {
-               switch (amdgpu_ip_version(adev, UVD_HWIP, 0)) {
+               int vcn_version = amdgpu_ip_version(adev, UVD_HWIP, 0);
+
+               /* no VCN/JPEG discovered; nothing to add */
+               if (!vcn_version)
+                       return 0;
+               switch (vcn_version) {
                case IP_VERSION(1, 0, 0):
                case IP_VERSION(1, 0, 1):
                        amdgpu_device_ip_block_add(adev, &vcn_v1_0_ip_block);
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h +1 -0
index 1d0df6d93957..590ad82f115e 100644
@@ -68,6 +68,7 @@ enum amd_hw_ip_block_type {
        ISP_HWIP,
        ATU_HWIP,
        AIGC_HWIP,
+       UMSCH_HWIP,
        MAX_HWIP
 };
 
drivers/gpu/drm/amd/include/soc15_hw_ip.h +1 -1
index a20e59584dde..60f588dd0130 100644
@@ -44,6 +44,7 @@
 #define SDPMUX_HWID                                       19
 #define NTB_HWID                                          20
 #define VPE_HWID                                          21
+#define UMSCH_HWID                                        22
 #define IOHC_HWID                                         24
 #define L2IMU_HWID                                        28
 #define VCE_HWID                                          32
--

2.49.0.593.gd86a19f485