diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-08 10:07:37 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-21 10:51:23 +0100 |
commit | 140bcaa23a1c37b694910424075a15e009120dbe (patch) | |
tree | 4df6cabd10a3cd261eb52065ba7d13ced24b1c75 /drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |
parent | 93dfdf9fde9f20f1c46738bf184adeebc7d7d66e (diff) | |
download | lwn-140bcaa23a1c37b694910424075a15e009120dbe.tar.gz lwn-140bcaa23a1c37b694910424075a15e009120dbe.zip |
drm/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.
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index ead61015cd79..b3d62aa01a9b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -2851,3 +2851,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); +} |