amdgpu_dpm_get_xcp_metrics(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_dpm_get_xcp_metrics β€” like, the whole vibe

okay so bestie, welcome to the Kernel API Manual entry for amdgpu_dpm_get_xcp_metrics(9). yes we're reading kernel docs together, this is our bonding time, don't fight it πŸŽ€


✨ NAME ✨

amdgpu_dpm_get_xcp_metrics β€” gets you the metrics for one specific compute partition, no cap πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

ssize_t amdgpu_dpm_get_xcp_metrics (struct amdgpu_device *adev , int xcp_id , void *table );

look at her. three args. absolutely iconic signature, she ate πŸ”₯


🌸 ARGUMENTS 🌸

  • adev β€” pointer to the device. like, the whole GPU situation, you hand her the device and she knows what to do πŸ’–
  • xcp_id β€” the identifier of the XCP you want metrics for. which compute partition, basically. you gotta tell her which one, she's not a mind reader πŸ™ˆ
  • table β€” pointer to a buffer where the metrics get stored. and this is the main character detail β€” if it's NULL, the function just returns the size of the metrics structure instead of filling anything in. so you can ask "how much room do i need?" before you commit. love that for us ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do? she retrieves metrics for a specific XCP β€” and we're talking the good stuff: details like VCN/JPEG activity, clock frequencies, and other performance metrics πŸŽ€

and again, because it matters: if the table parameter is NULL, the function returns the size of the metrics structure without populating it. size only, no data, just a little vibe check on how big your buffer needs to be πŸ’…


⭐ RETURN ⭐

  • size of the metrics structure on success 🌈
  • a negative error code on failure 😭 (yes, negative. that's your red flag, bestie, pay attention)

πŸ” SEE ALSO πŸ”

siblings! go say hi πŸ‘‹


fr fr though β€” always check that negative return. a negative error code is not a size, it's a cry for help πŸ’€

and that's the page, bestie 🫢 this whole thing lives in ./drivers/gpu/drm/amd/pm, it's part of the Kernel API Manual, and it's dated October 2026 β€” so like, future-coded of us. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from