radeon_switc...o_can_switch(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ radeon_switcheroo_can_switch(9) ✨

okay so first things first, the full title is radeon_switcheroo_can_switch(9) and it lives in the Kernel API Manual (section 9, the fancy driver-internals club πŸ’…). Strap in bestie, this one's small but mighty.


πŸŽ€ NAME πŸŽ€

radeon_switcheroo_can_switch β€” literally just peeks in and tells you if the switcheroo state is allowed to change πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

bool radeon_switcheroo_can_switch (struct pci_dev *pdev );

That's it. That's the whole vibe check. It hands you back a bool 🫢


🌸 ARGUMENTS 🌸

  • pdev β€” a pci dev pointer, aka the little handle that says which PCI device we're talking about πŸ’–

⭐ DESCRIPTION ⭐

So this function is a callback for the switcheroo driver β€” like, the switcheroo driver calls it up and is like "hey bestie, can we change things?" and this is the one who answers πŸ“ž

What it actually does: it checks if the switcheroo state can be changed. That's the whole job, no cap.

  • it returns true if the state can be changed βœ…
  • it returns false if it can't ❌

And that's genuinely it, she's a short queen πŸ‘‘βœ¨


🌈 SEE ALSO 🌈

The kernel file this comes from is:

./drivers/gpu/drm/radeon/radeon_device.c

and here's the whole friend group, the entire radeon extended universe, no gatekeeping fr fr πŸ’œ:


πŸ’€ friendly reminder: the original manual spells it "Check of the switcheroo state can be changed" β€” yes, there's a typo in the source, and yes we're leaving the meaning exactly as-is. iykyk 😭

✨ that's the whole page!! ✨ this cutie ships out of ./drivers/gpu/drm/radeon, dated October 2026, and the page itself is signed radeon_switc...o_can_switch(9) πŸŽ€ bye bestie, go check some switcheroo state πŸ¦‹πŸ’–

πŸ“¦ where this page comes from