summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorYang Wang <kevinyang.wang@amd.com>2026-07-23 23:18:33 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-07-28 18:54:12 -0400
commit862333bb48693ecafcae25af0c9d9ec31015ac77 (patch)
treed4f11900a2e959c2ab3118612dfa2a720c30fc27 /tools/perf/scripts/python
parentf6eed7acfd30099ef7baeb6ba45bb59daad80631 (diff)
drm/amd/pm: fix torn gpu metrics reads
amdgpu_dpm_get_gpu_metrics() returns a pointer to the shared metrics cache after dropping adev->pm.mutex. The sysfs path then copies from that pointer. Another reader can refresh the cache in place during the copy and return a snapshot containing data from two generations. Pass caller-provided storage through the DPM interface and copy the metrics while the mutex is held. This keeps the cache pointer private and makes each sysfs read observe one complete sample. Fixes: 25c933b1c4fc ("drm/amd/powerplay: add new sysfs interface for retrieving gpu metrics(V2)") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions