amdgpu_gfx_...eaner_shader(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual β€” this page is amdgpu_gfx_...eaner_shader(9). The function we're hyping up is amdgpu_gfx_set_run_cleaner_shader, and its whole gig is: Execute the AMDGPU GFX Cleaner Shader. Periodt. πŸ’…

✨ SYNOPSIS ✨

here’s the exact signature, no cap β€” don’t let the line wrapping gaslight you:

ssize_t amdgpu_gfx_set_run_cleaner_shader (struct device *dev , struct device_attribute *attr , const char *buf , size_t count );

🫢 ARGUMENTS 🫢

  • dev β€” the device structure. The main character device situation.
  • attr β€” the device attribute structure. The sysfs attribute vibe check.
  • buf β€” the buffer containing the input data. That’s where your value lives.
  • count β€” the size of the input data. Respect the byte count, bestie.

πŸ’… DESCRIPTION πŸ’…

okay so this is the sysfs interface for manually running a cleaner shader. The cleaner shader is the thing that clears the GPU state between different tasks β€” it’s giving reset-energy, but make it data isolation. ✨

Writing a value to this sysfs file: the value written corresponds to the partition index on multi-partition devices. On single-partition devices, the value should be '0'. No cap.

And what does the cleaner shader actually clear? The Local Data Store (LDS) and General Purpose Registers (GPRs), so that data isolation between GPU workloads stays intact. It’s iconic, it’s necessary, it’s literally the vibe check between jobs, fr fr. 🫢

πŸŽ€ RETURN πŸŽ€

The return value is the number of bytes written to the sysfs file. That’s it β€” that’s the whole return. Highkey slay. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

the whole friend group:


bye bestie! this page is from the source path ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and it’s the amdgpu_gfx_...eaner_shader(9) manual page signing off. πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from