From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Asad Kamal <asad.kamal@amd.com>, amd-gfx@lists.freedesktop.org
Cc: hawking.zhang@amd.com, le.ma@amd.com, shiwu.zhang@amd.com,
alexander.deucher@amd.com, Kevin.Wang@amd.com
Subject: Re: [PATCH] drm/amd/pm: Report SMU 15.0.8 XGMI bandwidth
Date: Thu, 22 Oct 2026 19:37:51 +0530 [thread overview]
Message-ID: <de20d62d-8d89-4e4e-bc68-1acd14e1d4aa@amd.com> (raw)
In-Reply-To: <20261022123200.2222192-1-asad.kamal@amd.com>
On 22-Oct-26 6:02 PM, Asad Kamal wrote:
> SMU 15.0.8 firmware reports accumulated XGMI read and write bandwidth.
> The driver publishes those counters as transferred data, in KB.
>
> Publish them as xgmi_read_bandwidth_acc and xgmi_write_bandwidth_acc,
> with unit GB/s.
>
> Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks,
Lijo
> ---
> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 2 ++
> drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 6 ++++--
> drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h | 8 ++++----
> 3 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> index f92bccb8cb41..17f76071b514 100644
> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
> @@ -685,6 +685,8 @@ enum amdgpu_metrics_attr_id {
> AMDGPU_METRICS_ATTR_ID_SYSTEM_TEMP_OAM_4_5_6_7_3V3_VR,
> AMDGPU_METRICS_ATTR_ID_SYSTEM_TEMP_IBC_HSC,
> AMDGPU_METRICS_ATTR_ID_SYSTEM_TEMP_IBC,
> + AMDGPU_METRICS_ATTR_ID_XGMI_READ_BANDWIDTH_ACC,
> + AMDGPU_METRICS_ATTR_ID_XGMI_WRITE_BANDWIDTH_ACC,
> AMDGPU_METRICS_ATTR_ID_MAX,
> };
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
> index 2254c2d414d2..bacdc1a2dd38 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
> @@ -2041,8 +2041,10 @@ static ssize_t smu_v15_0_8_get_gpu_metrics(struct smu_context *smu, void **table
> gpu_metrics->xgmi_link_status[j] = ret;
> }
>
> - gpu_metrics->xgmi_read_data_acc = SMUQ10_ROUND(metrics->XgmiReadBandwidthAcc);
> - gpu_metrics->xgmi_write_data_acc = SMUQ10_ROUND(metrics->XgmiWriteBandwidthAcc);
> + gpu_metrics->xgmi_read_bandwidth_acc =
> + SMUQ10_ROUND(metrics->XgmiReadBandwidthAcc);
> + gpu_metrics->xgmi_write_bandwidth_acc =
> + SMUQ10_ROUND(metrics->XgmiWriteBandwidthAcc);
>
> for (i = 0; i < NUM_XCC(adev->gfx.xcc_mask); ++i) {
> inst = GET_INST(GC, i);
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h
> index c3835c81d313..8c7e808aa8eb 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.h
> @@ -146,10 +146,10 @@ typedef struct {
> SMU_ARRAY(SMU_MATTR(XGMI_LINK_STATUS), SMU_MUNIT(NONE), \
> SMU_MTYPE(U16), xgmi_link_status, \
> SMU_15_0_8_NUM_XGMI_LINKS); \
> - SMU_SCALAR(SMU_MATTR(XGMI_READ_DATA_ACC), SMU_MUNIT(DATA_1), \
> - SMU_MTYPE(U64), xgmi_read_data_acc); \
> - SMU_SCALAR(SMU_MATTR(XGMI_WRITE_DATA_ACC), SMU_MUNIT(DATA_1), \
> - SMU_MTYPE(U64), xgmi_write_data_acc); \
> + SMU_SCALAR(SMU_MATTR(XGMI_READ_BANDWIDTH_ACC), SMU_MUNIT(BW_1), \
> + SMU_MTYPE(U64), xgmi_read_bandwidth_acc); \
> + SMU_SCALAR(SMU_MATTR(XGMI_WRITE_BANDWIDTH_ACC), SMU_MUNIT(BW_1), \
> + SMU_MTYPE(U64), xgmi_write_bandwidth_acc); \
> SMU_SCALAR(SMU_MATTR(FIRMWARE_TIMESTAMP), SMU_MUNIT(TIME_2), \
> SMU_MTYPE(U64), firmware_timestamp); \
> SMU_ARRAY(SMU_MATTR(CURRENT_GFXCLK), SMU_MUNIT(CLOCK_1), \
prev parent reply other threads:[~2026-10-22 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 12:32 [PATCH] drm/amd/pm: Report SMU 15.0.8 XGMI bandwidth Asad Kamal
2026-10-22 14:07 ` Lazar, Lijo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de20d62d-8d89-4e4e-bc68-1acd14e1d4aa@amd.com \
--to=lijo.lazar@amd.com \
--cc=Kevin.Wang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=asad.kamal@amd.com \
--cc=hawking.zhang@amd.com \
--cc=le.ma@amd.com \
--cc=shiwu.zhang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox