vga_switcheroo_unlock_ddc(9)
π vga_switcheroo_unlock_ddc β the kernel API manual, bestie edition β¨
Okay so this one lives in the Kernel API Manual, and honestly? It's giving "short function, big feelings." Let's get into it π«Ά
β¨ NAME β¨
vga_switcheroo_unlock_ddc β switch DDC lines back to previous owner
Literally what it says on the tin, no cap π
π SYNOPSIS π
int vga_switcheroo_unlock_ddc (struct pci_dev *pdev );
πΈ ARGUMENTS πΈ
pdevβ client pci device. That's your main character right there π
π¦ DESCRIPTION π¦
So here's the tea π: after you call vga_switcheroo_lock_ddc, this is the function that switches the DDC lines back to the previous owner. It's the undo button, the "ok we're done here" text, the putting-your-chair-back moment π
And listen β you must call this even if vga_switcheroo_lock_ddc returned an error. Yeah, even then. Not optional, fr fr. It's the polite thing to do and also the required thing to do π
π₯ RETURN π₯
On success, you get back the previous DDC owner β i.e. the client identifier of pdev π Otherwise you get a negative int, and here's the breakdown:
-ENODEVβ if no handler has registered, or if the handler does not support switching the DDC lines π- a negative value returned by the handler β that gets propagated straight back to you, the caller. No filter, no edits, we pass it along π
-EINVALβ this is what happens if you invoke this function without callingvga_switcheroo_lock_ddcfirst. That's not allowed, bestie. Order matters π¨
Lowkey a big deal: skipping the lock first is not allowed and will result in -EINVAL. Do not pass go, do not collect your DDC lines π
π SEE ALSO π
The whole friend group, assembled π
- Kernel file
./drivers/gpu/vga/vga_switcheroo.cOverview(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_client(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)- Manual switching and manual power control(9)
vga_switcheroo_process_delayed_switch(9)- Driver power control(9)
vga_switcheroo_init_domain_pm_ops(9)
And that's the whole page!! π§ From ./drivers/gpu/vga, dated October 2026, in the Kernel API Manual β mwah, slay, periodt ππ¦β¨
π¦ 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