<sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/gpu/vga-switcheroomodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/gpu/vga-switcheroomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/gpu/vga-switcheroomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/gpu/vga-switcheroomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/gpu/vga-switcheroomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/gpu/vga-switcheroomodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhtarget)}(h.. _vga_switcheroo:h]h}(h]h ]h"]h$]h&]refidvga-switcheroouh1hhKhhhhh@/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo.rstubhsection)}(hhh](htitle)}(hVGA Switcherooh]hVGA Switcheroo}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h\vga_switcheroo is the Linux subsystem for laptop hybrid graphics. These come in two flavors:h]h\vga_switcheroo is the Linux subsystem for laptop hybrid graphics. These come in two flavors:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chK1hhhhubh bullet_list)}(hhh](h list_item)}(hHmuxed: Dual GPUs with a multiplexer chip to switch outputs between GPUs.h]h)}(hhh]hHmuxed: Dual GPUs with a multiplexer chip to switch outputs between GPUs.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chK4hhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hmuxless: Dual GPUs but only one of them is connected to outputs. The other one is merely used to offload rendering, its results are copied over PCIe into the framebuffer. On Linux this is supported with DRI PRIME. h]h)}(hmuxless: Dual GPUs but only one of them is connected to outputs. The other one is merely used to offload rendering, its results are copied over PCIe into the framebuffer. On Linux this is supported with DRI PRIME.h]hmuxless: Dual GPUs but only one of them is connected to outputs. The other one is merely used to offload rendering, its results are copied over PCIe into the framebuffer. On Linux this is supported with DRI PRIME.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chK5hhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet*uh1hhhhK4hhhhubh)}(hXHybrid graphics started to appear in the late Naughties and were initially all muxed. Newer laptops moved to a muxless architecture for cost reasons. A notable exception is the MacBook Pro which continues to use a mux. Muxes come with varying capabilities: Some switch only the panel, others can also switch external displays. Some switch all display pins at once while others can switch just the DDC lines. (To allow EDID probing for the inactive GPU.) Also, muxes are often used to cut power to the discrete GPU while it is not used.h]hXHybrid graphics started to appear in the late Naughties and were initially all muxed. Newer laptops moved to a muxless architecture for cost reasons. A notable exception is the MacBook Pro which continues to use a mux. Muxes come with varying capabilities: Some switch only the panel, others can also switch external displays. Some switch all display pins at once while others can switch just the DDC lines. (To allow EDID probing for the inactive GPU.) Also, muxes are often used to cut power to the discrete GPU while it is not used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chK:hhhhubh)}(hXDRM drivers register GPUs with vga_switcheroo, these are henceforth called clients. The mux is called the handler. Muxless machines also register a handler to control the power state of the discrete GPU, its ->switchto callback is a no-op for obvious reasons. The discrete GPU is often equipped with an HDA controller for the HDMI/DP audio signal, this will also register as a client so that vga_switcheroo can take care of the correct suspend/resume order when changing the discrete GPU's power state. In total there can thus be up to three clients: Two vga clients (GPUs) and one audio client (on the discrete GPU). The code is mostly prepared to support machines with more than two GPUs should they become available.h]hXDRM drivers register GPUs with vga_switcheroo, these are henceforth called clients. The mux is called the handler. Muxless machines also register a handler to control the power state of the discrete GPU, its ->switchto callback is a no-op for obvious reasons. The discrete GPU is often equipped with an HDA controller for the HDMI/DP audio signal, this will also register as a client so that vga_switcheroo can take care of the correct suspend/resume order when changing the discrete GPU’s power state. In total there can thus be up to three clients: Two vga clients (GPUs) and one audio client (on the discrete GPU). The code is mostly prepared to support machines with more than two GPUs should they become available.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chKChhhhubh)}(hXcThe GPU to which the outputs are currently switched is called the active client in vga_switcheroo parlance. The GPU not in use is the inactive client. When the inactive client's DRM driver is loaded, it will be unable to probe the panel's EDID and hence depends on VBIOS to provide its display modes. If the VBIOS modes are bogus or if there is no VBIOS at all (which is common on the MacBook Pro), a client may alternatively request that the DDC lines are temporarily switched to it, provided that the handler supports this. Switching only the DDC lines and not the entire output avoids unnecessary flickering.h]hXgThe GPU to which the outputs are currently switched is called the active client in vga_switcheroo parlance. The GPU not in use is the inactive client. When the inactive client’s DRM driver is loaded, it will be unable to probe the panel’s EDID and hence depends on VBIOS to provide its display modes. If the VBIOS modes are bogus or if there is no VBIOS at all (which is common on the MacBook Pro), a client may alternatively request that the DDC lines are temporarily switched to it, provided that the handler supports this. Switching only the DDC lines and not the entire output avoids unnecessary flickering.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:7: ./drivers/gpu/vga/vga_switcheroo.chKNhhhhubh)}(hhh](h)}(h Modes of Useh]h Modes of Use}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhK ubh)}(hhh](h)}(h)Manual switching and manual power controlh]h)Manual switching and manual power control}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhKubh)}(hX<In this mode of use, the file /sys/kernel/debug/vgaswitcheroo/switch can be read to retrieve the current vga_switcheroo state and commands can be written to it to change the state. The file appears as soon as two GPU drivers and one handler have registered with vga_switcheroo. The following commands are understood:h]hX<In this mode of use, the file /sys/kernel/debug/vgaswitcheroo/switch can be read to retrieve the current vga_switcheroo state and commands can be written to it to change the state. The file appears as soon as two GPU drivers and one handler have registered with vga_switcheroo. The following commands are understood:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMchjThhubh)}(hhh](h)}(h%OFF: Power off the device not in use.h]h)}(hjyh]h%OFF: Power off the device not in use.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMihjwubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(h#ON: Power on the device not in use.h]h)}(hjh]h#ON: Power on the device not in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMjhjubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(hX|IGD: Switch to the integrated graphics device. Power on the integrated GPU if necessary, power off the discrete GPU. Prerequisite is that no user space processes (e.g. Xorg, alsactl) have opened device files of the GPUs or the audio client. If the switch fails, the user may invoke lsof(8) or fuser(1) on /dev/dri/ and /dev/snd/controlC1 to identify processes blocking the switch.h]h)}(hX|IGD: Switch to the integrated graphics device. Power on the integrated GPU if necessary, power off the discrete GPU. Prerequisite is that no user space processes (e.g. Xorg, alsactl) have opened device files of the GPUs or the audio client. If the switch fails, the user may invoke lsof(8) or fuser(1) on /dev/dri/ and /dev/snd/controlC1 to identify processes blocking the switch.h]hX|IGD: Switch to the integrated graphics device. Power on the integrated GPU if necessary, power off the discrete GPU. Prerequisite is that no user space processes (e.g. Xorg, alsactl) have opened device files of the GPUs or the audio client. If the switch fails, the user may invoke lsof(8) or fuser(1) on /dev/dri/ and /dev/snd/controlC1 to identify processes blocking the switch.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMkhjubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(h,DIS: Switch to the discrete graphics device.h]h)}(hjh]h,DIS: Switch to the discrete graphics device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMqhjubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(hDIGD: Delayed switch to the integrated graphics device. This will perform the switch once the last user space process has closed the device files of the GPUs and the audio client.h]h)}(hDIGD: Delayed switch to the integrated graphics device. This will perform the switch once the last user space process has closed the device files of the GPUs and the audio client.h]hDIGD: Delayed switch to the integrated graphics device. This will perform the switch once the last user space process has closed the device files of the GPUs and the audio client.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMrhjubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(h5DDIS: Delayed switch to the discrete graphics device.h]h)}(hjh]h5DDIS: Delayed switch to the discrete graphics device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMuhjubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(hXDMIGD: Mux-only switch to the integrated graphics device. Does not remap console or change the power state of either gpu. If the integrated GPU is currently off, the screen will turn black. If it is on, the screen will show whatever happens to be in VRAM. Either way, the user has to blindly enter the command to switch back.h]h)}(hXDMIGD: Mux-only switch to the integrated graphics device. Does not remap console or change the power state of either gpu. If the integrated GPU is currently off, the screen will turn black. If it is on, the screen will show whatever happens to be in VRAM. Either way, the user has to blindly enter the command to switch back.h]hXDMIGD: Mux-only switch to the integrated graphics device. Does not remap console or change the power state of either gpu. If the integrated GPU is currently off, the screen will turn black. If it is on, the screen will show whatever happens to be in VRAM. Either way, the user has to blindly enter the command to switch back.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMvhj ubah}(h]h ]h"]h$]h&]uh1hhjtubh)}(h7MDIS: Mux-only switch to the discrete graphics device. h]h)}(h6MDIS: Mux-only switch to the discrete graphics device.h]h6MDIS: Mux-only switch to the discrete graphics device.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chM{hj"ubah}(h]h ]h"]h$]h&]uh1hhjtubeh}(h]h ]h"]h$]h&]jjuh1hhjhMihjThhubh)}(h|For GPUs whose power state is controlled by the driver's runtime pm, the ON and OFF commands are a no-op (see next section).h]h~For GPUs whose power state is controlled by the driver’s runtime pm, the ON and OFF commands are a no-op (see next section).}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chM}hjThhubh)}(hWFor muxless machines, the IGD/DIS, DIGD/DDIS and MIGD/MDIS commands should not be used.h]hWFor muxless machines, the IGD/DIS, DIGD/DDIS and MIGD/MDIS commands should not be used.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:16: ./drivers/gpu/vga/vga_switcheroo.chMhjThhubeh}(h])manual-switching-and-manual-power-controlah ]h"])manual switching and manual power controlah$]h&]uh1hhjChhhhhKubh)}(hhh](h)}(hDriver power controlh]hDriver power control}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghhhhhKubh)}(hXIn this mode of use, the discrete GPU automatically powers up and down at the discretion of the driver's runtime pm. On muxed machines, the user may still influence the muxer state by way of the debugfs interface, however the ON and OFF commands become a no-op for the discrete GPU.h]hXIn this mode of use, the discrete GPU automatically powers up and down at the discretion of the driver’s runtime pm. On muxed machines, the user may still influence the muxer state by way of the debugfs interface, however the ON and OFF commands become a no-op for the discrete GPU.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:22: ./drivers/gpu/vga/vga_switcheroo.chMhjghhubh)}(hThis mode is the default on Nvidia HybridPower/Optimus and ATI PowerXpress. Specifying nouveau.runpm=0, radeon.runpm=0 or amdgpu.runpm=0 on the kernel command line disables it.h]hThis mode is the default on Nvidia HybridPower/Optimus and ATI PowerXpress. Specifying nouveau.runpm=0, radeon.runpm=0 or amdgpu.runpm=0 on the kernel command line disables it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:22: ./drivers/gpu/vga/vga_switcheroo.chMhjghhubh)}(hX+After the GPU has been suspended, the handler needs to be called to cut power to the GPU. Likewise it needs to reinstate power before the GPU can resume. This is achieved by vga_switcheroo_init_domain_pm_ops(), which augments the GPU's suspend/resume functions by the requisite calls to the handler.h]hX-After the GPU has been suspended, the handler needs to be called to cut power to the GPU. Likewise it needs to reinstate power before the GPU can resume. This is achieved by vga_switcheroo_init_domain_pm_ops(), which augments the GPU’s suspend/resume functions by the requisite calls to the handler.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:22: ./drivers/gpu/vga/vga_switcheroo.chMhjghhubh)}(hWhen the audio device resumes, the GPU needs to be woken. This is achieved by a PCI quirk which calls device_link_add() to declare a dependency on the GPU. That way, the GPU is kept awake whenever and as long as the audio device is in use.h]hWhen the audio device resumes, the GPU needs to be woken. This is achieved by a PCI quirk which calls device_link_add() to declare a dependency on the GPU. That way, the GPU is kept awake whenever and as long as the audio device is in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:22: ./drivers/gpu/vga/vga_switcheroo.chMhjghhubh)}(hXOn muxed machines, if the mux is initially switched to the discrete GPU, the user ends up with a black screen when the GPU powers down after boot. As a workaround, the mux is forced to the integrated GPU on runtime suspend, cf. https://bugs.freedesktop.org/show_bug.cgi?id=75917h](hOn muxed machines, if the mux is initially switched to the discrete GPU, the user ends up with a black screen when the GPU powers down after boot. As a workaround, the mux is forced to the integrated GPU on runtime suspend, cf. }(hjhhhNhNubh reference)}(h2https://bugs.freedesktop.org/show_bug.cgi?id=75917h]h2https://bugs.freedesktop.org/show_bug.cgi?id=75917}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:22: ./drivers/gpu/vga/vga_switcheroo.chMhjghhubeh}(h]driver-power-controlah ]h"]driver power controlah$]h&]uh1hhjChhhhhKubeh}(h] modes-of-useah ]h"] modes of useah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hAPIh]hAPI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hPublic functionsh]hPublic functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single,vga_switcheroo_register_handler (C function)!c.vga_switcheroo_register_handlerhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hint vga_switcheroo_register_handler (const struct vga_switcheroo_handler *handler, enum vga_switcheroo_handler_flags_t handler_flags)h]hdesc_signature_line)}(hint vga_switcheroo_register_handler(const struct vga_switcheroo_handler *handler, enum vga_switcheroo_handler_flags_t handler_flags)h](hdesc_sig_keyword_type)}(hinth]hint}(hj*hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j(hj$hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKubhdesc_sig_space)}(h h]h }(hj<hhhNhNubah}(h]h ]wah"]h$]h&]uh1j:hj$hhhj9hKubh desc_name)}(hvga_switcheroo_register_handlerh]h desc_sig_name)}(hvga_switcheroo_register_handlerh]hvga_switcheroo_register_handler}(hjShhhNhNubah}(h]h ]nah"]h$]h&]uh1jQhjMubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jKhj$hhhj9hKubhdesc_parameterlist)}(ha(const struct vga_switcheroo_handler *handler, enum vga_switcheroo_handler_flags_t handler_flags)h](hdesc_parameter)}(h,const struct vga_switcheroo_handler *handlerh](hdesc_sig_keyword)}(hconsth]hconst}(hjzhhhNhNubah}(h]h ]kah"]h$]h&]uh1jxhjtubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjtubjy)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjtubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjtubh)}(hhh]jR)}(hvga_switcheroo_handlerh]hvga_switcheroo_handler}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjUsb!c.vga_switcheroo_register_handlerasbuh1hhjtubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjtubhdesc_sig_punctuation)}(hjh]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjtubjR)}(hhandlerh]hhandler}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjtubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjnubjs)}(h1enum vga_switcheroo_handler_flags_t handler_flagsh](jy)}(henumh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjubj;)}(h h]h }(hj$hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubh)}(hhh]jR)}(hvga_switcheroo_handler_flags_th]hvga_switcheroo_handler_flags_t}(hj5hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]j!c.vga_switcheroo_register_handlerasbuh1hhjubj;)}(h h]h }(hjShhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubjR)}(h handler_flagsh]h handler_flags}(hjahhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjnubeh}(h]h ]h"]h$]h&]jjjkuh1jlhj$hhhj9hKubeh}(h]h ]h"]h$]h&]jjjk add_permalinkuh1j"sphinx_line_type declaratorhjhhhj9hKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj9hKhjhhubh desc_content)}(hhh]h)}(hregister handlerh]hregister handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj9hKubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hXI**Parameters** ``const struct vga_switcheroo_handler *handler`` handler callbacks ``enum vga_switcheroo_handler_flags_t handler_flags`` handler flags **Description** Register handler. Enable vga_switcheroo if two vga clients have already registered. **Return** 0 on success, -EINVAL if a handler was already registered.h](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubhdefinition_list)}(hhh](hdefinition_list_item)}(hC``const struct vga_switcheroo_handler *handler`` handler callbacks h](hterm)}(h0``const struct vga_switcheroo_handler *handler``h]hliteral)}(hjh]h,const struct vga_switcheroo_handler *handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubh definition)}(hhh]h)}(hhandler callbacksh]hhandler callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hD``enum vga_switcheroo_handler_flags_t handler_flags`` handler flags h](j)}(h5``enum vga_switcheroo_handler_flags_t handler_flags``h]j)}(hj#h]h1enum vga_switcheroo_handler_flags_t handler_flags}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubj)}(hhh]h)}(h handler flagsh]h handler flags}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hKhj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj8hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj^h]h Description}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubh)}(hSRegister handler. Enable vga_switcheroo if two vga clients have already registered.h]hSRegister handler. Enable vga_switcheroo if two vga clients have already registered.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubh)}(h:0 on success, -EINVAL if a handler was already registered.h]h:0 on success, -EINVAL if a handler was already registered.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.vga_switcheroo_unregister_handler (C function)#c.vga_switcheroo_unregister_handlerhNtauh1jhjhhhNhNubj)}(hhh](j)}(h-void vga_switcheroo_unregister_handler (void)h]j#)}(h,void vga_switcheroo_unregister_handler(void)h](j))}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhjhMubjL)}(h!vga_switcheroo_unregister_handlerh]jR)}(h!vga_switcheroo_unregister_handlerh]h!vga_switcheroo_unregister_handler}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjhhhjhMubjm)}(h(void)h]js)}(hvoidh]j))}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubah}(h]h ]h"]h$]h&]jjjkuh1jlhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(hunregister handlerh]hunregister handler}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj.hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjIjjIjjjuh1jhhhjhNhNubj)}(he**Parameters** ``void`` no arguments **Description** Unregister handler. Disable vga_switcheroo.h](h)}(h**Parameters**h]j)}(hjSh]h Parameters}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjMubj)}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j)}(hjrh]hvoid}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjlubj)}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjhMhjiubah}(h]h ]h"]h$]h&]uh1jhjMubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chM hjMubh)}(h+Unregister handler. Disable vga_switcheroo.h]h+Unregister handler. Disable vga_switcheroo.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjMubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)vga_switcheroo_handler_flags (C function)c.vga_switcheroo_handler_flagshNtauh1jhjhhhNhNubj)}(hhh](j)}(hGenum vga_switcheroo_handler_flags_t vga_switcheroo_handler_flags (void)h]j#)}(hFenum vga_switcheroo_handler_flags_t vga_switcheroo_handler_flags(void)h](jy)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhjhMubh)}(hhh]jR)}(hvga_switcheroo_handler_flags_th]hvga_switcheroo_handler_flags_t}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jvga_switcheroo_handler_flagssbc.vga_switcheroo_handler_flagsasbuh1hhjhhhjhMubj;)}(h h]h }(hj2hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhjhMubjL)}(hvga_switcheroo_handler_flagsh]jR)}(hj/h]hvga_switcheroo_handler_flags}(hjDhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj@ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjhhhjhMubjm)}(h(void)h]js)}(hvoidh]j))}(hvoidh]hvoid}(hj_hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hj[ubah}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjWubah}(h]h ]h"]h$]h&]jjjkuh1jlhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(hobtain handler flagsh]hobtain handler flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj)}(h**Parameters** ``void`` no arguments **Description** Helper for clients to obtain the handler flags bitmask. **Return** Handler flags. A value of 0 means that no handler is registered or that the handler has no special capabilities.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubj)}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j)}(hjh]hvoid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubj)}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubh)}(h7Helper for clients to obtain the handler flags bitmask.h]h7Helper for clients to obtain the handler flags bitmask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubh)}(h **Return**h]j)}(hj,h]hReturn}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubh)}(hpHandler flags. A value of 0 means that no handler is registered or that the handler has no special capabilities.h]hpHandler flags. A value of 0 means that no handler is registered or that the handler has no special capabilities.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j+vga_switcheroo_register_client (C function) c.vga_switcheroo_register_clienthNtauh1jhjhhhNhNubj)}(hhh](j)}(hint vga_switcheroo_register_client (struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, bool driver_power_control)h]j#)}(hint vga_switcheroo_register_client(struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, bool driver_power_control)h](j))}(hinth]hint}(hjqhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjmhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMSubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjmhhhjhMSubjL)}(hvga_switcheroo_register_clienth]jR)}(hvga_switcheroo_register_clienth]hvga_switcheroo_register_client}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjmhhhjhMSubjm)}(h^(struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, bool driver_power_control)h](js)}(hstruct pci_dev *pdevh](jy)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubh)}(hhh]jR)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.vga_switcheroo_register_clientasbuh1hhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjR)}(hpdevh]hpdev}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubjs)}(h+const struct vga_switcheroo_client_ops *opsh](jy)}(hj|h]hconst}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hj- hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubjy)}(hjh]hstruct}(hj; hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hjH hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubh)}(hhh]jR)}(hvga_switcheroo_client_opsh]hvga_switcheroo_client_ops}(hjY hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjV ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj[ modnameN classnameNjj)}j]j c.vga_switcheroo_register_clientasbuh1hhj ubj;)}(h h]h }(hjw hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjR)}(hopsh]hops}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubjs)}(hbool driver_power_controlh](j))}(hboolh]hbool}(hj hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubjR)}(hdriver_power_controlh]hdriver_power_control}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubeh}(h]h ]h"]h$]h&]jjjkuh1jlhjmhhhjhMSubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjihhhjhMSubah}(h]jdah ](jjeh"]h$]h&]jj)jhuh1jhjhMShjfhhubj)}(hhh]h)}(hregister vga clienth]hregister vga client}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMFhj hhubah}(h]h ]h"]h$]h&]uh1jhjfhhhjhMSubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjhNhNubj)}(hX5**Parameters** ``struct pci_dev *pdev`` client pci device ``const struct vga_switcheroo_client_ops *ops`` client callbacks ``bool driver_power_control`` whether power state is controlled by the driver's runtime pm **Description** Register vga client (GPU). Enable vga_switcheroo if another GPU and a handler have already registered. The power state of the client is assumed to be ON. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met. **Return** 0 on success, -ENOMEM on memory allocation error.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMJhj ubj)}(hhh](j)}(h+``struct pci_dev *pdev`` client pci device h](j)}(h``struct pci_dev *pdev``h]j)}(hj2 h]hstruct pci_dev *pdev}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0 ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMGhj, ubj)}(hhh]h)}(hclient pci deviceh]hclient pci device}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG hMGhjH ubah}(h]h ]h"]h$]h&]uh1jhj, ubeh}(h]h ]h"]h$]h&]uh1jhjG hMGhj) ubj)}(hA``const struct vga_switcheroo_client_ops *ops`` client callbacks h](j)}(h/``const struct vga_switcheroo_client_ops *ops``h]j)}(hjk h]h+const struct vga_switcheroo_client_ops *ops}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMHhje ubj)}(hhh]h)}(hclient callbacksh]hclient callbacks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMHhj ubah}(h]h ]h"]h$]h&]uh1jhje ubeh}(h]h ]h"]h$]h&]uh1jhj hMHhj) ubj)}(h[``bool driver_power_control`` whether power state is controlled by the driver's runtime pm h](j)}(h``bool driver_power_control``h]j)}(hj h]hbool driver_power_control}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMJhj ubj)}(hhh]h)}(hwhether power state is controlled by the driver’s runtime pm}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMIhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMJhj) ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMLhj ubh)}(hXRegister vga client (GPU). Enable vga_switcheroo if another GPU and a handler have already registered. The power state of the client is assumed to be ON. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met.h]hXRegister vga client (GPU). Enable vga_switcheroo if another GPU and a handler have already registered. The power state of the client is assumed to be ON. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMLhj ubh)}(h **Return**h]j)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMQhj ubh)}(h10 on success, -ENOMEM on memory allocation error.h]h10 on success, -ENOMEM on memory allocation error.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMQhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j1vga_switcheroo_register_audio_client (C function)&c.vga_switcheroo_register_audio_clienthNtauh1jhjhhhNhNubj)}(hhh](j)}(hint vga_switcheroo_register_audio_client (struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, struct pci_dev *vga_dev)h]j#)}(hint vga_switcheroo_register_audio_client(struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, struct pci_dev *vga_dev)h](j))}(hinth]hint}(hjL hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjH hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMjubj;)}(h h]h }(hj[ hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjH hhhjZ hMjubjL)}(h$vga_switcheroo_register_audio_clienth]jR)}(h$vga_switcheroo_register_audio_clienth]h$vga_switcheroo_register_audio_client}(hjm hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhji ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjH hhhjZ hMjubjm)}(h\(struct pci_dev *pdev, const struct vga_switcheroo_client_ops *ops, struct pci_dev *vga_dev)h](js)}(hstruct pci_dev *pdevh](jy)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubh)}(hhh]jR)}(hpci_devh]hpci_dev}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jjo sb&c.vga_switcheroo_register_audio_clientasbuh1hhj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjR)}(hpdevh]hpdev}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj ubjs)}(h+const struct vga_switcheroo_client_ops *opsh](jy)}(hj|h]hconst}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubjy)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hj# hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubh)}(hhh]jR)}(hvga_switcheroo_client_opsh]hvga_switcheroo_client_ops}(hj4 hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj1 ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj6 modnameN classnameNjj)}j]j &c.vga_switcheroo_register_audio_clientasbuh1hhj ubj;)}(h h]h }(hjR hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubj)}(hjh]h*}(hj` hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjR)}(hopsh]hops}(hjm hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj ubjs)}(hstruct pci_dev *vga_devh](jy)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubh)}(hhh]jR)}(hpci_devh]hpci_dev}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j &c.vga_switcheroo_register_audio_clientasbuh1hhj ubj;)}(h h]h }(hj hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjR)}(hvga_devh]hvga_dev}(hj hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj ubeh}(h]h ]h"]h$]h&]jjjkuh1jlhjH hhhjZ hMjubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjD hhhjZ hMjubah}(h]j? ah ](jjeh"]h$]h&]jj)jhuh1jhjZ hMjhjA hhubj)}(hhh]h)}(hregister audio clienth]hregister audio client}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chM^hj hhubah}(h]h ]h"]h$]h&]uh1jhjA hhhjZ hMjubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct pci_dev *pdev`` client pci device ``const struct vga_switcheroo_client_ops *ops`` client callbacks ``struct pci_dev *vga_dev`` pci device which is bound to current audio client **Description** Register audio client (audio device on a GPU). The client is assumed to use runtime PM. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met. **Return** 0 on success, -ENOMEM on memory allocation error, -EINVAL on getting client id error.h](h)}(h**Parameters**h]j)}(hj) h]h Parameters}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj' ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMbhj# ubj)}(hhh](j)}(h+``struct pci_dev *pdev`` client pci device h](j)}(h``struct pci_dev *pdev``h]j)}(hjH h]hstruct pci_dev *pdev}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chM_hjB ubj)}(hhh]h)}(hclient pci deviceh]hclient pci device}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj] hM_hj^ ubah}(h]h ]h"]h$]h&]uh1jhjB ubeh}(h]h ]h"]h$]h&]uh1jhj] hM_hj? ubj)}(hA``const struct vga_switcheroo_client_ops *ops`` client callbacks h](j)}(h/``const struct vga_switcheroo_client_ops *ops``h]j)}(hj h]h+const struct vga_switcheroo_client_ops *ops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chM`hj{ ubj)}(hhh]h)}(hclient callbacksh]hclient callbacks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM`hj ubah}(h]h ]h"]h$]h&]uh1jhj{ ubeh}(h]h ]h"]h$]h&]uh1jhj hM`hj? ubj)}(hN``struct pci_dev *vga_dev`` pci device which is bound to current audio client h](j)}(h``struct pci_dev *vga_dev``h]j)}(hj h]hstruct pci_dev *vga_dev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMahj ubj)}(hhh]h)}(h1pci device which is bound to current audio clienth]h1pci device which is bound to current audio client}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMahj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMahj? ubeh}(h]h ]h"]h$]h&]uh1jhj# ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMchj# ubh)}(hRegister audio client (audio device on a GPU). The client is assumed to use runtime PM. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met.h]hRegister audio client (audio device on a GPU). The client is assumed to use runtime PM. Beforehand, vga_switcheroo_client_probe_defer() shall be called to ensure that all prerequisites are met.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMchj# ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMghj# ubh)}(hU0 on success, -ENOMEM on memory allocation error, -EINVAL on getting client id error.h]hU0 on success, -ENOMEM on memory allocation error, -EINVAL on getting client id error.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMghj# ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.vga_switcheroo_client_probe_defer (C function)#c.vga_switcheroo_client_probe_deferhNtauh1jhjhhhNhNubj)}(hhh](j)}(h=bool vga_switcheroo_client_probe_defer (struct pci_dev *pdev)h]j#)}(hprobe callback and return ``-EPROBE_DEFER`` if it evaluates to ``true``. Thou shalt not register the client ere thou hast called this. **Return** ``true`` if probing should be deferred, otherwise ``false``.h](h)}(h**Parameters**h]j)}(hjBh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj<ubj)}(hhh]j)}(h+``struct pci_dev *pdev`` client pci device h](j)}(h``struct pci_dev *pdev``h]j)}(hjah]hstruct pci_dev *pdev}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj[ubj)}(hhh]h)}(hclient pci deviceh]hclient pci device}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhMhjwubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjvhMhjXubah}(h]h ]h"]h$]h&]uh1jhj<ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj<ubh)}(hXDetermine whether any prerequisites are not fulfilled to probe a given client. Drivers shall invoke this early on in their ->probe callback and return ``-EPROBE_DEFER`` if it evaluates to ``true``. Thou shalt not register the client ere thou hast called this.h](hDetermine whether any prerequisites are not fulfilled to probe a given client. Drivers shall invoke this early on in their ->probe callback and return }(hjhhhNhNubj)}(h``-EPROBE_DEFER``h]h -EPROBE_DEFER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if it evaluates to }(hjhhhNhNubj)}(h``true``h]htrue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh?. Thou shalt not register the client ere thou hast called this.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj<ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj<ubh)}(h<``true`` if probing should be deferred, otherwise ``false``.h](j)}(h``true``h]htrue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* if probing should be deferred, otherwise }(hjhhhNhNubj)}(h ``false``h]hfalse}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,vga_switcheroo_get_client_state (C function)!c.vga_switcheroo_get_client_statehNtauh1jhjhhhNhNubj)}(hhh](j)}(hPenum vga_switcheroo_state vga_switcheroo_get_client_state (struct pci_dev *pdev)h]j#)}(hOenum vga_switcheroo_state vga_switcheroo_get_client_state(struct pci_dev *pdev)h](jy)}(hjh]henum}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjHhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMubj;)}(h h]h }(hjZhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjHhhhjYhMubh)}(hhh]jR)}(hvga_switcheroo_stateh]hvga_switcheroo_state}(hjkhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjhubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmmodnameN classnameNjj)}j]j)}jvga_switcheroo_get_client_statesb!c.vga_switcheroo_get_client_stateasbuh1hhjHhhhjYhMubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjHhhhjYhMubjL)}(hvga_switcheroo_get_client_stateh]jR)}(hjh]hvga_switcheroo_get_client_state}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjHhhhjYhMubjm)}(h(struct pci_dev *pdev)h]js)}(hstruct pci_dev *pdevh](jy)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubh)}(hhh]jR)}(hpci_devh]hpci_dev}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j!c.vga_switcheroo_get_client_stateasbuh1hhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjR)}(hpdevh]hpdev}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubah}(h]h ]h"]h$]h&]jjjkuh1jlhjHhhhjYhMubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjDhhhjYhMubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1jhjYhMhjAhhubj)}(hhh]h)}(h$obtain power state of a given clienth]h$obtain power state of a given client}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj7hhubah}(h]h ]h"]h$]h&]uh1jhjAhhhjYhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjRjjRjjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct pci_dev *pdev`` client pci device **Description** Obtain power state of a given client as seen from vga_switcheroo. The function is only called from hda_intel.c. **Return** Power state.h](h)}(h**Parameters**h]j)}(hj\h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjVubj)}(hhh]j)}(h+``struct pci_dev *pdev`` client pci device h](j)}(h``struct pci_dev *pdev``h]j)}(hj{h]hstruct pci_dev *pdev}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjuubj)}(hhh]h)}(hclient pci deviceh]hclient pci device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjhMhjrubah}(h]h ]h"]h$]h&]uh1jhjVubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjVubh)}(hoObtain power state of a given client as seen from vga_switcheroo. The function is only called from hda_intel.c.h]hoObtain power state of a given client as seen from vga_switcheroo. The function is only called from hda_intel.c.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjVubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjVubh)}(h Power state.h]h Power state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjVubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j-vga_switcheroo_unregister_client (C function)"c.vga_switcheroo_unregister_clienthNtauh1jhjhhhNhNubj)}(hhh](j)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhX if no handler has registered or if the handler does not support switching the DDC lines. Also, a negative value returned by the handler is propagated back to the caller. Finally, invoking this function without calling vga_switcheroo_lock_ddc() first is not allowed and will result in }(hj$hhhNhNubj)}(h ``-EINVAL``h]h-EINVAL}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMGhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j2vga_switcheroo_process_delayed_switch (C function)'c.vga_switcheroo_process_delayed_switchhNtauh1jhjhhhNhNubj)}(hhh](j)}(h0int vga_switcheroo_process_delayed_switch (void)h]j#)}(h/int vga_switcheroo_process_delayed_switch(void)h](j))}(hinth]hint}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhjhMubjL)}(h%vga_switcheroo_process_delayed_switchh]jR)}(h%vga_switcheroo_process_delayed_switchh]h%vga_switcheroo_process_delayed_switch}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjhhhjhMubjm)}(h(void)h]js)}(hvoidh]j))}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]noemphjjjkuh1jrhjubah}(h]h ]h"]h$]h&]jjjkuh1jlhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjhhhjhMubah}(h]j|ah ](jjeh"]h$]h&]jj)jhuh1jhjhMhj~hhubj)}(hhh]h)}(hhelper for delayed switchingh]hhelper for delayed switching}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj~hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj)}(hXO**Parameters** ``void`` no arguments **Description** Process a delayed switch if one is pending. **Return** 0 on success. -EINVAL if no delayed switch is pending, if the client has unregistered in the meantime or if there are other clients blocking the switch. If the actual switch fails, an error is reported and 0 is returned.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj ubj)}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j)}(hj1h]hvoid}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj+ubj)}(hhh]h)}(h no argumentsh]h no arguments}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjlh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj ubh)}(h+Process a delayed switch if one is pending.h]h+Process a delayed switch if one is pending.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj ubh)}(h0 on success. -EINVAL if no delayed switch is pending, if the client has unregistered in the meantime or if there are other clients blocking the switch. If the actual switch fails, an error is reported and 0 is returned.h]h0 on success. -EINVAL if no delayed switch is pending, if the client has unregistered in the meantime or if there are other clients blocking the switch. If the actual switch fails, an error is reported and 0 is returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.vga_switcheroo_init_domain_pm_ops (C function)#c.vga_switcheroo_init_domain_pm_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(hXint vga_switcheroo_init_domain_pm_ops (struct device *dev, struct dev_pm_domain *domain)h]j#)}(hWint vga_switcheroo_init_domain_pm_ops(struct device *dev, struct dev_pm_domain *domain)h](j))}(hinth]hint}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjhhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chM ubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhjhM ubjL)}(h!vga_switcheroo_init_domain_pm_opsh]jR)}(h!vga_switcheroo_init_domain_pm_opsh]h!vga_switcheroo_init_domain_pm_ops}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjhhhjhM ubjm)}(h2(struct device *dev, struct dev_pm_domain *domain)h](js)}(hstruct device *devh](jy)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjubj;)}(h h]h }(hj"hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubh)}(hhh]jR)}(hdeviceh]hdevice}(hj3hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j)}jjsb#c.vga_switcheroo_init_domain_pm_opsasbuh1hhjubj;)}(h h]h }(hjShhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubj)}(hjh]h*}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjR)}(hdevh]hdev}(hjnhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj ubjs)}(hstruct dev_pm_domain *domainh](jy)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubh)}(hhh]jR)}(h dev_pm_domainh]h dev_pm_domain}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jO#c.vga_switcheroo_init_domain_pm_opsasbuh1hhjubj;)}(h h]h }(hjhhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjR)}(hdomainh]hdomain}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj ubeh}(h]h ]h"]h$]h&]jjjkuh1jlhjhhhjhM ubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(hhelper for driver power controlh]hhelper for driver power control}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjhNhNubj)}(hX3**Parameters** ``struct device *dev`` vga client device ``struct dev_pm_domain *domain`` power domain **Description** Helper for GPUs whose power state is controlled by the driver's runtime pm. After the GPU has been suspended, the handler needs to be called to cut power to the GPU. Likewise it needs to reinstate power before the GPU can resume. To this end, this helper augments the suspend/resume functions by the requisite calls to the handler. It needs only be called on platforms where the power switch is separate to the device being powered down.h](h)}(h**Parameters**h]j)}(hj*h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj$ubj)}(hhh](j)}(h)``struct device *dev`` vga client device h](j)}(h``struct device *dev``h]j)}(hjIh]hstruct device *dev}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhjCubj)}(hhh]h)}(hvga client deviceh]hvga client device}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj_ubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj^hMhj@ubj)}(h.``struct dev_pm_domain *domain`` power domain h](j)}(h ``struct dev_pm_domain *domain``h]j)}(hjh]hstruct dev_pm_domain *domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj|ubj)}(hhh]h)}(h power domainh]h power domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhjhMhj@ubeh}(h]h ]h"]h$]h&]uh1jhj$ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj$ubh)}(hXHelper for GPUs whose power state is controlled by the driver's runtime pm. After the GPU has been suspended, the handler needs to be called to cut power to the GPU. Likewise it needs to reinstate power before the GPU can resume. To this end, this helper augments the suspend/resume functions by the requisite calls to the handler. It needs only be called on platforms where the power switch is separate to the device being powered down.h]hXHelper for GPUs whose power state is controlled by the driver’s runtime pm. After the GPU has been suspended, the handler needs to be called to cut power to the GPU. Likewise it needs to reinstate power before the GPU can resume. To this end, this helper augments the suspend/resume functions by the requisite calls to the handler. It needs only be called on platforms where the power switch is separate to the device being powered down.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:31: ./drivers/gpu/vga/vga_switcheroo.chMhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]public-functionsah ]h"]h$]public functionsah&]uh1hhjhhhhhK referencedKubh)}(hhh](h)}(hPublic structuresh]hPublic structures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK#ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!vga_switcheroo_handler (C struct)c.vga_switcheroo_handlerhNtauh1jhjhhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhNubj)}(hhh](j)}(hvga_switcheroo_handlerh]j#)}(hstruct vga_switcheroo_handlerh](jy)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjhhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKubj;)}(h h]h }(hj+hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjhhhj*hKubjL)}(hvga_switcheroo_handlerh]jR)}(hjh]hvga_switcheroo_handler}(hj=hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj9ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjhhhj*hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjhhhj*hKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhj*hKhjhhubj)}(hhh]h)}(hhandler callbacksh]hhandler callbacks}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhK^hj\hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj*hKubeh}(h]h ](jstructeh"]h$]h&]jjjjwjjwjjjuh1jhhhjhjhNubj)}(hX**Definition**:: struct vga_switcheroo_handler { int (*init)(void); int (*switchto)(enum vga_switcheroo_client_id id); int (*switch_ddc)(enum vga_switcheroo_client_id id); int (*power_state)(enum vga_switcheroo_client_id id, enum vga_switcheroo_state state); enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev); }; **Members** ``init`` initialize handler. Optional. This gets called when vga_switcheroo is enabled, i.e. when two vga clients have registered. It allows the handler to perform some delayed initialization that depends on the existence of the vga clients. Currently only the radeon and amdgpu drivers use this. The return value is ignored ``switchto`` switch outputs to given client. Mandatory. For muxless machines this should be a no-op. Returning 0 denotes success, anything else failure (in which case the switch is aborted) ``switch_ddc`` switch DDC lines to given client. Optional. Should return the previous DDC owner on success or a negative int on failure ``power_state`` cut or reinstate power of given client. Optional. The return value is ignored ``get_client_id`` determine if given pci device is integrated or discrete GPU. Mandatoryh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKbhj{ubh literal_block)}(hXNstruct vga_switcheroo_handler { int (*init)(void); int (*switchto)(enum vga_switcheroo_client_id id); int (*switch_ddc)(enum vga_switcheroo_client_id id); int (*power_state)(enum vga_switcheroo_client_id id, enum vga_switcheroo_state state); enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev); };h]hXNstruct vga_switcheroo_handler { int (*init)(void); int (*switchto)(enum vga_switcheroo_client_id id); int (*switch_ddc)(enum vga_switcheroo_client_id id); int (*power_state)(enum vga_switcheroo_client_id id, enum vga_switcheroo_state state); enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev); };}hjsbah}(h]h ]h"]h$]h&]jjjkuh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKdhj{ubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKlhj{ubj)}(hhh](j)}(hXE``init`` initialize handler. Optional. This gets called when vga_switcheroo is enabled, i.e. when two vga clients have registered. It allows the handler to perform some delayed initialization that depends on the existence of the vga clients. Currently only the radeon and amdgpu drivers use this. The return value is ignored h](j)}(h``init``h]j)}(hjh]hinit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKehjubj)}(hhh]h)}(hX;initialize handler. Optional. This gets called when vga_switcheroo is enabled, i.e. when two vga clients have registered. It allows the handler to perform some delayed initialization that depends on the existence of the vga clients. Currently only the radeon and amdgpu drivers use this. The return value is ignoredh]hX;initialize handler. Optional. This gets called when vga_switcheroo is enabled, i.e. when two vga clients have registered. It allows the handler to perform some delayed initialization that depends on the existence of the vga clients. Currently only the radeon and amdgpu drivers use this. The return value is ignored}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhK`hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKehjubj)}(h``switchto`` switch outputs to given client. Mandatory. For muxless machines this should be a no-op. Returning 0 denotes success, anything else failure (in which case the switch is aborted) h](j)}(h ``switchto``h]j)}(hjh]hswitchto}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKihjubj)}(hhh]h)}(hswitch outputs to given client. Mandatory. For muxless machines this should be a no-op. Returning 0 denotes success, anything else failure (in which case the switch is aborted)h]hswitch outputs to given client. Mandatory. For muxless machines this should be a no-op. Returning 0 denotes success, anything else failure (in which case the switch is aborted)}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKihjubj)}(h``switch_ddc`` switch DDC lines to given client. Optional. Should return the previous DDC owner on success or a negative int on failure h](j)}(h``switch_ddc``h]j)}(hjBh]h switch_ddc}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKlhj<ubj)}(hhh]h)}(hxswitch DDC lines to given client. Optional. Should return the previous DDC owner on success or a negative int on failureh]hxswitch DDC lines to given client. Optional. Should return the previous DDC owner on success or a negative int on failure}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKjhjXubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhjWhKlhjubj)}(h^``power_state`` cut or reinstate power of given client. Optional. The return value is ignored h](j)}(h``power_state``h]j)}(hj|h]h power_state}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKnhjvubj)}(hhh]h)}(hMcut or reinstate power of given client. Optional. The return value is ignoredh]hMcut or reinstate power of given client. Optional. The return value is ignored}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKmhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjhKnhjubj)}(hX``get_client_id`` determine if given pci device is integrated or discrete GPU. Mandatoryh](j)}(h``get_client_id``h]j)}(hjh]h get_client_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKohjubj)}(hhh]h)}(hFdetermine if given pci device is integrated or discrete GPU. Mandatoryh]hFdetermine if given pci device is integrated or discrete GPU. Mandatory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKohjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKohjubeh}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhjhNubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKshjhhubh)}(hHandler callbacks. The multiplexer itself. The **switchto** and **get_client_id** methods are mandatory, all others may be set to NULL.h](h/Handler callbacks. The multiplexer itself. The }(hjhhhNhNubj)}(h **switchto**h]hswitchto}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h**get_client_id**h]h get_client_id}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh6 methods are mandatory, all others may be set to NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:37: ./include/linux/vga_switcheroo.hhKqhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$vga_switcheroo_client_ops (C struct)c.vga_switcheroo_client_opshNtauh1jhjhhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhNubj)}(hhh](j)}(hvga_switcheroo_client_opsh]j#)}(h struct vga_switcheroo_client_opsh](jy)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhjWhhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKubj;)}(h h]h }(hjihhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjWhhhjhhKubjL)}(hvga_switcheroo_client_opsh]jR)}(hjUh]hvga_switcheroo_client_ops}(hj{hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjwubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjWhhhjhhKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjShhhjhhKubah}(h]jMah ](jjeh"]h$]h&]jj)jhuh1jhjhhKhjPhhubj)}(hhh]h)}(hclient callbacksh]hclient callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhK~hjhhubah}(h]h ]h"]h$]h&]uh1jhjPhhhjhhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jhhhjhjOhNubj)}(hXM**Definition**:: struct vga_switcheroo_client_ops { void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state); void (*reprobe)(struct pci_dev *dev); bool (*can_switch)(struct pci_dev *dev); void (*gpu_bound)(struct pci_dev *dev, enum vga_switcheroo_client_id); }; **Members** ``set_gpu_state`` do the equivalent of suspend/resume for the card. Mandatory. This should not cut power to the discrete GPU, which is the job of the handler ``reprobe`` poll outputs. Optional. This gets called after waking the GPU and switching the outputs to it ``can_switch`` check if the device is in a position to switch now. Mandatory. The client should return false if a user space process has one of its device files open ``gpu_bound`` notify the client id to audio client when the GPU is bound.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjubj)}(hXstruct vga_switcheroo_client_ops { void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state); void (*reprobe)(struct pci_dev *dev); bool (*can_switch)(struct pci_dev *dev); void (*gpu_bound)(struct pci_dev *dev, enum vga_switcheroo_client_id); };h]hXstruct vga_switcheroo_client_ops { void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state); void (*reprobe)(struct pci_dev *dev); bool (*can_switch)(struct pci_dev *dev); void (*gpu_bound)(struct pci_dev *dev, enum vga_switcheroo_client_id); };}hjsbah}(h]h ]h"]h$]h&]jjjkuh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjubj)}(hhh](j)}(h``set_gpu_state`` do the equivalent of suspend/resume for the card. Mandatory. This should not cut power to the discrete GPU, which is the job of the handler h](j)}(h``set_gpu_state``h]j)}(hj h]h set_gpu_state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj ubj)}(hhh]h)}(hdo the equivalent of suspend/resume for the card. Mandatory. This should not cut power to the discrete GPU, which is the job of the handlerh]hdo the equivalent of suspend/resume for the card. Mandatory. This should not cut power to the discrete GPU, which is the job of the handler}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hj``reprobe`` poll outputs. Optional. This gets called after waking the GPU and switching the outputs to it h](j)}(h ``reprobe``h]j)}(hjD h]hreprobe}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj> ubj)}(hhh]h)}(h]poll outputs. Optional. This gets called after waking the GPU and switching the outputs to ith]h]poll outputs. Optional. This gets called after waking the GPU and switching the outputs to it}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjZ ubah}(h]h ]h"]h$]h&]uh1jhj> ubeh}(h]h ]h"]h$]h&]uh1jhjY hKhj ubj)}(h``can_switch`` check if the device is in a position to switch now. Mandatory. The client should return false if a user space process has one of its device files open h](j)}(h``can_switch``h]j)}(hj~ h]h can_switch}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjx ubj)}(hhh]h)}(hcheck if the device is in a position to switch now. Mandatory. The client should return false if a user space process has one of its device files openh]hcheck if the device is in a position to switch now. Mandatory. The client should return false if a user space process has one of its device files open}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhjx ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hI``gpu_bound`` notify the client id to audio client when the GPU is bound.h](j)}(h ``gpu_bound``h]j)}(hj h]h gpu_bound}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj ubj)}(hhh]h)}(h;notify the client id to audio client when the GPU is bound.h]h;notify the client id to audio client when the GPU is bound.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhjOhNubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjhhubh)}(hX,Client callbacks. A client can be either a GPU or an audio device on a GPU. The **set_gpu_state** and **can_switch** methods are mandatory, **reprobe** may be set to NULL. For audio clients, the **reprobe** member is bogus. OTOH, **gpu_bound** is only for audio clients, and not used for GPU clients.h](hPClient callbacks. A client can be either a GPU or an audio device on a GPU. The }(hj!hhhNhNubj)}(h**set_gpu_state**h]h set_gpu_state}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh and }(hj!hhhNhNubj)}(h**can_switch**h]h can_switch}(hj+!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh methods are mandatory, }(hj!hhhNhNubj)}(h **reprobe**h]hreprobe}(hj=!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh, may be set to NULL. For audio clients, the }(hj!hhhNhNubj)}(h **reprobe**h]hreprobe}(hjO!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh member is bogus. OTOH, }(hj!hhhNhNubj)}(h **gpu_bound**h]h gpu_bound}(hja!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubh9 is only for audio clients, and not used for GPU clients.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:40: ./include/linux/vga_switcheroo.hhKhjhhubeh}(h]public-structuresah ]h"]public structuresah$]h&]uh1hhjhhhhhK#ubh)}(hhh](h)}(hPublic constantsh]hPublic constants}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hhhhhK,ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'vga_switcheroo_handler_flags_t (C enum) c.vga_switcheroo_handler_flags_thNtauh1jhj!hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhNubj)}(hhh](j)}(hvga_switcheroo_handler_flags_th]j#)}(h#enum vga_switcheroo_handler_flags_th](jy)}(hjh]henum}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj!hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhKubj;)}(h h]h }(hj!hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj!hhhj!hKubjL)}(hvga_switcheroo_handler_flags_th]jR)}(hj!h]hvga_switcheroo_handler_flags_t}(hj!hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj!ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj!hhhj!hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhj!hhhj!hKubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1jhj!hKhj!hhubj)}(hhh]h)}(hhandler flags bitmaskh]hhandler flags bitmask}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK'hj!hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj!hKubeh}(h]h ](jenumeh"]h$]h&]jjjj"jj"jjjuh1jhhhj!hj!hNubj)}(hXz**Constants** ``VGA_SWITCHEROO_CAN_SWITCH_DDC`` whether the handler is able to switch the DDC lines separately. This signals to clients that they should call drm_get_edid_switcheroo() to probe the EDID ``VGA_SWITCHEROO_NEEDS_EDP_CONFIG`` whether the handler is unable to switch the AUX channel separately. This signals to clients that the active GPU needs to train the link and communicate the link parameters to the inactive GPU (mediated by vga_switcheroo). The inactive GPU may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3)h](h)}(h **Constants**h]j)}(hj"h]h Constants}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK+hj "ubj)}(hhh](j)}(h``VGA_SWITCHEROO_CAN_SWITCH_DDC`` whether the handler is able to switch the DDC lines separately. This signals to clients that they should call drm_get_edid_switcheroo() to probe the EDID h](j)}(h!``VGA_SWITCHEROO_CAN_SWITCH_DDC``h]j)}(hj0"h]hVGA_SWITCHEROO_CAN_SWITCH_DDC}(hj2"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj."ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK0hj*"ubj)}(hhh]h)}(hwhether the handler is able to switch the DDC lines separately. This signals to clients that they should call drm_get_edid_switcheroo() to probe the EDIDh]hwhether the handler is able to switch the DDC lines separately. This signals to clients that they should call drm_get_edid_switcheroo() to probe the EDID}(hjI"hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK.hjF"ubah}(h]h ]h"]h$]h&]uh1jhj*"ubeh}(h]h ]h"]h$]h&]uh1jhjE"hK0hj'"ubj)}(hX``VGA_SWITCHEROO_NEEDS_EDP_CONFIG`` whether the handler is unable to switch the AUX channel separately. This signals to clients that the active GPU needs to train the link and communicate the link parameters to the inactive GPU (mediated by vga_switcheroo). The inactive GPU may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3)h](j)}(h#``VGA_SWITCHEROO_NEEDS_EDP_CONFIG``h]j)}(hjj"h]hVGA_SWITCHEROO_NEEDS_EDP_CONFIG}(hjl"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh"ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK7hjd"ubj)}(hhh]h)}(hXxwhether the handler is unable to switch the AUX channel separately. This signals to clients that the active GPU needs to train the link and communicate the link parameters to the inactive GPU (mediated by vga_switcheroo). The inactive GPU may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3)h]hXxwhether the handler is unable to switch the AUX channel separately. This signals to clients that the active GPU needs to train the link and communicate the link parameters to the inactive GPU (mediated by vga_switcheroo). The inactive GPU may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK3hj"ubah}(h]h ]h"]h$]h&]uh1jhjd"ubeh}(h]h ]h"]h$]h&]uh1jhj"hK7hj'"ubeh}(h]h ]h"]h$]h&]uh1jhj "ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj!hhhj!hNubh)}(h**Description**h]j)}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK;hj!hhubh)}(hkHandler flags bitmask. Used by handlers to declare their capabilities upon registering with vga_switcheroo.h]hkHandler flags bitmask. Used by handlers to declare their capabilities upon registering with vga_switcheroo.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:46: ./include/linux/vga_switcheroo.hhK2hj!hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!vga_switcheroo_client_id (C enum)c.vga_switcheroo_client_idhNtauh1jhj!hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhNubj)}(hhh](j)}(hvga_switcheroo_client_idh]j#)}(henum vga_switcheroo_client_idh](jy)}(hjh]henum}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj"hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKubj;)}(h h]h }(hj"hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj"hhhj"hKubjL)}(hvga_switcheroo_client_idh]jR)}(hj"h]hvga_switcheroo_client_id}(hj #hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj#ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj"hhhj"hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhj"hhhj"hKubah}(h]j"ah ](jjeh"]h$]h&]jj)jhuh1jhj"hKhj"hhubj)}(hhh]h)}(hclient identifierh]hclient identifier}(hj.#hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKLhj+#hhubah}(h]h ]h"]h$]h&]uh1jhj"hhhj"hKubeh}(h]h ](jenumeh"]h$]h&]jjjjF#jjF#jjjuh1jhhhj!hj"hNubj)}(hX**Constants** ``VGA_SWITCHEROO_UNKNOWN_ID`` initial identifier assigned to vga clients. Determining the id requires the handler, so GPUs are given their true id in a delayed fashion in vga_switcheroo_enable() ``VGA_SWITCHEROO_IGD`` integrated graphics device ``VGA_SWITCHEROO_DIS`` discrete graphics device ``VGA_SWITCHEROO_MAX_CLIENTS`` currently no more than two GPUs are supportedh](h)}(h **Constants**h]j)}(hjP#h]h Constants}(hjR#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN#ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKPhjJ#ubj)}(hhh](j)}(h``VGA_SWITCHEROO_UNKNOWN_ID`` initial identifier assigned to vga clients. Determining the id requires the handler, so GPUs are given their true id in a delayed fashion in vga_switcheroo_enable() h](j)}(h``VGA_SWITCHEROO_UNKNOWN_ID``h]j)}(hjo#h]hVGA_SWITCHEROO_UNKNOWN_ID}(hjq#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm#ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKUhji#ubj)}(hhh]h)}(hinitial identifier assigned to vga clients. Determining the id requires the handler, so GPUs are given their true id in a delayed fashion in vga_switcheroo_enable()h]hinitial identifier assigned to vga clients. Determining the id requires the handler, so GPUs are given their true id in a delayed fashion in vga_switcheroo_enable()}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKShj#ubah}(h]h ]h"]h$]h&]uh1jhji#ubeh}(h]h ]h"]h$]h&]uh1jhj#hKUhjf#ubj)}(h2``VGA_SWITCHEROO_IGD`` integrated graphics device h](j)}(h``VGA_SWITCHEROO_IGD``h]j)}(hj#h]hVGA_SWITCHEROO_IGD}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKXhj#ubj)}(hhh]h)}(hintegrated graphics deviceh]hintegrated graphics device}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKXhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hKXhjf#ubj)}(h0``VGA_SWITCHEROO_DIS`` discrete graphics device h](j)}(h``VGA_SWITCHEROO_DIS``h]j)}(hj#h]hVGA_SWITCHEROO_DIS}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhK[hj#ubj)}(hhh]h)}(hdiscrete graphics deviceh]hdiscrete graphics device}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hK[hj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hK[hjf#ubj)}(hL``VGA_SWITCHEROO_MAX_CLIENTS`` currently no more than two GPUs are supportedh](j)}(h``VGA_SWITCHEROO_MAX_CLIENTS``h]j)}(hj$h]hVGA_SWITCHEROO_MAX_CLIENTS}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhK]hj$ubj)}(hhh]h)}(h-currently no more than two GPUs are supportedh]h-currently no more than two GPUs are supported}(hj4$hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhK^hj1$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj0$hK]hjf#ubeh}(h]h ]h"]h$]h&]uh1jhjJ#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj!hhhj"hNubh)}(h**Description**h]j)}(hj^$h]h Description}(hj`$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\$ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKahj!hhubh)}(hAClient identifier. Audio clients use the same identifier & 0x100.h]hAClient identifier. Audio clients use the same identifier & 0x100.}(hjt$hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:49: ./include/linux/vga_switcheroo.hhKThj!hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jvga_switcheroo_state (C enum)c.vga_switcheroo_statehNtauh1jhj!hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhNubj)}(hhh](j)}(hvga_switcheroo_stateh]j#)}(henum vga_switcheroo_stateh](jy)}(hjh]henum}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj$hhha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKubj;)}(h h]h }(hj$hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj$hhhj$hKubjL)}(hvga_switcheroo_stateh]jR)}(hj$h]hvga_switcheroo_state}(hj$hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj$ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj$hhhj$hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhj$hhhj$hKubah}(h]j$ah ](jjeh"]h$]h&]jj)jhuh1jhj$hKhj$hhubj)}(hhh]h)}(hclient power stateh]hclient power state}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhK;hj$hhubah}(h]h ]h"]h$]h&]uh1jhj$hhhj$hKubeh}(h]h ](jenumeh"]h$]h&]jjjj$jj$jjjuh1jhhhj!hj$hNubj)}(h**Constants** ``VGA_SWITCHEROO_OFF`` off ``VGA_SWITCHEROO_ON`` on ``VGA_SWITCHEROO_NOT_FOUND`` client has not registered with vga_switcheroo. Only used in vga_switcheroo_get_client_state() which in turn is only called from hda_intel.ch](h)}(h **Constants**h]j)}(hj%h]h Constants}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhK?hj$ubj)}(hhh](j)}(h``VGA_SWITCHEROO_OFF`` off h](j)}(h``VGA_SWITCHEROO_OFF``h]j)}(hj %h]hVGA_SWITCHEROO_OFF}(hj"%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKBhj%ubj)}(hhh]h)}(hoffh]hoff}(hj9%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5%hKBhj6%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj5%hKBhj%ubj)}(h``VGA_SWITCHEROO_ON`` on h](j)}(h``VGA_SWITCHEROO_ON``h]j)}(hjY%h]hVGA_SWITCHEROO_ON}(hj[%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW%ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKEhjS%ubj)}(hhh]h)}(honh]hon}(hjr%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn%hKEhjo%ubah}(h]h ]h"]h$]h&]uh1jhjS%ubeh}(h]h ]h"]h$]h&]uh1jhjn%hKEhj%ubj)}(h``VGA_SWITCHEROO_NOT_FOUND`` client has not registered with vga_switcheroo. Only used in vga_switcheroo_get_client_state() which in turn is only called from hda_intel.ch](j)}(h``VGA_SWITCHEROO_NOT_FOUND``h]j)}(hj%h]hVGA_SWITCHEROO_NOT_FOUND}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKIhj%ubj)}(hhh]h)}(hclient has not registered with vga_switcheroo. Only used in vga_switcheroo_get_client_state() which in turn is only called from hda_intel.ch]hclient has not registered with vga_switcheroo. Only used in vga_switcheroo_get_client_state() which in turn is only called from hda_intel.c}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKHhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hKIhj%ubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj!hhhj$hNubh)}(h**Description**h]j)}(hj%h]h Description}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKMhj!hhubh)}(hClient power state.h]hClient power state.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:52: ./include/linux/vga_switcheroo.hhKBhj!hhubeh}(h]public-constantsah ]h"]public constantsah$]h&]uh1hhjhhhhhK,ubh)}(hhh](h)}(hPrivate structuresh]hPrivate structures}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhK8ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jvgasr_priv (C struct) c.vgasr_privhNtauh1jhj&hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chNubj)}(hhh](j)}(h vgasr_privh]j#)}(hstruct vgasr_privh](jy)}(hjh]hstruct}(hj-&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj)&hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKubj;)}(h h]h }(hj;&hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj)&hhhj:&hKubjL)}(h vgasr_privh]jR)}(hj'&h]h vgasr_priv}(hjM&hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjI&ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj)&hhhj:&hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhj%&hhhj:&hKubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jhj:&hKhj"&hhubj)}(hhh]h)}(hvga_switcheroo private datah]hvga_switcheroo private data}(hjo&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhjl&hhubah}(h]h ]h"]h$]h&]uh1jhj"&hhhj:&hKubeh}(h]h ](jstructeh"]h$]h&]jjjj&jj&jjjuh1jhhhj&hj!&hNubj)}(hXu**Definition**:: struct vgasr_priv { bool active; bool delayed_switch_active; enum vga_switcheroo_client_id delayed_client_id; struct dentry *debugfs_root; int registered_clients; struct list_head clients; const struct vga_switcheroo_handler *handler; enum vga_switcheroo_handler_flags_t handler_flags; struct mutex mux_hw_lock; int old_ddc_owner; }; **Members** ``active`` whether vga_switcheroo is enabled. Prerequisite is the registration of two GPUs and a handler ``delayed_switch_active`` whether a delayed switch is pending ``delayed_client_id`` client to which a delayed switch is pending ``debugfs_root`` directory for vga_switcheroo debugfs interface ``registered_clients`` number of registered GPUs (counting only vga clients, not audio clients) ``clients`` list of registered clients ``handler`` registered handler ``handler_flags`` flags of registered handler ``mux_hw_lock`` protects mux state (in particular while DDC lines are temporarily switched) ``old_ddc_owner`` client to which DDC lines will be switched back on unlockh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh:}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&ubj)}(hXustruct vgasr_priv { bool active; bool delayed_switch_active; enum vga_switcheroo_client_id delayed_client_id; struct dentry *debugfs_root; int registered_clients; struct list_head clients; const struct vga_switcheroo_handler *handler; enum vga_switcheroo_handler_flags_t handler_flags; struct mutex mux_hw_lock; int old_ddc_owner; };h]hXustruct vgasr_priv { bool active; bool delayed_switch_active; enum vga_switcheroo_client_id delayed_client_id; struct dentry *debugfs_root; int registered_clients; struct list_head clients; const struct vga_switcheroo_handler *handler; enum vga_switcheroo_handler_flags_t handler_flags; struct mutex mux_hw_lock; int old_ddc_owner; };}hj&sbah}(h]h ]h"]h$]h&]jjjkuh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&ubh)}(h **Members**h]j)}(hj&h]hMembers}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&ubj)}(hhh](j)}(hi``active`` whether vga_switcheroo is enabled. Prerequisite is the registration of two GPUs and a handler h](j)}(h ``active``h]j)}(hj&h]hactive}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&ubj)}(hhh]h)}(h]whether vga_switcheroo is enabled. Prerequisite is the registration of two GPUs and a handlerh]h]whether vga_switcheroo is enabled. Prerequisite is the registration of two GPUs and a handler}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&hKhj&ubj)}(h>``delayed_switch_active`` whether a delayed switch is pending h](j)}(h``delayed_switch_active``h]j)}(hj'h]hdelayed_switch_active}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj'ubj)}(hhh]h)}(h#whether a delayed switch is pendingh]h#whether a delayed switch is pending}(hj/'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+'hKhj,'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj+'hKhj&ubj)}(hB``delayed_client_id`` client to which a delayed switch is pending h](j)}(h``delayed_client_id``h]j)}(hjO'h]hdelayed_client_id}(hjQ'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhjI'ubj)}(hhh]h)}(h+client to which a delayed switch is pendingh]h+client to which a delayed switch is pending}(hjh'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd'hKhje'ubah}(h]h ]h"]h$]h&]uh1jhjI'ubeh}(h]h ]h"]h$]h&]uh1jhjd'hKhj&ubj)}(h@``debugfs_root`` directory for vga_switcheroo debugfs interface h](j)}(h``debugfs_root``h]j)}(hj'h]h debugfs_root}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj'ubj)}(hhh]h)}(h.directory for vga_switcheroo debugfs interfaceh]h.directory for vga_switcheroo debugfs interface}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hKhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'hKhj&ubj)}(h```registered_clients`` number of registered GPUs (counting only vga clients, not audio clients) h](j)}(h``registered_clients``h]j)}(hj'h]hregistered_clients}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj'ubj)}(hhh]h)}(hHnumber of registered GPUs (counting only vga clients, not audio clients)h]hHnumber of registered GPUs (counting only vga clients, not audio clients)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'hKhj&ubj)}(h'``clients`` list of registered clients h](j)}(h ``clients``h]j)}(hj'h]hclients}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj'ubj)}(hhh]h)}(hlist of registered clientsh]hlist of registered clients}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKhj(ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhj&ubj)}(h``handler`` registered handler h](j)}(h ``handler``h]j)}(hj4(h]hhandler}(hj6(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj.(ubj)}(hhh]h)}(hregistered handlerh]hregistered handler}(hjM(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI(hKhjJ(ubah}(h]h ]h"]h$]h&]uh1jhj.(ubeh}(h]h ]h"]h$]h&]uh1jhjI(hKhj&ubj)}(h.``handler_flags`` flags of registered handler h](j)}(h``handler_flags``h]j)}(hjm(h]h handler_flags}(hjo(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhjg(ubj)}(hhh]h)}(hflags of registered handlerh]hflags of registered handler}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKhj(ubah}(h]h ]h"]h$]h&]uh1jhjg(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhj&ubj)}(h\``mux_hw_lock`` protects mux state (in particular while DDC lines are temporarily switched) h](j)}(h``mux_hw_lock``h]j)}(hj(h]h mux_hw_lock}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj(ubj)}(hhh]h)}(hKprotects mux state (in particular while DDC lines are temporarily switched)h]hKprotects mux state (in particular while DDC lines are temporarily switched)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhj&ubj)}(hK``old_ddc_owner`` client to which DDC lines will be switched back on unlockh](j)}(h``old_ddc_owner``h]j)}(hj(h]h old_ddc_owner}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj(ubj)}(hhh]h)}(h9client to which DDC lines will be switched back on unlockh]h9client to which DDC lines will be switched back on unlock}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj&hhhj!&hNubh)}(h**Description**h]j)}(hj#)h]h Description}(hj%)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&hhubh)}(h`vga_switcheroo private data. Currently only one vga_switcheroo instance per system is supported.h]h`vga_switcheroo private data. Currently only one vga_switcheroo instance per system is supported.}(hj9)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:58: ./drivers/gpu/vga/vga_switcheroo.chKhj&hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j vga_switcheroo_client (C struct)c.vga_switcheroo_clienthNtauh1jhj&hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chNubj)}(hhh](j)}(hvga_switcheroo_clienth]j#)}(hstruct vga_switcheroo_clienth](jy)}(hjh]hstruct}(hjb)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj^)hhhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKubj;)}(h h]h }(hjp)hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj^)hhhjo)hKubjL)}(hvga_switcheroo_clienth]jR)}(hj\)h]hvga_switcheroo_client}(hj)hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj~)ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj^)hhhjo)hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjZ)hhhjo)hKubah}(h]jT)ah ](jjeh"]h$]h&]jj)jhuh1jhjo)hKhjW)hhubj)}(hhh]h)}(hregistered clienth]hregistered client}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chK]hj)hhubah}(h]h ]h"]h$]h&]uh1jhjW)hhhjo)hKubeh}(h]h ](jstructeh"]h$]h&]jjjj)jj)jjjuh1jhhhj&hjV)hNubj)}(hX**Definition**:: struct vga_switcheroo_client { struct pci_dev *pdev; struct fb_info *fb_info; enum vga_switcheroo_state pwr_state; const struct vga_switcheroo_client_ops *ops; enum vga_switcheroo_client_id id; bool active; bool driver_power_control; struct list_head list; struct pci_dev *vga_dev; }; **Members** ``pdev`` client pci device ``fb_info`` framebuffer to which console is remapped on switching ``pwr_state`` current power state if manual power control is used. For driver power control, call vga_switcheroo_pwr_state(). ``ops`` client callbacks ``id`` client identifier. Determining the id requires the handler, so gpus are initially assigned VGA_SWITCHEROO_UNKNOWN_ID and later given their true id in vga_switcheroo_enable() ``active`` whether the outputs are currently switched to this client ``driver_power_control`` whether power state is controlled by the driver's runtime pm. If true, writing ON and OFF to the vga_switcheroo debugfs interface is a no-op so as not to interfere with runtime pm ``list`` client list ``vga_dev`` pci device, indicate which GPU is bound to current audio clienth](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKahj)ubj)}(hX@struct vga_switcheroo_client { struct pci_dev *pdev; struct fb_info *fb_info; enum vga_switcheroo_state pwr_state; const struct vga_switcheroo_client_ops *ops; enum vga_switcheroo_client_id id; bool active; bool driver_power_control; struct list_head list; struct pci_dev *vga_dev; };h]hX@struct vga_switcheroo_client { struct pci_dev *pdev; struct fb_info *fb_info; enum vga_switcheroo_state pwr_state; const struct vga_switcheroo_client_ops *ops; enum vga_switcheroo_client_id id; bool active; bool driver_power_control; struct list_head list; struct pci_dev *vga_dev; };}hj)sbah}(h]h ]h"]h$]h&]jjjkuh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKchj)ubh)}(h **Members**h]j)}(hj)h]hMembers}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKohj)ubj)}(hhh](j)}(h``pdev`` client pci device h](j)}(h``pdev``h]j)}(hj*h]hpdev}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chK_hj *ubj)}(hhh]h)}(hclient pci deviceh]hclient pci device}(hj**hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&*hK_hj'*ubah}(h]h ]h"]h$]h&]uh1jhj *ubeh}(h]h ]h"]h$]h&]uh1jhj&*hK_hj*ubj)}(hB``fb_info`` framebuffer to which console is remapped on switching h](j)}(h ``fb_info``h]j)}(hjJ*h]hfb_info}(hjL*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH*ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chK`hjD*ubj)}(hhh]h)}(h5framebuffer to which console is remapped on switchingh]h5framebuffer to which console is remapped on switching}(hjc*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_*hK`hj`*ubah}(h]h ]h"]h$]h&]uh1jhjD*ubeh}(h]h ]h"]h$]h&]uh1jhj_*hK`hj*ubj)}(h~``pwr_state`` current power state if manual power control is used. For driver power control, call vga_switcheroo_pwr_state(). h](j)}(h ``pwr_state``h]j)}(hj*h]h pwr_state}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKbhj}*ubj)}(hhh]h)}(hocurrent power state if manual power control is used. For driver power control, call vga_switcheroo_pwr_state().h]hocurrent power state if manual power control is used. For driver power control, call vga_switcheroo_pwr_state().}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKahj*ubah}(h]h ]h"]h$]h&]uh1jhj}*ubeh}(h]h ]h"]h$]h&]uh1jhj*hKbhj*ubj)}(h``ops`` client callbacks h](j)}(h``ops``h]j)}(hj*h]hops}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKchj*ubj)}(hhh]h)}(hclient callbacksh]hclient callbacks}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hKchj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hKchj*ubj)}(h``id`` client identifier. Determining the id requires the handler, so gpus are initially assigned VGA_SWITCHEROO_UNKNOWN_ID and later given their true id in vga_switcheroo_enable() h](j)}(h``id``h]j)}(hj*h]hid}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKfhj*ubj)}(hhh]h)}(hclient identifier. Determining the id requires the handler, so gpus are initially assigned VGA_SWITCHEROO_UNKNOWN_ID and later given their true id in vga_switcheroo_enable()h]hclient identifier. Determining the id requires the handler, so gpus are initially assigned VGA_SWITCHEROO_UNKNOWN_ID and later given their true id in vga_switcheroo_enable()}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKdhj +ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj +hKfhj*ubj)}(hE``active`` whether the outputs are currently switched to this client h](j)}(h ``active``h]j)}(hj0+h]hactive}(hj2+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.+ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKghj*+ubj)}(hhh]h)}(h9whether the outputs are currently switched to this clienth]h9whether the outputs are currently switched to this client}(hjI+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE+hKghjF+ubah}(h]h ]h"]h$]h&]uh1jhj*+ubeh}(h]h ]h"]h$]h&]uh1jhjE+hKghj*ubj)}(h``driver_power_control`` whether power state is controlled by the driver's runtime pm. If true, writing ON and OFF to the vga_switcheroo debugfs interface is a no-op so as not to interfere with runtime pm h](j)}(h``driver_power_control``h]j)}(hji+h]hdriver_power_control}(hjk+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg+ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKjhjc+ubj)}(hhh]h)}(hwhether power state is controlled by the driver's runtime pm. If true, writing ON and OFF to the vga_switcheroo debugfs interface is a no-op so as not to interfere with runtime pmh]hwhether power state is controlled by the driver’s runtime pm. If true, writing ON and OFF to the vga_switcheroo debugfs interface is a no-op so as not to interfere with runtime pm}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKhhj+ubah}(h]h ]h"]h$]h&]uh1jhjc+ubeh}(h]h ]h"]h$]h&]uh1jhj~+hKjhj*ubj)}(h``list`` client list h](j)}(h``list``h]j)}(hj+h]hlist}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKkhj+ubj)}(hhh]h)}(h client listh]h client list}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hKkhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hKkhj*ubj)}(hK``vga_dev`` pci device, indicate which GPU is bound to current audio clienth](j)}(h ``vga_dev``h]j)}(hj+h]hvga_dev}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKkhj+ubj)}(hhh]h)}(h?pci device, indicate which GPU is bound to current audio clienth]h?pci device, indicate which GPU is bound to current audio client}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKlhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hKkhj*ubeh}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj&hhhjV)hNubh)}(h**Description**h]j)}(hj,h]h Description}(hj!,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKohj&hhubh)}(hRegistered client. A client can be either a GPU or an audio device on a GPU. For audio clients, the **fb_info** and **active** members are bogus. For GPU clients, the **vga_dev** is bogus.h](hdRegistered client. A client can be either a GPU or an audio device on a GPU. For audio clients, the }(hj5,hhhNhNubj)}(h **fb_info**h]hfb_info}(hj=,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5,ubh and }(hj5,hhhNhNubj)}(h **active**h]hactive}(hjO,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5,ubh) members are bogus. For GPU clients, the }(hj5,hhhNhNubj)}(h **vga_dev**h]hvga_dev}(hja,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5,ubh is bogus.}(hj5,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:61: ./drivers/gpu/vga/vga_switcheroo.chKmhj&hhubeh}(h]private-structuresah ]h"]private structuresah$]h&]uh1hhjhhhhhK8ubeh}(h]apiah ]h"]apiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hHandlersh]hHandlers}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhKAubh)}(hhh](h)}(happle-gmux Handlerh]happle-gmux Handler}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhKDubh)}(hgmux is a microcontroller built into the MacBook Pro to support dual GPUs: A `Lattice XP2`_ on pre-retinas, a `Renesas R4F2113`_ on pre-T2 retinas.h](hMgmux is a microcontroller built into the MacBook Pro to support dual GPUs: A }(hj,hhhNhNubj)}(h`Lattice XP2`_h]h Lattice XP2}(hj,hhhNhNubah}(h]h ]h"]h$]h&]name Lattice XP2refuriBhttp://www.latticesemi.com/en/Products/FPGAandCPLD/LatticeXP2.aspxuh1jhj,resolvedKubh on pre-retinas, a }(hj,hhhNhNubj)}(h`Renesas R4F2113`_h]hRenesas R4F2113}(hj,hhhNhNubah}(h]h ]h"]h$]h&]nameRenesas R4F2113j,Dhttp://www.renesas.com/products/mpumcu/h8s/h8s2100/h8s2113/index.jspuh1jhj,j,Kubh on pre-T2 retinas.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:70: ./drivers/platform/x86/apple-gmux.chKhj,hhubh)}(hXoOn T2 Macbooks, the gmux is part of the T2 Coprocessor's SMC. The SMC has an I2C connection to a `NXP PCAL6524` GPIO expander, which enables/disables the voltage regulators of the discrete GPU, drives the display panel power, and has a GPIO to switch the eDP mux. The Intel CPU can interact with gmux through MMIO, similar to how the main SMC interface is controlled.h](hcOn T2 Macbooks, the gmux is part of the T2 Coprocessor’s SMC. The SMC has an I2C connection to a }(hj,hhhNhNubhtitle_reference)}(h`NXP PCAL6524`h]h NXP PCAL6524}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j,hj,ubhX GPIO expander, which enables/disables the voltage regulators of the discrete GPU, drives the display panel power, and has a GPIO to switch the eDP mux. The Intel CPU can interact with gmux through MMIO, similar to how the main SMC interface is controlled.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:70: ./drivers/platform/x86/apple-gmux.chK hj,hhubh)}(ho(The MacPro6,1 2013 also has a gmux, however it is unclear why since it has dual GPUs but no built-in display.)h]ho(The MacPro6,1 2013 also has a gmux, however it is unclear why since it has dual GPUs but no built-in display.)}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:70: ./drivers/platform/x86/apple-gmux.chK&hj,hhubh)}(hX+gmux is connected to the LPC bus of the southbridge. Its I/O ports are accessed differently depending on the microcontroller: Driver functions to access a pre-retina gmux are infixed ``_pio_``, those for a pre-T2 retina gmux are infixed ``_index_``, and those on T2 Macs are infixed with ``_mmio_``.h](hgmux is connected to the LPC bus of the southbridge. Its I/O ports are accessed differently depending on the microcontroller: Driver functions to access a pre-retina gmux are infixed }(hj-hhhNhNubj)}(h ``_pio_``h]h_pio_}(hj!-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh-, those for a pre-T2 retina gmux are infixed }(hj-hhhNhNubj)}(h ``_index_``h]h_index_}(hj3-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh(, and those on T2 Macs are infixed with }(hj-hhhNhNubj)}(h ``_mmio_``h]h_mmio_}(hjE-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:70: ./drivers/platform/x86/apple-gmux.chK)hj,hhubh)}(hW.. _Lattice XP2: http://www.latticesemi.com/en/Products/FPGAandCPLD/LatticeXP2.aspxh]h}(h] lattice-xp2ah ]h"] lattice xp2ah$]h&]j,j,uh1hhKhj,hhhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:70: ./drivers/platform/x86/apple-gmux.cjKubh)}(h].. _Renesas R4F2113: http://www.renesas.com/products/mpumcu/h8s/h8s2100/h8s2113/index.jsph]h}(h]renesas-r4f2113ah ]h"]renesas r4f2113ah$]h&]j,j,uh1hhKhj,hhhjj-jKubh)}(hI.. _NXP PCAL6524: https://www.nxp.com/docs/en/data-sheet/PCAL6524.pdfh]h}(h] nxp-pcal6524ah ]h"] nxp pcal6524ah$]h&]j,3https://www.nxp.com/docs/en/data-sheet/PCAL6524.pdfuh1hhKhj,hhhjj-ubh)}(hX!gmux is also connected to a GPIO pin of the southbridge and thereby is able to trigger an ACPI GPE. ACPI name GMGP holds this GPIO pin's number. On the MBP5 2008/09 it's GPIO pin 22 of the Nvidia MCP79, on following generations it's GPIO pin 6 of the Intel PCH, on MMIO gmux's it's pin 21.h]hX+gmux is also connected to a GPIO pin of the southbridge and thereby is able to trigger an ACPI GPE. ACPI name GMGP holds this GPIO pin’s number. On the MBP5 2008/09 it’s GPIO pin 22 of the Nvidia MCP79, on following generations it’s GPIO pin 6 of the Intel PCH, on MMIO gmux’s it’s pin 21.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:73: ./drivers/platform/x86/apple-gmux.chMbhj,hhubh)}(huThe GPE merely signals that an interrupt occurred, the actual type of event is identified by reading a gmux register.h]huThe GPE merely signals that an interrupt occurred, the actual type of event is identified by reading a gmux register.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:73: ./drivers/platform/x86/apple-gmux.chMghj,hhubh)}(hXIn addition to the GMGP name, gmux's ACPI device also has two methods GMSP and GMLV. GMLV likely means "GMUX Level", and reads the value of the GPIO, while GMSP likely means "GMUX Set Polarity", and seems to write to the GPIO's value. On newer Macbooks (This was introduced with or sometime before the MacBookPro14,3), the ACPI GPE method differentiates between the OS type: On Darwin, only a notification is signaled, whereas on other OSes, the GPIO's value is read and then inverted.h]hXIn addition to the GMGP name, gmux’s ACPI device also has two methods GMSP and GMLV. GMLV likely means “GMUX Level”, and reads the value of the GPIO, while GMSP likely means “GMUX Set Polarity”, and seems to write to the GPIO’s value. On newer Macbooks (This was introduced with or sometime before the MacBookPro14,3), the ACPI GPE method differentiates between the OS type: On Darwin, only a notification is signaled, whereas on other OSes, the GPIO’s value is read and then inverted.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:73: ./drivers/platform/x86/apple-gmux.chMjhj,hhubh)}(hX1Because Linux masquerades as Darwin, it ends up in the notification-only code path. On MMIO gmux's, this seems to lead to us being unable to clear interrupts, unless we call GMSP(0). Without this, there is a flood of status=0 interrupts that can't be cleared. This issue seems to be unique to MMIO gmux's.h]hX7Because Linux masquerades as Darwin, it ends up in the notification-only code path. On MMIO gmux’s, this seems to lead to us being unable to clear interrupts, unless we call GMSP(0). Without this, there is a flood of status=0 interrupts that can’t be cleared. This issue seems to be unique to MMIO gmux’s.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:73: ./drivers/platform/x86/apple-gmux.chMrhj,hhubh)}(hhh](h)}(h Graphics muxh]h Graphics mux}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhKMubh)}(hX[On pre-retinas, the LVDS outputs of both GPUs feed into gmux which muxes either of them to the panel. One of the tricks gmux has up its sleeve is to lengthen the blanking interval of its output during a switch to synchronize it with the GPU switched to. This allows for a flicker-free switch that is imperceptible by the user (`US 8,687,007 B2`_).h](hXGOn pre-retinas, the LVDS outputs of both GPUs feed into gmux which muxes either of them to the panel. One of the tricks gmux has up its sleeve is to lengthen the blanking interval of its output during a switch to synchronize it with the GPU switched to. This allows for a flicker-free switch that is imperceptible by the user (}(hj-hhhNhNubj)}(h`US 8,687,007 B2`_h]hUS 8,687,007 B2}(hj-hhhNhNubah}(h]h ]h"]h$]h&]nameUS 8,687,007 B2j,0https://pimg-fpiw.uspto.gov/fdd/07/870/086/0.pdfuh1jhj-j,Kubh).}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhhj-hhubh)}(hXHOn retinas, muxing is no longer done by gmux itself, but by a separate chip which is controlled by gmux. The chip is triple sourced, it is either an `NXP CBTL06142`_, `TI HD3SS212`_ or `Pericom PI3VDP12412`_. The panel is driven with eDP instead of LVDS since the pixel clock required for retina resolution exceeds LVDS' limits.h](hOn retinas, muxing is no longer done by gmux itself, but by a separate chip which is controlled by gmux. The chip is triple sourced, it is either an }(hj-hhhNhNubj)}(h`NXP CBTL06142`_h]h NXP CBTL06142}(hj-hhhNhNubah}(h]h ]h"]h$]h&]name NXP CBTL06142j,6https://www.nxp.com/documents/data_sheet/CBTL06141.pdfuh1jhj-j,Kubh, }(hj-hhhNhNubj)}(h`TI HD3SS212`_h]h TI HD3SS212}(hj.hhhNhNubah}(h]h ]h"]h$]h&]name TI HD3SS212j,.https://www.ti.com/lit/ds/symlink/hd3ss212.pdfuh1jhj-j,Kubh or }(hj-hhhNhNubj)}(h`Pericom PI3VDP12412`_h]hPericom PI3VDP12412}(hj'.hhhNhNubah}(h]h ]h"]h$]h&]namePericom PI3VDP12412j,9https://www.pericom.com/assets/Datasheets/PI3VDP12412.pdfuh1jhj-j,Kubh{. The panel is driven with eDP instead of LVDS since the pixel clock required for retina resolution exceeds LVDS’ limits.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMnhj-hhubh)}(hXuPre-retinas are able to switch the panel's DDC pins separately. This is handled by a `TI SN74LV4066A`_ which is controlled by gmux. The inactive GPU can thus probe the panel's EDID without switching over the entire panel. Retinas lack this functionality as the chips used for eDP muxing are incapable of switching the AUX channel separately (see the linked data sheets, Pericom would be capable but this is unused). However the retina panel has the NO_AUX_HANDSHAKE_LINK_TRAINING bit set in its DPCD, allowing the inactive GPU to skip the AUX handshake and set up the output with link parameters pre-calibrated by the active GPU.h](hWPre-retinas are able to switch the panel’s DDC pins separately. This is handled by a }(hjC.hhhNhNubj)}(h`TI SN74LV4066A`_h]hTI SN74LV4066A}(hjK.hhhNhNubah}(h]h ]h"]h$]h&]nameTI SN74LV4066Aj,1https://www.ti.com/lit/ds/symlink/sn74lv4066a.pdfuh1jhjC.j,KubhX which is controlled by gmux. The inactive GPU can thus probe the panel’s EDID without switching over the entire panel. Retinas lack this functionality as the chips used for eDP muxing are incapable of switching the AUX channel separately (see the linked data sheets, Pericom would be capable but this is unused). However the retina panel has the NO_AUX_HANDSHAKE_LINK_TRAINING bit set in its DPCD, allowing the inactive GPU to skip the AUX handshake and set up the output with link parameters pre-calibrated by the active GPU.}(hjC.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMthj-hhubh)}(hX$The external DP port is only fully switchable on the first two unibody MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an `NXP CBTL06141`_ which is controlled by gmux. It's the predecessor of the eDP mux on retinas, the difference being support for 2.7 versus 5.4 Gbit/s.h](hThe external DP port is only fully switchable on the first two unibody MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an }(hjg.hhhNhNubj)}(h`NXP CBTL06141`_h]h NXP CBTL06141}(hjo.hhhNhNubah}(h]h ]h"]h$]h&]name NXP CBTL06141j,6https://www.nxp.com/documents/data_sheet/CBTL06141.pdfuh1jhjg.j,Kubh which is controlled by gmux. It’s the predecessor of the eDP mux on retinas, the difference being support for 2.7 versus 5.4 Gbit/s.}(hjg.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chM~hj-hhubh)}(hXAThe following MacBook Pro generations replaced the external DP port with a combined DP/Thunderbolt port and lost the ability to switch it between GPUs, connecting it either to the discrete GPU or the Thunderbolt controller. Oddly enough, while the full port is no longer switchable, AUX and HPD are still switchable by way of an `NXP CBTL03062`_ (on pre-retinas MBP8 2011 and MBP9 2012) or two `TI TS3DS10224`_ (on pre-t2 retinas) under the control of gmux. Since the integrated GPU is missing the main link, external displays appear to it as phantoms which fail to link-train.h](hXIThe following MacBook Pro generations replaced the external DP port with a combined DP/Thunderbolt port and lost the ability to switch it between GPUs, connecting it either to the discrete GPU or the Thunderbolt controller. Oddly enough, while the full port is no longer switchable, AUX and HPD are still switchable by way of an }(hj.hhhNhNubj)}(h`NXP CBTL03062`_h]h NXP CBTL03062}(hj.hhhNhNubah}(h]h ]h"]h$]h&]name NXP CBTL03062j,Nhttp://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW16/DSASW00308511.pdfuh1jhj.j,Kubh1 (on pre-retinas MBP8 2011 and MBP9 2012) or two }(hj.hhhNhNubj)}(h`TI TS3DS10224`_h]h TI TS3DS10224}(hj.hhhNhNubah}(h]h ]h"]h$]h&]name TI TS3DS10224j,0https://www.ti.com/lit/ds/symlink/ts3ds10224.pdfuh1jhj.j,Kubh (on pre-t2 retinas) under the control of gmux. Since the integrated GPU is missing the main link, external displays appear to it as phantoms which fail to link-train.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhj-hhubh)}(hXgmux receives the HPD signal of all display connectors and sends an interrupt on hotplug. On generations which cannot switch external ports, the discrete GPU can then be woken to drive the newly connected display. The ability to switch AUX on these generations could be used to improve reliability of hotplug detection by having the integrated GPU poll the ports while the discrete GPU is asleep, but currently we do not make use of this feature.h]hXgmux receives the HPD signal of all display connectors and sends an interrupt on hotplug. On generations which cannot switch external ports, the discrete GPU can then be woken to drive the newly connected display. The ability to switch AUX on these generations could be used to improve reliability of hotplug detection by having the integrated GPU poll the ports while the discrete GPU is asleep, but currently we do not make use of this feature.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhj-hhubh)}(hXrOur switching policy for the external port is that on those generations which are able to switch it fully, the port is switched together with the panel when IGD / DIS commands are issued to vga_switcheroo. It is thus possible to drive e.g. a beamer on battery power with the integrated GPU. The user may manually switch to the discrete GPU if more performance is needed.h]hXrOur switching policy for the external port is that on those generations which are able to switch it fully, the port is switched together with the panel when IGD / DIS commands are issued to vga_switcheroo. It is thus possible to drive e.g. a beamer on battery power with the integrated GPU. The user may manually switch to the discrete GPU if more performance is needed.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhj-hhubh)}(hXMOn all newer generations, the external port can only be driven by the discrete GPU. If a display is plugged in while the panel is switched to the integrated GPU, *both* GPUs will be in use for maximum performance. To decrease power consumption, the user may manually switch to the discrete GPU, thereby suspending the integrated GPU.h](hOn all newer generations, the external port can only be driven by the discrete GPU. If a display is plugged in while the panel is switched to the integrated GPU, }(hj.hhhNhNubhemphasis)}(h*both*h]hboth}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj.ubh GPUs will be in use for maximum performance. To decrease power consumption, the user may manually switch to the discrete GPU, thereby suspending the integrated GPU.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhj-hhubh)}(hX<gmux' initial switch state on bootup is user configurable via the EFI variable ``gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9`` (5th byte, 1 = IGD, 0 = DIS). Based on this setting, the EFI firmware tells gmux to switch the panel and the external DP connector and allocates a framebuffer for the selected GPU.h](hQgmux’ initial switch state on bootup is user configurable via the EFI variable }(hj/hhhNhNubj)}(h8``gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9``h]h4gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh (5th byte, 1 = IGD, 0 = DIS). Based on this setting, the EFI firmware tells gmux to switch the panel and the external DP connector and allocates a framebuffer for the selected GPU.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.chMhj-hhubh)}(hE.. _US 8,687,007 B2: https://pimg-fpiw.uspto.gov/fdd/07/870/086/0.pdfh]h}(h]us-8-687-007-b2ah ]h"]us 8,687,007 b2ah$]h&]j,j-uh1hhK@hj-hhhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:79: ./drivers/platform/x86/apple-gmux.cjKubh)}(hK.. _NXP CBTL06141: https://www.nxp.com/documents/data_sheet/CBTL06141.pdfh]h}(h] nxp-cbtl06141ah ]h"] nxp cbtl06141ah$]h&]j,j.uh1hhKAhj-hhhj2/jKubh)}(hK.. _NXP CBTL06142: https://www.nxp.com/documents/data_sheet/CBTL06141.pdfh]h}(h] nxp-cbtl06142ah ]h"] nxp cbtl06142ah$]h&]j,j .uh1hhKBhj-hhhj2/jKubh)}(hC.. _TI HD3SS212: https://www.ti.com/lit/ds/symlink/hd3ss212.pdfh]h}(h] ti-hd3ss212ah ]h"] ti hd3ss212ah$]h&]j,j".uh1hhKChj-hhhj2/jKubh)}(hR.. _Pericom PI3VDP12412: https://www.pericom.com/assets/Datasheets/PI3VDP12412.pdfh]h}(h]pericom-pi3vdp12412ah ]h"]pericom pi3vdp12412ah$]h&]j,j7.uh1hhKDhj-hhhj2/jKubh)}(hF.. _TI SN74LV4066A: https://www.ti.com/lit/ds/symlink/sn74lv4066a.pdfh]h}(h]ti-sn74lv4066aah ]h"]ti sn74lv4066aah$]h&]j,j[.uh1hhKEhj-hhhj2/jKubh)}(hc.. _NXP CBTL03062: http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW16/DSASW00308511.pdfh]h}(h] nxp-cbtl03062ah ]h"] nxp cbtl03062ah$]h&]j,j.uh1hhKFhj-hhhj2/jKubh)}(hE.. _TI TS3DS10224: https://www.ti.com/lit/ds/symlink/ts3ds10224.pdfh]h}(h] ti-ts3ds10224ah ]h"] ti ts3ds10224ah$]h&]j,j.uh1hhKGhj-hhhj2/jKubeh}(h] graphics-muxah ]h"] graphics muxah$]h&]uh1hhj,hhhhhKMubh)}(hhh](h)}(h Power controlh]h Power control}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKSubh)}(hgmux is able to cut power to the discrete GPU. It automatically takes care of the correct sequence to tear down and bring up the power rails for core voltage, VRAM and PCIe.h]hgmux is able to cut power to the discrete GPU. It automatically takes care of the correct sequence to tear down and bring up the power rails for core voltage, VRAM and PCIe.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:85: ./drivers/platform/x86/apple-gmux.chMhj/hhubeh}(h] power-controlah ]h"] power controlah$]h&]uh1hhj,hhhhhKSubh)}(hhh](h)}(hBacklight controlh]hBacklight control}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKYubh)}(hXOn single GPU MacBooks, the PWM signal for the backlight is generated by the GPU. On dual GPU MacBook Pros by contrast, either GPU may be suspended to conserve energy. Hence the PWM signal needs to be generated by a separate backlight driver which is controlled by gmux. The earliest generation MBP5 2008/09 uses a `TI LP8543`_ backlight driver. Newer models use a `TI LP8545`_ or a TI LP8548.h](hX;On single GPU MacBooks, the PWM signal for the backlight is generated by the GPU. On dual GPU MacBook Pros by contrast, either GPU may be suspended to conserve energy. Hence the PWM signal needs to be generated by a separate backlight driver which is controlled by gmux. The earliest generation MBP5 2008/09 uses a }(hj/hhhNhNubj)}(h `TI LP8543`_h]h TI LP8543}(hj/hhhNhNubah}(h]h ]h"]h$]h&]name TI LP8543j,,https://www.ti.com/lit/ds/symlink/lp8543.pdfuh1jhj/j,Kubh& backlight driver. Newer models use a }(hj/hhhNhNubj)}(h `TI LP8545`_h]h TI LP8545}(hj/hhhNhNubah}(h]h ]h"]h$]h&]name TI LP8545j,,https://www.ti.com/lit/ds/symlink/lp8545.pdfuh1jhj/j,Kubh or a TI LP8548.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:91: ./drivers/platform/x86/apple-gmux.chMChj/hhubh)}(h;.. _TI LP8543: https://www.ti.com/lit/ds/symlink/lp8543.pdfh]h}(h] ti-lp8543ah ]h"] ti lp8543ah$]h&]j,j/uh1hhKhj/hhhd/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:91: ./drivers/platform/x86/apple-gmux.cjKubh)}(h;.. _TI LP8545: https://www.ti.com/lit/ds/symlink/lp8545.pdfh]h}(h] ti-lp8545ah ]h"] ti lp8545ah$]h&]j,j/uh1hhK hj/hhhj 0jKubeh}(h]backlight-controlah ]h"]backlight controlah$]h&]uh1hhj,hhhhhKYubh)}(hhh](h)}(hPublic functionsh]hPublic functions}(hj%0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"0hhhhhK_ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](japple_gmux_detect (C function)c.apple_gmux_detecthNtauh1jhj"0hhhNhNubj)}(hhh](j)}(hPbool apple_gmux_detect (struct pnp_dev *pnp_dev, enum apple_gmux_type *type_ret)h]j#)}(hObool apple_gmux_detect(struct pnp_dev *pnp_dev, enum apple_gmux_type *type_ret)h](j))}(hj h]hbool}(hjL0hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hjH0hhh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKbubj;)}(h h]h }(hjZ0hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hjH0hhhjY0hKbubjL)}(happle_gmux_detecth]jR)}(happle_gmux_detecth]happle_gmux_detect}(hjl0hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhjh0ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhjH0hhhjY0hKbubjm)}(h9(struct pnp_dev *pnp_dev, enum apple_gmux_type *type_ret)h](js)}(hstruct pnp_dev *pnp_devh](jy)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj0ubj;)}(h h]h }(hj0hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj0ubh)}(hhh]jR)}(hpnp_devh]hpnp_dev}(hj0hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0modnameN classnameNjj)}j]j)}jjn0sbc.apple_gmux_detectasbuh1hhj0ubj;)}(h h]h }(hj0hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj0ubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubjR)}(hpnp_devh]hpnp_dev}(hj0hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj0ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj0ubjs)}(henum apple_gmux_type *type_reth](jy)}(hjh]henum}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jxhj0ubj;)}(h h]h }(hj1hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj0ubh)}(hhh]jR)}(happle_gmux_typeh]happle_gmux_type}(hj1hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1modnameN classnameNjj)}j]j0c.apple_gmux_detectasbuh1hhj0ubj;)}(h h]h }(hj61hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj0ubj)}(hjh]h*}(hjD1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubjR)}(htype_reth]htype_ret}(hjQ1hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj0ubeh}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj0ubeh}(h]h ]h"]h$]h&]jjjkuh1jlhjH0hhhjY0hKbubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhjD0hhhjY0hKbubah}(h]j?0ah ](jjeh"]h$]h&]jj)jhuh1jhjY0hKbhjA0hhubj)}(hhh]h)}(h(detect if gmux is built into the machineh]h(detect if gmux is built into the machine}(hj{1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKVhjx1hhubah}(h]h ]h"]h$]h&]uh1jhjA0hhhjY0hKbubeh}(h]h ](jfunctioner4h"]h$]h&]jjjj1jj1jjjuh1jhhhj"0hNhNubj)}(hX**Parameters** ``struct pnp_dev *pnp_dev`` Device to probe or NULL to use the first matching device ``enum apple_gmux_type *type_ret`` Returns (by reference) the apple_gmux_type of the device **Description** Detect if a supported gmux device is present by actually probing it. This avoids the false positives returned on some models by apple_gmux_present(). **Return** ``true`` if a supported gmux ACPI device is detected and the kernel was configured with CONFIG_APPLE_GMUX, ``false`` otherwise.h](h)}(h**Parameters**h]j)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKZhj1ubj)}(hhh](j)}(hU``struct pnp_dev *pnp_dev`` Device to probe or NULL to use the first matching device h](j)}(h``struct pnp_dev *pnp_dev``h]j)}(hj1h]hstruct pnp_dev *pnp_dev}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKXhj1ubj)}(hhh]h)}(h8Device to probe or NULL to use the first matching deviceh]h8Device to probe or NULL to use the first matching device}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKXhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hKXhj1ubj)}(h\``enum apple_gmux_type *type_ret`` Returns (by reference) the apple_gmux_type of the device h](j)}(h"``enum apple_gmux_type *type_ret``h]j)}(hj1h]henum apple_gmux_type *type_ret}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKYhj1ubj)}(hhh]h)}(h8Returns (by reference) the apple_gmux_type of the deviceh]h8Returns (by reference) the apple_gmux_type of the device}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 2hKYhj 2ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj 2hKYhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1ubh)}(h**Description**h]j)}(hj02h]h Description}(hj22hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhK[hj1ubh)}(hDetect if a supported gmux device is present by actually probing it. This avoids the false positives returned on some models by apple_gmux_present().h]hDetect if a supported gmux device is present by actually probing it. This avoids the false positives returned on some models by apple_gmux_present().}(hjF2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhK[hj1ubh)}(h **Return**h]j)}(hjW2h]hReturn}(hjY2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhK_hj1ubh)}(h``true`` if a supported gmux ACPI device is detected and the kernel was configured with CONFIG_APPLE_GMUX, ``false`` otherwise.h](j)}(h``true``h]htrue}(hjq2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm2ubhc if a supported gmux ACPI device is detected and the kernel was configured with CONFIG_APPLE_GMUX, }(hjm2hhhNhNubj)}(h ``false``h]hfalse}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm2ubh otherwise.}(hjm2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhK_hj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"0hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](japple_gmux_present (C function)c.apple_gmux_presenthNtauh1jhj"0hhhNhNubj)}(hhh](j)}(hbool apple_gmux_present (void)h]j#)}(hbool apple_gmux_present(void)h](j))}(hj h]hbool}(hj2hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hj2hhh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKubj;)}(h h]h }(hj2hhhNhNubah}(h]h ]jGah"]h$]h&]uh1j:hj2hhhj2hKubjL)}(happle_gmux_presenth]jR)}(happle_gmux_presenth]happle_gmux_present}(hj2hhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jQhj2ubah}(h]h ](jejfeh"]h$]h&]jjjkuh1jKhj2hhhj2hKubjm)}(h(void)h]js)}(hvoidh]j))}(hvoidh]hvoid}(hj2hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j(hj2ubah}(h]h ]h"]h$]h&]noemphjjjkuh1jrhj2ubah}(h]h ]h"]h$]h&]jjjkuh1jlhj2hhhj2hKubeh}(h]h ]h"]h$]h&]jjjkjuh1j"jjhj2hhhj2hKubah}(h]j2ah ](jjeh"]h$]h&]jj)jhuh1jhj2hKhj2hhubj)}(hhh]h)}(h$check if gmux ACPI device is presenth]h$check if gmux ACPI device is present}(hj"3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj3hhubah}(h]h ]h"]h$]h&]uh1jhj2hhhj2hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj:3jj:3jjjuh1jhhhj"0hNhNubj)}(hXF**Parameters** ``void`` no arguments **Description** Drivers may use this to activate quirks specific to dual GPU MacBook Pros and Mac Pros, e.g. for deferred probing, runtime pm and backlight. **Return** ``true`` if gmux ACPI device is present and the kernel was configured with CONFIG_APPLE_GMUX, ``false`` otherwise.h](h)}(h**Parameters**h]j)}(hjD3h]h Parameters}(hjF3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj>3ubj)}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j)}(hjc3h]hvoid}(hje3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja3ubah}(h]h ]h"]h$]h&]uh1jh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj]3ubj)}(hhh]h)}(h no argumentsh]h no arguments}(hj|3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx3hKhjy3ubah}(h]h ]h"]h$]h&]uh1jhj]3ubeh}(h]h ]h"]h$]h&]uh1jhjx3hKhjZ3ubah}(h]h ]h"]h$]h&]uh1jhj>3ubh)}(h**Description**h]j)}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj>3ubh)}(hDrivers may use this to activate quirks specific to dual GPU MacBook Pros and Mac Pros, e.g. for deferred probing, runtime pm and backlight.h]hDrivers may use this to activate quirks specific to dual GPU MacBook Pros and Mac Pros, e.g. for deferred probing, runtime pm and backlight.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj>3ubh)}(h **Return**h]j)}(hj3h]hReturn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj>3ubh)}(hr``true`` if gmux ACPI device is present and the kernel was configured with CONFIG_APPLE_GMUX, ``false`` otherwise.h](j)}(h``true``h]htrue}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubhV if gmux ACPI device is present and the kernel was configured with CONFIG_APPLE_GMUX, }(hj3hhhNhNubj)}(h ``false``h]hfalse}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh otherwise.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/gpu/vga-switcheroo:97: ./include/linux/apple-gmux.hhKhj>3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj"0hhhNhNubeh}(h]id2ah ]h"]h$]jah&]uh1hhj,hhhhhK_jKubeh}(h]apple-gmux-handlerah ]h"]apple-gmux handlerah$]h&]uh1hhj,hhhhhKDubeh}(h]handlersah ]h"]handlersah$]h&]uh1hhhhhhhhKAubeh}(h](hid1eh ]h"](vga switcheroovga_switcherooeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}j.4hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjX4error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}( lattice xp2]j,arenesas r4f2113]j,aus 8,687,007 b2]j-a nxp cbtl06142]j-a ti hd3ss212]j.apericom pi3vdp12412]j'.ati sn74lv4066a]jK.a nxp cbtl06141]jo.a nxp cbtl03062]j.a ti ts3ds10224]j.a ti lp8543]j/a ti lp8545]j/aurefids}h]hasnameids}(j.4hj-4j*4jjjdjajjj,j,public functionsNj!j|!j%j%j,j|,j%4j"4j4j4jg-jd-jt-jq-j-j}-j/j/j//j,/j