Lines Matching full:handler

70  * clients. The mux is called the handler. Muxless machines also register a
71 * handler to control the power state of the discrete GPU, its ->switchto
87 * switched to it, provided that the handler supports this. Switching
99 * @id: client identifier. Determining the id requires the handler,
133 * Prerequisite is the registration of two GPUs and a handler
140 * @handler: registered handler
141 * @handler_flags: flags of registered handler
159 const struct vga_switcheroo_handler *handler; member
181 /* we're ready if we get two clients + handler */ in vga_switcheroo_ready()
183 vgasr_priv.registered_clients == 2 && vgasr_priv.handler; in vga_switcheroo_ready()
191 /* call the handler to init */ in vga_switcheroo_enable()
192 if (vgasr_priv.handler->init) in vga_switcheroo_enable()
193 vgasr_priv.handler->init(); in vga_switcheroo_enable()
200 ret = vgasr_priv.handler->get_client_id(client->pdev); in vga_switcheroo_enable()
212 ret = vgasr_priv.handler->get_client_id(client->vga_dev); in vga_switcheroo_enable()
226 * vga_switcheroo_register_handler() - register handler
227 * @handler: handler callbacks
228 * @handler_flags: handler flags
230 * Register handler. Enable vga_switcheroo if two vga clients have already
233 * Return: 0 on success, -EINVAL if a handler was already registered.
236 const struct vga_switcheroo_handler *handler, in vga_switcheroo_register_handler() argument
240 if (vgasr_priv.handler) { in vga_switcheroo_register_handler()
245 vgasr_priv.handler = handler; in vga_switcheroo_register_handler()
257 * vga_switcheroo_unregister_handler() - unregister handler
259 * Unregister handler. Disable vga_switcheroo.
266 vgasr_priv.handler = NULL; in vga_switcheroo_unregister_handler()
278 * vga_switcheroo_handler_flags() - obtain handler flags
280 * Helper for clients to obtain the handler flags bitmask.
282 * Return: Handler flags. A value of 0 means that no handler is registered
283 * or that the handler has no special capabilities.
333 * handler have already registered. The power state of the client is assumed
370 * handler are registered. Get audio client id from bound GPU client in vga_switcheroo_register_audio_client()
377 id = vgasr_priv.handler->get_client_id(vga_dev); in vga_switcheroo_register_audio_client()
551 * Specifically, %-ENODEV if no handler has registered or if the handler
553 * returned by the handler is propagated back to the caller.
564 if (!vgasr_priv.handler || !vgasr_priv.handler->switch_ddc) { in vga_switcheroo_lock_ddc()
569 id = vgasr_priv.handler->get_client_id(pdev); in vga_switcheroo_lock_ddc()
570 vgasr_priv.old_ddc_owner = vgasr_priv.handler->switch_ddc(id); in vga_switcheroo_lock_ddc()
585 * Specifically, %-ENODEV if no handler has registered or if the handler
587 * returned by the handler is propagated back to the caller.
600 id = vgasr_priv.handler->get_client_id(pdev); in vga_switcheroo_unlock_ddc()
602 ret = vgasr_priv.handler->switch_ddc( in vga_switcheroo_unlock_ddc()
616 * two GPU drivers and one handler have registered with vga_switcheroo.
676 if (vgasr_priv.handler->power_state) in vga_switchon()
677 vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON); in vga_switchon()
690 if (vgasr_priv.handler->power_state) in vga_switchoff()
691 vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF); in vga_switchoff()
742 ret = vgasr_priv.handler->switchto(new_client->id); in vga_switchto_stage2()
861 ret = vgasr_priv.handler->switchto(client_id); in vga_switcheroo_debugfs_write()
977 * After the GPU has been suspended, the handler needs to be called to cut
981 * calls to the handler.
999 if (!vgasr_priv.handler->power_state) in vga_switcheroo_power_switch()
1009 vgasr_priv.handler->power_state(client->id, state); in vga_switcheroo_power_switch()
1022 if (vgasr_priv.handler->switchto) { in vga_switcheroo_runtime_suspend()
1024 vgasr_priv.handler->switchto(VGA_SWITCHEROO_IGD); in vga_switcheroo_runtime_suspend()
1050 * After the GPU has been suspended, the handler needs to be called to cut
1053 * by the requisite calls to the handler. It needs only be called on platforms