summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2020-01-15 21:48:19 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2020-03-12 12:00:07 +0100
commit81a00960d3fa83bbff9939ff52e89f0b74801937 (patch)
tree5351b4a0fabb6b93fca9d839b206c43254419efa /drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
parentd3bd37f587b4438d47751d0f1d5aaae3d39bd416 (diff)
drm/vmwgfx: Fix the refuse_dma mode when using guest-backed objects
When we refuse DMA from system pages for whatever reason, we don't handle that correctly when guest-backed objects was enabled. Since guest-backed objects by definition require DMA to and from system pages, disable all functionality that relies on them. That basically amounts to 3D acceleration and screen targets. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index 065015d2a8f6..3b41cf63110a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -1241,7 +1241,8 @@ int vmw_cmdbuf_set_pool_size(struct vmw_cmdbuf_man *man,
* actually call into the already enabled manager, when
* binding the MOB.
*/
- if (!(dev_priv->capabilities & SVGA_CAP_DX))
+ if (!(dev_priv->capabilities & SVGA_CAP_DX) ||
+ !dev_priv->has_mob)
return -ENOMEM;
ret = ttm_bo_create(&dev_priv->bdev, size, ttm_bo_type_device,