Skip to contentSkip to conversation

drm/amd/pm: Fix SMU v15.0.8 energy accumulator

PATCH In review Lijo Lazar 3 participants 3 messages Nov 18

Subsystems (3)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Fix SMU v15.0.8 energy accumulator

The energy accumulator is a raw counter in 2^-16 units, not a Q10 fixed-point value. Report the counter as is.

Fixes d1168b8cfbe6 ("drm/amd/pm: Fix metrics formatting in SMUv15.0.8")
---
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c +1 -2
index a9cd1837239f..051aaa203fe1 100644
@@ -1966,8 +1966,7 @@ static ssize_t smu_v15_0_8_get_gpu_metrics(struct smu_context *smu, void **table
 	gpu_metrics->mem_max_bandwidth = SMUQ10_ROUND(metrics->MaxDramBandwidth);
 
 	/* Energy counter reported in 15.259uJ (2^-16) units */
-	gpu_metrics->energy_accumulator =
-		SMUQ10_ROUND(metrics->SocketEnergyAcc);
+	gpu_metrics->energy_accumulator = metrics->SocketEnergyAcc;
 
 	for (i = 0; i < NUM_XCC(adev->gfx.xcc_mask); ++i) {
 		xcc_id = GET_INST(GC, i);
Signature · 1 line
2.49.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] drm/amd/pm: unresolvable SHA d1168b8cfbe6 in Fixes trailer --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] drm/amd/pm: unresolvable SHA d1168b8cfbe6 in Fixes trailer --

commit 7bfc1b1729a32aa01f3585d9c539d253e7c105fe
Author: Lijo Lazar <[email protected]>

Quoted 7 lines

drm/amd/pm: Fix SMU v15.0.8 energy accumulator

The energy accumulator is a raw counter in 2^-16 units, not a Q10 fixed-point value. Report the counter as is.

Fixes d1168b8cfbe6 ("drm/amd/pm: Fix metrics formatting in SMUv15.0.8")

[Severity: Low]
Commit d1168b8cfbe6 in the Fixes: tag does not exist in the repository. Should this reference b7d7649f7d99 ("drm/amd/pm: Fix metrics formatting in SMUv15.0.8") instead?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Lijo Lazar

AMD General

Thanks & Regards
Asad

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, November 18, 2026 12:49 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amd/pm: Fix SMU v15.0.8 energy accumulator

The energy accumulator is a raw counter in 2^-16 units, not a Q10 fixed-point value. Report the counter as is.

Fixes d1168b8cfbe6 ("drm/amd/pm: Fix metrics formatting in SMUv15.0.8")
---
 drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c +1 -2
index a9cd1837239f..051aaa203fe1 100644
@@ -1966,8 +1966,7 @@ static ssize_t smu_v15_0_8_get_gpu_metrics(struct smu_context *smu, void **table
        gpu_metrics->mem_max_bandwidth = SMUQ10_ROUND(metrics->MaxDramBandwidth);
 
        /* Energy counter reported in 15.259uJ (2^-16) units */
-       gpu_metrics->energy_accumulator =
-               SMUQ10_ROUND(metrics->SocketEnergyAcc);
+       gpu_metrics->energy_accumulator = metrics->SocketEnergyAcc;
 
        for (i = 0; i < NUM_XCC(adev->gfx.xcc_mask); ++i) {
                xcc_id = GET_INST(GC, i);

--
2.49.0