]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
drm/amd/pm: correct mem_busy_percent display due to calculation errors
authorYang Wang <kevinyang.wang@amd.com>
Thu, 26 Mar 2026 01:41:46 +0000 (21:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Apr 2026 17:52:44 +0000 (13:52 -0400)
commit592713a8960ed661bd9fcb7c256921c53eadeb49
tree45a64fc6ebf133cd52e5a6fef713dc1854d9d5c6
parent95a599c8a25a60a63b710ea863577ee51a8b62a2
drm/amd/pm: correct mem_busy_percent display due to calculation errors

PMFW may return invalid values due to internal calculation errors.
so, the kmd driver must validate and sanitize the returned values to
prevent issues caused by firmware calculation errors.

For example, values 0xfffe (-2) and 0xffff (-1) are treated
as invalid and clamped to 0.

this applies to devices with CAB (Cache As Buffer) functionality.

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/4905
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c