diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-08-12 11:28:22 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2024-08-13 17:21:07 +0300 |
commit | c3c5b79b6ed1d7ae7356b51f7c17bd88197bf405 (patch) | |
tree | b8a3931e9d2b95c6aa7a8bec2443222029cfba5b /drivers/gpu/vga | |
parent | 844efaef48e846b5310b0e7af5e7578762eb7e8d (diff) | |
download | linux-c3c5b79b6ed1d7ae7356b51f7c17bd88197bf405.tar.xz |
drm: Do delayed switcheroo in drm_lastclose()
Amdgpu and nouveau call vga_switcheroo_process_delayed_switch() from
their lastclose callbacks. Call it from drm_lastclose(), so that the
driver functions can finally be removed. Only PCI devices with enabled
switcheroo do the delayed switching. The call has no effect on other
hardware.
v2:
- move change to drm_lastclose() (Sima)
- update docs for vga_switcheroo_process_delayed_switch()
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812083000.337744-2-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/vga')
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 365e6ddbe90f..18f2c92beff8 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -926,8 +926,7 @@ static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv) /** * vga_switcheroo_process_delayed_switch() - helper for delayed switching * - * Process a delayed switch if one is pending. DRM drivers should call this - * from their ->lastclose callback. + * 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 |