diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 1a90f0a2f7e5..0508f93b9795 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
@@ -740,9 +740,17 @@ static void vmw_postclose(struct drm_device *dev, | |||
740 | struct vmw_fpriv *vmw_fp; | 740 | struct vmw_fpriv *vmw_fp; |
741 | 741 | ||
742 | vmw_fp = vmw_fpriv(file_priv); | 742 | vmw_fp = vmw_fpriv(file_priv); |
743 | ttm_object_file_release(&vmw_fp->tfile); | 743 | |
744 | if (vmw_fp->locked_master) | 744 | if (vmw_fp->locked_master) { |
745 | struct vmw_master *vmaster = | ||
746 | vmw_master(vmw_fp->locked_master); | ||
747 | |||
748 | ttm_lock_set_kill(&vmaster->lock, true, SIGTERM); | ||
749 | ttm_vt_unlock(&vmaster->lock); | ||
745 | drm_master_put(&vmw_fp->locked_master); | 750 | drm_master_put(&vmw_fp->locked_master); |
751 | } | ||
752 | |||
753 | ttm_object_file_release(&vmw_fp->tfile); | ||
746 | kfree(vmw_fp); | 754 | kfree(vmw_fp); |
747 | } | 755 | } |
748 | 756 | ||
@@ -925,14 +933,13 @@ static void vmw_master_drop(struct drm_device *dev, | |||
925 | 933 | ||
926 | vmw_fp->locked_master = drm_master_get(file_priv->master); | 934 | vmw_fp->locked_master = drm_master_get(file_priv->master); |
927 | ret = ttm_vt_lock(&vmaster->lock, false, vmw_fp->tfile); | 935 | ret = ttm_vt_lock(&vmaster->lock, false, vmw_fp->tfile); |
928 | vmw_execbuf_release_pinned_bo(dev_priv); | ||
929 | |||
930 | if (unlikely((ret != 0))) { | 936 | if (unlikely((ret != 0))) { |
931 | DRM_ERROR("Unable to lock TTM at VT switch.\n"); | 937 | DRM_ERROR("Unable to lock TTM at VT switch.\n"); |
932 | drm_master_put(&vmw_fp->locked_master); | 938 | drm_master_put(&vmw_fp->locked_master); |
933 | } | 939 | } |
934 | 940 | ||
935 | ttm_lock_set_kill(&vmaster->lock, true, SIGTERM); | 941 | ttm_lock_set_kill(&vmaster->lock, false, SIGTERM); |
942 | vmw_execbuf_release_pinned_bo(dev_priv); | ||
936 | 943 | ||
937 | if (!dev_priv->enable_fb) { | 944 | if (!dev_priv->enable_fb) { |
938 | ret = ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_VRAM); | 945 | ret = ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_VRAM); |