summaryrefslogtreecommitdiff
path: root/vmwgfx_kms.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2018-02-28 15:41:55 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2018-03-06 07:44:18 +0100
commit4ba75de5701fc3ac0f564256cc2c42c8a98b08f8 (patch)
treeb3696c0c887d0aae9eca8a8d483c191c0099eeb7 /vmwgfx_kms.c
parent3fdd95b2ce264a604e7ad4b3e911304a88026215 (diff)
vmwgfx: Fix black screen and device errors when running without fbdev
When we are running without fbdev, transitioning from the login screen to X or gnome-shell/wayland will cause a vt switch and the driver will disable svga mode, losing all modesetting resources. However, the kms atomic state does not reflect that and may think that a crtc is still turned on, which will cause device errors when we try to bind an fb to the crtc, and the screen will remain black. Fix this by turning off all kms resources before disabling svga mode. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'vmwgfx_kms.c')
-rw-r--r--vmwgfx_kms.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vmwgfx_kms.c b/vmwgfx_kms.c
index a33b056..1ae22ca 100644
--- a/vmwgfx_kms.c
+++ b/vmwgfx_kms.c
@@ -2903,3 +2903,14 @@ int vmw_kms_set_config(struct drm_mode_set *set,
return drm_atomic_helper_set_config(set, ctx);
}
+
+
+/**
+ * vmw_kms_lost_device - Notify kms that modesetting capabilities will be lost
+ *
+ * @dev: Pointer to the drm device
+ */
+void vmw_kms_lost_device(struct drm_device *dev)
+{
+ drm_atomic_helper_shutdown(dev);
+}