amdgpu_ras_q..._error_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– amdgpu_ras_query_error_count β€” the Kernel API Manual tea πŸ’–

okay so bestie, welcome to amdgpu_ras_query_error_count(9) from the Kernel API Manual β€” yes that's the whole vibe, sit down, grab a boba, we're learning about GPU error counters 🧚✨


✨ NAME ✨

amdgpu_ras_query_error_count β€” literally just "Get error counts of all IPs or specific IP" πŸŽ€ that's the entire assignment and she ate


🌸 SYNOPSIS 🌸

int amdgpu_ras_query_error_count (struct amdgpu_device *adev , unsigned
long *ce_count , unsigned long *ue_count , struct ras_query_if
*query_info );

like, one function, four args, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adev β€” pointer to AMD GPU device 🫢 the actual card we're snooping on, main character energy fr
  • ce_count β€” pointer to an integer to be set to the count of correctible errors. cute little oopsies that got fixed, we love a recovery arc πŸ’–
  • ue_count β€” pointer to an integer to be set to the count of uncorrectible errors 😭 not so cute, these ones didn't get fixed
  • query_info β€” pointer to ras_query_if if the query request is only for a specific ip block; if info is NULL, then the query request is for all the ip blocks that support query ras error counters/status 🌈 iykyk β€” pass NULL and you're asking everyone at once

⭐ DESCRIPTION ⭐

So the way this works: if set, ce_count or ue_count count and return the corresponding error counts in those integer pointers πŸ”₯ like they'll get filled in with the numbers, that's the whole point.

Return 0 if the device supports RAS πŸ‘‘ and return -EOPNOTSUPP if the device doesn't support RAS πŸ’€ that's the vibe check β€” no RAS support, no counts, sorry bestie.

ngl, this is the part where you check your return value. 0 = slay, -EOPNOTSUPP = the hardware said "not me" πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ


and that's the page!! πŸ¦‹ before you go β€” this one lives under ./drivers/gpu/drm/amd/amdgpu in the Kernel API Manual, dated October 2026, so like, future-core of it all ⭐ mwah, go read amdgpu_ras.c and hydrate πŸ’…πŸ’–

πŸ“¦ where this page comes from