[PATCH 1/8] drm/fbdev-helper: Do delayed switcheroo in lastclose helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Amdgpu and nouveau call vga_switcheroo_process_delayed_switch() from
their lastclose callbacks. Call it from the fbdev lastclose helper,
so that the driver functions can finally be removed.

The fbdev call is part of all lastclose handling that restores the
DRM fbcon terminal. Only PCI devices with enabled switcheroo do the
delayed switching. The call has no effect on other drivers.

Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
 drivers/gpu/drm/drm_fb_helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 3f7da78849e4..f6667dfba8a2 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2009,6 +2009,10 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
 void drm_fb_helper_lastclose(struct drm_device *dev)
 {
 	drm_fb_helper_restore_fbdev_mode_unlocked(dev->fb_helper);
+
+	if (dev_is_pci(dev->dev))
+		vga_switcheroo_process_delayed_switch();
+
 }
 EXPORT_SYMBOL(drm_fb_helper_lastclose);
 
-- 
2.46.0




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux