__amdgpu_ras_eeprom_write(9)
πΎ __amdgpu_ras_eeprom_write β bestie's guide to yeeting bytes into EEPROM
okay so this is a page from the Kernel API Manual, and it's about the very specific, very lowkey iconic function __amdgpu_ras_eeprom_write. It literally just writes indexed stuff from a buffer into EEPROM. that's the whole vibe. π
β¨ SYNOPSIS β¨
int __amdgpu_ras_eeprom_write (struct amdgpu_ras_eeprom_control *control
, u8 *buf , const u32 fri , const u32 num );
like, she takes four things and returns an int. no notes. π
πΈ ARGUMENTS πΈ
controlβ pointer to the control structure. she's the main character here, fr fr. πbufβ pointer to the buffer containing the data you wanna write. this is where your actual bytes live. πfriβ start writing at this index. like, where in the table do you wanna begin? you pick. π§numβ number of records to write. how many of 'em. count 'em out. β¨
π¦ DESCRIPTION π¦
okay so important thing, bestie, do not skip this part: the caller must hold the table mutex in control. like, that's on you, not on this function. it's not gonna lock it for you, it's not gonna check, it's just gonna assume you did your homework. so do it. π
and then β the return values, which are actually so simple:
0on success. slay. we love a clean zero. π-errnootherwise. classic negative-errno situation, iykyk. π
that's genuinely the whole story. short, sweet, does exactly one job. periodt. π₯
π SEE ALSO π
okay so if you're going down this rabbit hole (and honestly, respect), here's the whole friend group:
- the kernel file itself, literally right there in the tree:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.cπ amdgpu_ras_eeprom_reset_table(9)β the reset girlie πamdgpu_ras_eeprom_append(9)β the append girlie π__amdgpu_ras_eeprom_read(9)β the read counterpart, the double-underscore one πamdgpu_ras_eeprom_read(9)β the read counterpart, the normal one β__verify_ras_table_checksum(9)β the checksum vibe check πΈ
reminder bestie: mutex first, write second. if you flip that order the whole thing is giving "undefined behaviour" and we do not want that for you. π
that's the page!! this one lives over in ./drivers/gpu/drm/amd/amdgpu, it's dated October 2026, and it's brought to you by the Kernel API Manual. mwah, go hold that mutex ππ«Ά
π¦ 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