Lines Matching defs: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;
181 /* we're ready if we get two clients + handler */
183 vgasr_priv.registered_clients == 2 && vgasr_priv.handler;
191 /* call the handler to init */
192 if (vgasr_priv.handler->init)
193 vgasr_priv.handler->init();
200 ret = vgasr_priv.handler->get_client_id(client->pdev);
212 ret = vgasr_priv.handler->get_client_id(client->vga_dev);
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,
240 if (vgasr_priv.handler) {
245 vgasr_priv.handler = handler;
257 * vga_switcheroo_unregister_handler() - unregister handler
259 * Unregister handler. Disable vga_switcheroo.
266 vgasr_priv.handler = NULL;
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
377 id = vgasr_priv.handler->get_client_id(vga_dev);
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) {
569 id = vgasr_priv.handler->get_client_id(pdev);
570 vgasr_priv.old_ddc_owner = vgasr_priv.handler->switch_ddc(id);
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);
602 ret = vgasr_priv.handler->switch_ddc(
616 * two GPU drivers and one handler have registered with vga_switcheroo.
676 if (vgasr_priv.handler->power_state)
677 vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON);
690 if (vgasr_priv.handler->power_state)
691 vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF);
742 ret = vgasr_priv.handler->switchto(new_client->id);
861 ret = vgasr_priv.handler->switchto(client_id);
978 * After the GPU has been suspended, the handler needs to be called to cut
982 * calls to the handler.
1000 if (!vgasr_priv.handler->power_state)
1010 vgasr_priv.handler->power_state(client->id, state);
1023 if (vgasr_priv.handler->switchto) {
1025 vgasr_priv.handler->switchto(VGA_SWITCHEROO_IGD);
1051 * After the GPU has been suspended, the handler needs to be called to cut
1054 * by the requisite calls to the handler. It needs only be called on platforms