On Mon, Jun 15, 2026 at 3:44 PM Ruijing Dong <[email protected]> wrote:
>
> 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.
>
> Reviewed-by: Boyuan Zhang <[email protected]>
> Signed-off-by: Ruijing Dong <[email protected]>
> Assisted-by: Claude:claude-opus-4-8 checkpatch

Acked-by: Alex Deucher <[email protected]>

> ---
>  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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> index 322c55aaf15f..ba2f15d12751 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> @@ -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",
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 2cfcfa29204a..430f68181005 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -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);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h
> index 1d0df6d93957..590ad82f115e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h
> @@ -68,6 +68,7 @@ enum amd_hw_ip_block_type {
>         ISP_HWIP,
>         ATU_HWIP,
>         AIGC_HWIP,
> +       UMSCH_HWIP,
>         MAX_HWIP
>  };
>
> diff --git a/drivers/gpu/drm/amd/include/soc15_hw_ip.h 
> b/drivers/gpu/drm/amd/include/soc15_hw_ip.h
> index a20e59584dde..60f588dd0130 100644
> --- a/drivers/gpu/drm/amd/include/soc15_hw_ip.h
> +++ b/drivers/gpu/drm/amd/include/soc15_hw_ip.h
> @@ -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
>

Reply via email to