__amdgpu_ras_eeprom_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Ύ __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:

  • 0 on success. slay. we love a clean zero. πŸ’š
  • -errno otherwise. 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:


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