mirror of
https://github.com/torvalds/linux.git
synced 2026-09-27 11:02:03 +02:00
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:
|
||
|---|---|---|
| .. | ||
| amdgpu_dpm_internal.h | ||
| amdgpu_dpm.h | ||
| amdgpu_pm.h | ||