Repository navigation
[ROCM-21057] Fall back to pp_dpm_* sysfs when SMU power-gates clock domains - #6043
Merged
Merged
Conversation
koushikbillakanti-amd
force-pushed
the
users/kbillaka/ROCM-21057-3
branch
2 times, most recently
from
May 15, 2026 05:39
cec4c99 to
f991b92
Compare
bill-shuzhou-liu
approved these changes
May 20, 2026
bill-shuzhou-liu
left a comment
Contributor
There was a problem hiding this comment.
Can you also add the comment for amdsmi_frequencies_t::current in the amdsmi.h to indicate the current may be -1 when in sleep mode as no current is present?
marifamd
requested changes
May 26, 2026
gabrpham
approved these changes
May 27, 2026
gabrpham
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Approved.
1 task done
marifamd
self-requested a review
June 1, 2026 17:52
marifamd
approved these changes
Jun 1, 2026
koushikbillakanti-amd
force-pushed
the
users/kbillaka/ROCM-21057-3
branch
from
June 2, 2026 16:28
19ff3f5 to
c07d156
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On gfx1151, amd-smi static -C shows MEM/DF/SOC/DCEF/VCLK/DCLK as N/A at idle because the SMU power-gates those domains, so the kernel's pp_dpm_* table has no * current-level marker and the rsmi parser was discarding the whole table as STATUS_UNEXPECTED_DATA. This PR keeps the supported DPM frequency table visible at idle as well.
Technical Details
Fixed get_frequencies() in the rsmi backend to stop returning UNEXPECTED_DATA when no * marker is present: the parsed num_supported / frequency[] are kept and current is set to (uint32_t)-1 (documented in amdsmi_frequencies_t). VCLK/DCLK still have no rsmi/gpu_metrics path, so the existing inline pp_dpm reader was moved out of public amd_smi.cc into internal amd_smi_utils.{h,cc}. CLI translates the sentinel to N/A and guards the fclk index in metric --clock. Output schema is unchanged.
JIRA ID
ROCM-21057
Test Plan
Built from source on gfx1151 and ran amd-smi static -C and amd-smi metric --clock at idle, during a HIP busy_kernel workload, and post-workload; cross-validated CURRENT_LEVEL against * markers in /sys/class/drm/renderD*/device/pp_dpm_*. Also re-ran amd-smi list / monitor / metric -u to check for regressions.
Test Result
Idle now shows full FREQUENCY_LEVELS for MEM/DF/SOC with CURRENT_LEVEL: N/A while the domain is gated; under load CURRENT_LEVEL appears and exactly matches the sysfs * marker; post-load it drops back. metric --clock no longer crashes on idle fclk. DCEF/VCLK/DCLK remain N/A only when the sysfs file is absent or empty. No regressions in other amd-smi subcommands.
Submission Checklist