summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2026-07-09 11:16:00 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2026-09-11 16:52:43 +0200
commit649e96efe2caadb438c980459011a7f77e4d4959 (patch)
tree2ca61c2498485878381e2f52428e8ee310d7c602 /include/linux
parentbd33ce60cf1c5d3c055a00b92e8141a22f5ec2d7 (diff)
downloadlinux-next-649e96efe2caadb438c980459011a7f77e4d4959.tar.gz
linux-next-649e96efe2caadb438c980459011a7f77e4d4959.zip
vga_switcheroo: Add post_switch callback to client ops
Add post_switch to struct vga_switcheroo_client_ops to inform the switcheroo client about a completed switch of the output. This callback is intended to replace the reprobe client op. It is a rename of reprobe for consistency with pre_switch. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by: Helge Deller <deller@gmx.de> Link: https://patch.msgid.link/20260709092215.168172-5-tzimmermann@suse.de
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/vga_switcheroo.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h
index 4422daca9ceb..51851831d4c1 100644
--- a/include/linux/vga_switcheroo.h
+++ b/include/linux/vga_switcheroo.h
@@ -127,21 +127,22 @@ struct vga_switcheroo_handler {
* @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
+ * @reprobe: deprecated
* @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
* @pre_switch: prepare switch
* Optional. This gets called before switching the outputs to the
* GPU. Allows drivers to prepare for the switch.
+ * @post_switch: completes switch
+ * Optional. This gets called after waking the GPU and switching
+ * the outputs to it. Allows drivers to poll the switched outputs.
* @gpu_bound: notify the client id to audio client when the GPU is bound.
*
* 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, @pre_switch and
- * @reprobe may be set to NULL. For audio clients, the @pre_switch and
- * @reprobe members are bogus. OTOH, @gpu_bound is only for audio clients,
+ * @post_switch may be set to NULL. For audio clients, the @pre_switch and
+ * @post_switch members are bogus. OTOH, @gpu_bound is only for audio clients,
* and not used for GPU clients.
*/
struct vga_switcheroo_client_ops {
@@ -149,6 +150,7 @@ struct vga_switcheroo_client_ops {
void (*reprobe)(struct pci_dev *dev);
bool (*can_switch)(struct pci_dev *dev);
void (*pre_switch)(struct pci_dev *dev);
+ void (*post_switch)(struct pci_dev *dev);
void (*gpu_bound)(struct pci_dev *dev, enum vga_switcheroo_client_id);
};