Skip to content

Commit ef7c7b7

Browse files
deepak-rawatRoland Scheidegger
authored andcommitted
drm/vmwgfx: Also check for SVGA_CAP_DX before reading DX context support
Virtual device consider SVGA_CAP_DX and SVGA3D_DEVCAP_DXCONTEXT independent of each other. Some of the commands in cmd_buf depends on SVGA_CAP_DX, so better to check for that as well. Signed-off-by: Deepak Rawat <[email protected]> Reviewed-by: Thomas Hellström (VMware) <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Roland Scheidegger <[email protected]>
1 parent cb7adfd commit ef7c7b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
883883
}
884884
}
885885

886-
if (dev_priv->has_mob) {
886+
if (dev_priv->has_mob && (dev_priv->capabilities & SVGA_CAP_DX)) {
887887
spin_lock(&dev_priv->cap_lock);
888888
vmw_write(dev_priv, SVGA_REG_DEV_CAP, SVGA3D_DEVCAP_DXCONTEXT);
889889
dev_priv->has_dx = !!vmw_read(dev_priv, SVGA_REG_DEV_CAP);

0 commit comments

Comments
 (0)