__amdgpu_ras_eeprom_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __amdgpu_ras_eeprom_read(9) β€” Kernel API Manual, but make it make sense

okay so bestie, this whole page lives in the Kernel API Manual and it's about one little function that reads stuff out of an EEPROM. tiny function, big main character energy. let's get into it 🫢


✨ NAME ✨

__amdgpu_ras_eeprom_read β€” read indexed from EEPROM into buffer

like, the name literally spells it out: you give it an index, it reads from the EEPROM, and the bytes land in your buffer. no cap. πŸ’–


🌸 SYNOPSIS 🌸

int __amdgpu_ras_eeprom_read (struct amdgpu_ras_eeprom_control *control
, u8 *buf , const u32 fri , const u32 num );

that's the whole vibe right there. four params, one int coming back at you ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • control β€” pointer to control structure πŸŽ›οΈ like, the control center for this whole operation
  • buf β€” pointer to buffer to read into πŸ“₯ this is where the goods go
  • fri β€” first record index, start reading at this index, absolute index πŸ”’ literally "first record index" β€” you start here, and it's an absolute index, not relative, don't get it twisted
  • num β€” number of records to read πŸ“ how many records you're grabbing from that starting point

πŸ¦‹ DESCRIPTION πŸ¦‹

okay here's the important part, and it's giving mandatory pre-reading, so listen up πŸ‘‘

The caller must hold the table mutex in control.

like, you, the caller, are responsible for holding that table mutex in control before you even think about calling this. not a suggestion. it's the rule. πŸ”’

and the return? it returns 0 on success, or -errno otherwise. that's it, that's the whole contract πŸ’€ classic kernel behavior fr fr.


πŸ’œ SEE ALSO πŸ’œ


and that's the page!! πŸŽ€ big shoutout to the source/version being ./drivers/gpu/drm/amd/amdgpu and the date being October 2026, with the title __amdgpu_ras_eeprom_read(9) on the way out β€” slay, periodt, go hold that mutex πŸ’…βœ¨

πŸ“¦ where this page comes from