amdgpu_ras_q..._error_count(9)
π 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 frce_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 fixedquery_infoβ pointer toras_query_ifif the query request is only for a specific ip block; ifinfoisNULL, then the query request is for all the ip blocks that support query ras error counters/status π iykyk β passNULLand 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 π
- Kernel file
./drivers/gpu/drm/amd/amdgpu/amdgpu_ras.cπ - AMDGPU RAS debugfs control interface(9)
- AMDGPU RAS debugfs EEPROM table reset interface(9)
- AMDGPU RAS sysfs Error Count Interface(9)
amdgpu_ras_query_error_count_helper(9)β her little helper bestie π- AMDGPU RAS sysfs
gpu_vram_bad_pagesInterface(9) - AMDGPU RAS Reboot Behavior for Unrecoverable Errors(9)
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
- 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