Commit c188660f authored by Peter Hanzel's avatar Peter Hanzel Committed by Dave Airlie
Browse files

drm/vmwgfx: Request SVGA version 2 and bail if not found

This fixes the driver not loading on older versions of VMware.
Signed-off-by: default avatarPeter Hanzel <>
Signed-off-by: default avatarJakob Bornecrantz <>
Signed-off-by: default avatarDave Airlie <>
parent 8e19a951
......@@ -209,6 +209,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
struct vmw_private *dev_priv;
int ret;
uint32_t svga_id;
dev_priv = kzalloc(sizeof(*dev_priv), GFP_KERNEL);
if (unlikely(dev_priv == NULL)) {
......@@ -239,6 +240,16 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
dev_priv->mmio_start = pci_resource_start(dev->pdev, 2);
vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2);
svga_id = vmw_read(dev_priv, SVGA_REG_ID);
if (svga_id != SVGA_ID_2) {
ret = -ENOSYS;
DRM_ERROR("Unsuported SVGA ID 0x%x\n", svga_id);
goto out_err0;
dev_priv->capabilities = vmw_read(dev_priv, SVGA_REG_CAPABILITIES);
if (dev_priv->capabilities & SVGA_CAP_GMR) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment