amdgpu_debug...egs_smc_read(9)
π amdgpu_debugfs_regs_smc_read β a Kernel API Manual moment β¨
okay so bestie, welcome to the <rainbow>Kernel API Manual</rainbow> entry for amdgpu_debugfs_regs_smc_read(9) β yes the header up there is kinda truncated (amdgpu_debug...egs_smc_read(9)), that's just how the man page renders it, don't come for me π
. This one's a read function for a SMC register and it's lowkey iconic.
πΈ NAME πΈ
amdgpu_debugfs_regs_smc_read β Read from a SMC register π«Ά
β¨ SYNOPSIS β¨
ssize_t amdgpu_debugfs_regs_smc_read (struct file *f , char __user *buf
, size_t size , loff_t *pos );
π ARGUMENTS π
fβ open file handle. it's giving "the door you walked through" πͺbufβ User buffer to store read data in. this is where the tea gets poured βsizeβ Number of bytes to read. how much you're grabbing, fr frposβ Offset to seek to. where you're at in the file, no cap π
π¦ DESCRIPTION π¦
okay so here's the vibe: the lower bits are the BYTE offset of the register to read. literally the low bits. that's the whole thing.
and the way this slays is that it lets you read multiple registers in a single call β and the returned size reflects that. so you're not doing one syscall per register like some kind of peasant, you're doing a whole batch and the return value tells you how much you actually got. π₯ multiple registers, one call, size reflects it. periodt.
π SEE ALSO π
Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c β go read the source, iykyk π
amdgpu_debugfs_process_reg_op(9)amdgpu_debugfs_regs_pcie_read(9)amdgpu_debugfs_regs_pcie_write(9)amdgpu_debugfs_regs_pcie64_read(9)amdgpu_debugfs_regs_pcie64_write(9)amdgpu_debugfs_regs_didt_read(9)amdgpu_debugfs_regs_didt_write(9)amdgpu_debugfs_regs_smc_write(9)amdgpu_debugfs_gca_config_read(9)amdgpu_debugfs_sensor_read(9)amdgpu_debugfs_gfxoff_residency_read(9)amdgpu_debugfs_gfxoff_residency_write(9)amdgpu_debugfs_gfxoff_count_read(9)amdgpu_debugfs_gfxoff_write(9)amdgpu_debugfs_gfxoff_read(9)amdgpu_debugfs_regs_init(9)
bestie reminder: this is a whole family of debugfs register ops and they all live together in ./drivers/gpu/drm/amd/amdgpu β that's the main character directory, no notes π
aaaand that's the page !! π this one came from ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and the title line said amdgpu_debug...egs_smc_read(9) β mwah, love that for us πβ¨ππ¦πΈ
π¦ 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