diff options
author | Dave Airlie <airlied@redhat.com> | 2018-03-28 14:30:41 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-03-28 14:30:41 +1000 |
commit | 2b4f44eec2be2688511c2b617d0e1b4f94c45ba4 (patch) | |
tree | 533c03602f4ae6d6404db6fa56c88e6f83e1bebe /drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |
parent | 33d009cd889490838c5db9b9339856c9e3d3facc (diff) | |
parent | 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff) | |
download | linux-2b4f44eec2be2688511c2b617d0e1b4f94c45ba4.tar.gz linux-2b4f44eec2be2688511c2b617d0e1b4f94c45ba4.tar.xz |
Backmerge tag 'v4.16-rc7' into drm-next
Linux 4.16-rc7
This was requested by Daniel, and things were getting
a bit hard to reconcile, most of the conflicts were
trivial though.
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 61a03ac90f8c..70e1a8820a7c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -1338,6 +1338,19 @@ static void __vmw_svga_disable(struct vmw_private *dev_priv) */ void vmw_svga_disable(struct vmw_private *dev_priv) { + /* + * Disabling SVGA will turn off device modesetting capabilities, so + * notify KMS about that so that it doesn't cache atomic state that + * isn't valid anymore, for example crtcs turned on. + * Strictly we'd want to do this under the SVGA lock (or an SVGA mutex), + * but vmw_kms_lost_device() takes the reservation sem and thus we'll + * end up with lock order reversal. Thus, a master may actually perform + * a new modeset just after we call vmw_kms_lost_device() and race with + * vmw_svga_disable(), but that should at worst cause atomic KMS state + * to be inconsistent with the device, causing modesetting problems. + * + */ + vmw_kms_lost_device(dev_priv->dev); ttm_write_lock(&dev_priv->reservation_sem, false); spin_lock(&dev_priv->svga_lock); if (dev_priv->bdev.man[TTM_PL_VRAM].use_type) { |