amdgpu_dpm_get_xcp_metrics(9)
π 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'sNULL, 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 π
- Kernel file
./drivers/gpu/drm/amd/pm/amdgpu_dpm.c amdgpu_dpm_reset_sdma_is_supported(9)amdgpu_dpm_get_temp_metrics(9)amdgpu_dpm_is_temp_metrics_supported(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms