diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-07-09 11:16:03 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2026-09-11 16:52:43 +0200 |
| commit | 2350f42c2f46b60bec79f2249f8bc5f3ff2807d4 (patch) | |
| tree | d3a5bffc0dbc125e50d936409ae9eb021dcdee16 /drivers/gpu | |
| parent | c9f2c30565da1bdb58064684d461b432e4384777 (diff) | |
vga-switcheroo: Remove unused interfaces
Remove all unused interfaces that used to implement the functionality
of pre_switch and post_switch.
For pre_switch, remove vga_switcheroo_client_fb_set(). This further
allows for removing all symbols and data structures that refer to
fbdev; such as fb_info and fb_switch_outputs().
For post_switch, remove the reprobe callback from the client ops.
v2:
- move changes to fbcon and drivers into other patches
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-8-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 7b0af4a8aa7d..9431d83b38a9 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -32,9 +32,9 @@ #include <linux/apple-gmux.h> #include <linux/debugfs.h> -#include <linux/fb.h> +#include <linux/export.h> #include <linux/fs.h> -#include <linux/module.h> +#include <linux/mutex.h> #include <linux/pci.h> #include <linux/pm_domain.h> #include <linux/pm_runtime.h> @@ -90,7 +90,6 @@ /** * struct vga_switcheroo_client - registered client * @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 @@ -105,12 +104,11 @@ * @vga_dev: pci device, indicate which GPU is bound to current audio client * * Registered 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. + * For audio clients, the @active member is bogus. For GPU clients, the @vga_dev + * is bogus. */ 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; @@ -515,27 +513,6 @@ void vga_switcheroo_unregister_client(struct pci_dev *pdev) EXPORT_SYMBOL(vga_switcheroo_unregister_client); /** - * vga_switcheroo_client_fb_set() - set framebuffer of a given client - * @pdev: client pci device - * @info: framebuffer - * - * Set framebuffer of a given client. The console will be remapped to this - * on switching. - */ -void vga_switcheroo_client_fb_set(struct pci_dev *pdev, - struct fb_info *info) -{ - struct vga_switcheroo_client *client; - - mutex_lock(&vgasr_mutex); - client = find_client_from_pci(&vgasr_priv.clients, pdev); - if (client) - client->fb_info = info; - mutex_unlock(&vgasr_mutex); -} -EXPORT_SYMBOL(vga_switcheroo_client_fb_set); - -/** * vga_switcheroo_lock_ddc() - temporarily switch DDC lines to a given client * @pdev: client pci device * @@ -735,10 +712,6 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) if (new_client->ops->pre_switch) new_client->ops->pre_switch(new_client->pdev); -#if defined(CONFIG_FB) - else if (new_client->fb_info) - fb_switch_outputs(new_client->fb_info); -#endif mutex_lock(&vgasr_priv.mux_hw_lock); ret = vgasr_priv.handler->switchto(new_client->id); @@ -748,8 +721,6 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) if (new_client->ops->post_switch) new_client->ops->post_switch(new_client->pdev); - else if (new_client->ops->reprobe) - new_client->ops->reprobe(new_client->pdev); if (vga_switcheroo_pwr_state(active) == VGA_SWITCHEROO_ON) vga_switchoff(active); |
