Yang Wang
048f4541b7
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: 25c933b1c4 ("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 >
(cherry picked from commit 862333bb48 )
Cc: stable@vger.kernel.org
2026-07-28 20:00:06 -04:00
..
2026-07-21 15:21:56 -05:00
2026-07-03 15:13:50 -10:00
2026-07-17 15:30:09 +02:00
2026-07-17 17:58:57 -07:00
2026-06-16 08:53:53 -07:00
2026-07-03 07:38:17 +02:00
2026-06-26 10:47:26 -07:00
2026-07-24 20:02:58 -07:00
2026-07-20 17:41:28 -04:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-20 21:54:52 -06:00
2026-07-03 07:38:17 +02:00
2026-07-12 12:52:34 -07:00
2026-07-03 07:38:17 +02:00
2026-06-15 13:57:13 +05:30
2026-07-17 14:50:35 +02:00
2026-07-03 07:38:17 +02:00
2026-07-09 20:31:57 +02:00
2026-06-23 14:00:29 +02:00
2026-07-03 07:38:17 +02:00
2026-06-12 13:47:53 -07:00
2026-06-19 10:14:34 -07:00
2026-07-03 07:38:17 +02:00
2026-07-09 12:44:00 +02:00
2026-07-03 07:38:17 +02:00
2026-07-10 16:26:39 -07:00
2026-07-17 12:02:23 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-13 20:19:06 +09:00
2026-07-26 10:47:58 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-08 14:05:11 +02:00
2026-07-28 20:00:06 -04:00
2026-07-12 12:37:28 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-06-22 08:06:13 -07:00
2026-07-20 07:29:44 -07:00
2026-06-08 21:51:12 -05:00
2026-07-17 14:52:08 +02:00
2026-07-15 00:21:51 +02:00
2026-06-16 23:19:45 +02:00
2026-06-15 15:08:14 +05:30
2026-07-12 12:37:28 -07:00
2026-07-23 10:24:12 -07:00
2026-07-11 15:42:55 -07:00
2026-07-03 07:38:17 +02:00
2026-07-21 11:34:51 +00:00
2026-07-05 05:29:41 -10:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-11 15:18:51 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-06 17:09:30 +02:00
2026-07-03 07:38:17 +02:00
2026-07-17 14:51:57 +02:00
2026-07-15 11:00:02 +02:00
2026-07-17 09:30:17 -07:00
2026-07-03 07:38:17 +02:00
2026-07-23 10:24:12 -07:00
2026-07-03 07:38:17 +02:00
2026-06-28 07:46:12 -07:00
2026-06-18 16:27:58 -07:00
2026-06-25 09:56:47 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 05:38:12 -10:00
2026-07-25 08:10:13 -07:00
2026-07-13 12:42:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-23 09:16:14 -07:00
2026-07-03 07:38:17 +02:00
2026-06-21 13:20:19 -07:00
2026-06-16 05:31:01 +05:30
2026-07-21 22:35:08 +01:00
2026-06-08 21:53:51 -05:00
2026-07-16 14:46:27 +01:00
2026-07-10 14:15:39 +02:00
2026-06-20 23:31:15 -07:00
2026-07-03 07:38:17 +02:00
2026-07-08 17:02:47 +02:00
2026-07-12 22:21:22 -04:00
2026-07-03 07:38:17 +02:00
2026-07-10 14:42:00 +02:00
2026-07-03 07:38:17 +02:00
2026-07-19 22:12:52 +01:00
2026-07-03 07:38:17 +02:00
2026-07-17 14:23:13 +02:00
2026-07-12 22:21:22 -04:00
2026-06-17 11:21:40 -07:00
2026-07-03 07:38:17 +02:00
2026-06-22 12:09:47 -07:00
2026-07-17 13:07:32 +02:00
2026-07-08 21:51:36 -04:00
2026-07-17 14:50:09 +02:00
2026-07-24 15:36:52 +02:00
2026-07-03 07:38:17 +02:00
2026-06-29 14:26:31 -06:00
2026-07-21 13:25:34 +02:00
2026-07-03 07:38:17 +02:00
2026-07-17 18:49:12 +01:00
2026-07-09 15:48:56 -07:00
2026-07-03 07:38:17 +02:00
2026-07-22 11:15:49 -07:00
2026-07-18 12:36:19 -07:00