vga_switcher...ister_client(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ vga_switcheroo_register_client ✨

So bestie, this is a page from the Kernel API Manual β€” yes, the vga_switcheroo_register_client(9) one πŸ’… β€” and it's literally about signing your GPU up to the switcheroo club. Let's get into it πŸŽ€


🌸 NAME 🌸

vga_switcheroo_register_client β€” register vga client 🫢


⭐ SYNOPSIS ⭐

int vga_switcheroo_register_client (struct pci_dev *pdev , const struct
vga_switcheroo_client_ops *ops , bool driver_power_control );

πŸ’– ARGUMENTS πŸ’–

  • pdev β€” the client's pci device, i.e. the actual GPU you're introducing to the group chat πŸ–₯️
  • ops β€” the client callbacks, your GPU's whole personality fr
  • driver_power_control β€” a bool that says whether the power state is controlled by the driver's runtime pm ⚑ lowkey important, ngl

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the vibe: you're registering a vga client (a GPU) πŸ‘‘ And the way this works β€” if another GPU and a handler have already registered, then this call enables vga_switcheroo. Iconic.

Heads up though: the power state of the client is assumed to be ON at this point πŸ”₯ Don't come in here half-asleep.

And the prerequisite check? Beforehand, vga_switcheroo_client_probe_defer shall be called to make sure all the prerequisites are met βœ… like, do the reading before the exam bestie, no cap.

Not me reminding you again: call vga_switcheroo_client_probe_defer before this. The manpage literally says "shall". That's a demand, not a suggestion πŸ’€

🌈 RETURN 🌈

  • 0 on success β€” slay ✨
  • -ENOMEM on memory allocation error β€” the allocation said no ma'am 😭

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./drivers/gpu/vga/vga_switcheroo.c Overview(9)
  • struct vga_switcheroo_client(9)
  • struct vgasr_priv(9)
  • vga_switcheroo_register_handler(9)
  • vga_switcheroo_unregister_handler(9)
  • vga_switcheroo_handler_flags(9)
  • vga_switcheroo_register_audio_client(9)
  • vga_switcheroo_client_probe_defer(9)
  • vga_switcheroo_get_client_state(9)
  • vga_switcheroo_unregister_client(9)
  • vga_switcheroo_client_fb_set(9)
  • vga_switcheroo_lock_ddc(9)
  • vga_switcheroo_unlock_ddc(9)
  • Manual switching and manual power control(9)
  • vga_switcheroo_process_delayed_switch(9)
  • Driver power control(9)
  • vga_switcheroo_init_domain_pm_ops(9)

Okay that's the whole page, you ate that πŸ“πŸ’… This little gem lives in ./drivers/gpu/vga, it's dated October 2026, and the header on it says vga_switcher...ister_client(9) β€” go off, truncated title 😭 mwah, bye bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from