* [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode
@ 2025-08-26 6:02 Yang Wang
2025-08-26 6:02 ` [PATCH] drm/amd/amdgpu: unified amdgpu ip block name Yang Wang
2025-08-26 13:34 ` [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Alex Deucher
0 siblings, 2 replies; 7+ messages in thread
From: Yang Wang @ 2025-08-26 6:02 UTC (permalink / raw)
To: amd-gfx; +Cc: Asad Kamal
the PPSMC_MSG_GetPptLimit msg is not valid for gfx 11.0.3 on vf mode,
so skiped to create power1_cap* hwmon sysfs node.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index d5cc4d7f84e2..c9a986cf3aef 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3593,14 +3593,16 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
effective_mode &= ~S_IWUSR;
/* not implemented yet for APUs other than GC 10.3.1 (vangogh) and 9.4.3 */
- if (((adev->family == AMDGPU_FAMILY_SI) ||
- ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)) &&
- (gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4)))) &&
- (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
- attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
- attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
- attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr))
- return 0;
+ if (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
+ attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
+ attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
+ attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr) {
+ if ((adev->family == AMDGPU_FAMILY_SI) ||
+ ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)) &&
+ (gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4))) ||
+ (amdgpu_sriov_vf(adev) && gc_ver == IP_VERSION(11, 0, 3)))
+ return 0;
+ }
/* not implemented yet for APUs having < GC 9.3.0 (Renoir) */
if (((adev->family == AMDGPU_FAMILY_SI) ||
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
2025-08-26 6:02 [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Yang Wang
@ 2025-08-26 6:02 ` Yang Wang
2025-08-26 13:49 ` Alex Deucher
2025-08-26 13:34 ` [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Alex Deucher
1 sibling, 1 reply; 7+ messages in thread
From: Yang Wang @ 2025-08-26 6:02 UTC (permalink / raw)
To: amd-gfx; +Cc: Asad Kamal
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
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@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);
+ 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode
2025-08-26 6:02 [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Yang Wang
2025-08-26 6:02 ` [PATCH] drm/amd/amdgpu: unified amdgpu ip block name Yang Wang
@ 2025-08-26 13:34 ` Alex Deucher
1 sibling, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2025-08-26 13:34 UTC (permalink / raw)
To: Yang Wang; +Cc: amd-gfx, Asad Kamal
On Tue, Aug 26, 2025 at 6:18 AM Yang Wang <kevinyang.wang@amd.com> wrote:
>
> the PPSMC_MSG_GetPptLimit msg is not valid for gfx 11.0.3 on vf mode,
> so skiped to create power1_cap* hwmon sysfs node.
>
> Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
> Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/pm/amdgpu_pm.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index d5cc4d7f84e2..c9a986cf3aef 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -3593,14 +3593,16 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
> effective_mode &= ~S_IWUSR;
>
> /* not implemented yet for APUs other than GC 10.3.1 (vangogh) and 9.4.3 */
> - if (((adev->family == AMDGPU_FAMILY_SI) ||
> - ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)) &&
> - (gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4)))) &&
> - (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> - attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
> - attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
> - attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr))
> - return 0;
> + if (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> + attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
> + attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
> + attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr) {
> + if ((adev->family == AMDGPU_FAMILY_SI) ||
> + ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)) &&
> + (gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4))) ||
> + (amdgpu_sriov_vf(adev) && gc_ver == IP_VERSION(11, 0, 3)))
> + return 0;
> + }
>
> /* not implemented yet for APUs having < GC 9.3.0 (Renoir) */
> if (((adev->family == AMDGPU_FAMILY_SI) ||
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
2025-08-26 6:02 ` [PATCH] drm/amd/amdgpu: unified amdgpu ip block name Yang Wang
@ 2025-08-26 13:49 ` Alex Deucher
2025-08-26 18:13 ` Wang, Yang(Kevin)
0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2025-08-26 13:49 UTC (permalink / raw)
To: Yang Wang; +Cc: amd-gfx, Asad Kamal
On Tue, Aug 26, 2025 at 2:03 AM Yang Wang <kevinyang.wang@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?
>
> Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
> Reviewed-by: Asad Kamal <asad.kamal@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
> + 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
2025-08-26 13:49 ` Alex Deucher
@ 2025-08-26 18:13 ` Wang, Yang(Kevin)
2025-08-27 7:20 ` Wang, Yang(Kevin)
0 siblings, 1 reply; 7+ messages in thread
From: Wang, Yang(Kevin) @ 2025-08-26 18:13 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx@lists.freedesktop.org, Kamal, Asad
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Tuesday, August 26, 2025 9:49 PM
To: Wang, Yang(Kevin) <KevinYang.Wang@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Kamal, Asad <Asad.Kamal@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@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@amd.com>
> Reviewed-by: Asad Kamal <asad.kamal@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
> + 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
2025-08-26 18:13 ` Wang, Yang(Kevin)
@ 2025-08-27 7:20 ` Wang, Yang(Kevin)
2025-08-27 13:00 ` Alex Deucher
0 siblings, 1 reply; 7+ messages in thread
From: Wang, Yang(Kevin) @ 2025-08-27 7:20 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx@lists.freedesktop.org, Kamal, Asad
[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@gmail.com>
Cc: amd-gfx@lists.freedesktop.org; Kamal, Asad <Asad.Kamal@amd.com>
Subject: RE: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Tuesday, August 26, 2025 9:49 PM
To: Wang, Yang(Kevin) <KevinYang.Wang@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Kamal, Asad <Asad.Kamal@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@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@amd.com>
> Reviewed-by: Asad Kamal <asad.kamal@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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
2025-08-27 7:20 ` Wang, Yang(Kevin)
@ 2025-08-27 13:00 ` Alex Deucher
0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2025-08-27 13:00 UTC (permalink / raw)
To: Wang, Yang(Kevin); +Cc: amd-gfx@lists.freedesktop.org, Kamal, Asad
On Wed, Aug 27, 2025 at 3:20 AM Wang, Yang(Kevin)
<KevinYang.Wang@amd.com> wrote:
>
> [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@gmail.com>
> Cc: amd-gfx@lists.freedesktop.org; Kamal, Asad <Asad.Kamal@amd.com>
> Subject: RE: [PATCH] drm/amd/amdgpu: unified amdgpu ip block name
>
>
>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Tuesday, August 26, 2025 9:49 PM
> To: Wang, Yang(Kevin) <KevinYang.Wang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Kamal, Asad <Asad.Kamal@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@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@amd.com>
> > Reviewed-by: Asad Kamal <asad.kamal@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.
I think the patch is a nice cleanup, just include the name as well. E.g.,
+ dev_info(adev->dev, "detected ip block number %d
<%s_v%d_%d_%d> (%s)\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,
+ ip_block_version->funcs->name);
Alex
>
> 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
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-27 13:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 6:02 [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Yang Wang
2025-08-26 6:02 ` [PATCH] drm/amd/amdgpu: unified amdgpu ip block name Yang Wang
2025-08-26 13:49 ` Alex Deucher
2025-08-26 18:13 ` Wang, Yang(Kevin)
2025-08-27 7:20 ` Wang, Yang(Kevin)
2025-08-27 13:00 ` Alex Deucher
2025-08-26 13:34 ` [PATCH] drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).