[PATCH] drm/amd/amdgpu: unified amdgpu ip block name
Wang, Yang(Kevin)
KevinYang.Wang at amd.com
Wed Aug 27 07:20:05 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Wang, Yang(Kevin)
Sent: Wednesday, August 27, 2025 02:13
To: Alex Deucher <alexdeucher at gmail.com>
Cc: amd-gfx at lists.freedesktop.org; Kamal, Asad <Asad.Kamal at amd.com>
Subject: RE: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
-----Original Message-----
From: Alex Deucher <alexdeucher at gmail.com>
Sent: Tuesday, August 26, 2025 9:49 PM
To: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
Cc: amd-gfx at lists.freedesktop.org; Kamal, Asad <Asad.Kamal at amd.com>
Subject: Re: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
On Tue, Aug 26, 2025 at 2:03 AM Yang Wang <kevinyang.wang at amd.com> wrote:
>
> 1. Unified amdgpu ip block name print with format
> {ip_type}_v{major}_{minor}_{rev}
>
> 2. Avoid IP block name conflicts for SMU/PSP ip block
What is the conflict?
Kevin: all SMU/PSP IP blocks share the same name "smu"/"psp" , and there is no IP version information here.
Best Regards,
Kevin
>
> Signed-off-by: Yang Wang <kevinyang.wang at amd.com>
> Reviewed-by: Asad Kamal <asad.kamal at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 35
> ++++++++++++++++++++--
> 1 file changed, 33 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index e117494e8054..5754b1fe77be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2447,6 +2447,33 @@ int amdgpu_device_ip_block_version_cmp(struct amdgpu_device *adev,
> return 1;
> }
>
> +static const char *ip_block_names[] = {
> + [AMD_IP_BLOCK_TYPE_COMMON] = "common",
> + [AMD_IP_BLOCK_TYPE_GMC] = "gmc",
> + [AMD_IP_BLOCK_TYPE_IH] = "ih",
> + [AMD_IP_BLOCK_TYPE_SMC] = "smu",
> + [AMD_IP_BLOCK_TYPE_PSP] = "psp",
> + [AMD_IP_BLOCK_TYPE_DCE] = "dce",
> + [AMD_IP_BLOCK_TYPE_GFX] = "gfx",
> + [AMD_IP_BLOCK_TYPE_SDMA] = "sdma",
> + [AMD_IP_BLOCK_TYPE_UVD] = "uvd",
> + [AMD_IP_BLOCK_TYPE_VCE] = "vce",
> + [AMD_IP_BLOCK_TYPE_ACP] = "acp",
> + [AMD_IP_BLOCK_TYPE_VCN] = "vcn",
> + [AMD_IP_BLOCK_TYPE_MES] = "mes",
> + [AMD_IP_BLOCK_TYPE_JPEG] = "jpeg",
> + [AMD_IP_BLOCK_TYPE_VPE] = "vpe",
> + [AMD_IP_BLOCK_TYPE_UMSCH_MM] = "umsch_mm",
> + [AMD_IP_BLOCK_TYPE_ISP] = "isp", };
> +
> +static const char *ip_block_name(struct amdgpu_device *adev, enum
> +amd_ip_block_type type) {
> + int idx = (int)type;
> +
> + return idx < ARRAY_SIZE(ip_block_names) ? ip_block_names[idx]
> +: "unknown"; }
> +
> /**
> * amdgpu_device_ip_block_add
> *
> @@ -2475,8 +2502,12 @@ int amdgpu_device_ip_block_add(struct amdgpu_device *adev,
> break;
> }
>
> - dev_info(adev->dev, "detected ip block number %d <%s>\n",
> - adev->num_ip_blocks, ip_block_version->funcs->name);
Can we keep ip_block_version->funcs->name? There is useful information encoded in that. E.g. dm vs dce_v6_0 depending on whether DC is enabled or not or powerplay vs swsmu for SMU.
Alex
[Kevin]:
Agree, it is ok for me, please ignore this patch, thanks.
Best Regards,
Kevin
> + dev_info(adev->dev, "detected ip block number %d <%s_v%d_%d_%d>\n",
> + adev->num_ip_blocks,
> + ip_block_name(adev, ip_block_version->type),
> + ip_block_version->major,
> + ip_block_version->minor,
> + ip_block_version->rev);
>
> adev->ip_blocks[adev->num_ip_blocks].adev = adev;
>
> --
> 2.34.1
>
More information about the amd-gfx
mailing list