Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180128
b: refs/heads/master
c: c188660
h: refs/heads/master
v: v3
  • Loading branch information
Peter Hanzel authored and Dave Airlie committed Feb 1, 2010
1 parent 8ca0a74 commit d3babf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e19a951774a16cf2626292ae06fd2b62630e67e
refs/heads/master: c188660f6dbb0df9febe1b841a16c66c28353c15
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);

mutex_lock(&dev_priv->hw_mutex);

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);
mutex_unlock(&dev_priv->hw_mutex);
goto out_err0;
}

dev_priv->capabilities = vmw_read(dev_priv, SVGA_REG_CAPABILITIES);

if (dev_priv->capabilities & SVGA_CAP_GMR) {
Expand Down

0 comments on commit d3babf9

Please sign in to comment.