summaryrefslogtreecommitdiff
path: root/vmwgfx_surface.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2015-04-23 00:34:10 -0700
committerThomas Hellstrom <thellstrom@vmware.com>2015-05-05 23:53:48 -0700
commitfeccdeb027e5dc9876654d2655b23d10276b74bc (patch)
treebfc20ee71ad21e6c193cfc21c2f43fb8c41cc69e /vmwgfx_surface.c
parentb95eaa9fca951072abf44004bc1f59aac41717e5 (diff)
vmwgfx: Rework device initialization
This commit reworks device initialization so that we always enable the FIFO at driver load, deferring SVGA enable until either first modeset or fbdev enable. This should always leave the fifo properly enabled for render- and control nodes. In addition, *) We disable the use of VRAM when SVGA is not enabled. *) We simplify PM support so that we only throw out resources on hibernate, not on suspend, since the device keeps its state on suspend. *) We remove PM support for kernel versions < 2.6.29 since we only support kernel versions > 2.6.35 anyway. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'vmwgfx_surface.c')
-rw-r--r--vmwgfx_surface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vmwgfx_surface.c b/vmwgfx_surface.c
index fea73cc..da2c45f 100644
--- a/vmwgfx_surface.c
+++ b/vmwgfx_surface.c
@@ -340,7 +340,7 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
dev_priv->used_memory_size -= res->backup_size;
mutex_unlock(&dev_priv->cmdbuf_mutex);
}
- vmw_3d_resource_dec(dev_priv, false);
+ vmw_fifo_resource_dec(dev_priv);
}
/**
@@ -583,14 +583,14 @@ static int vmw_surface_init(struct vmw_private *dev_priv,
BUG_ON(res_free == NULL);
if (!dev_priv->has_mob)
- (void) vmw_3d_resource_inc(dev_priv, false);
+ vmw_fifo_resource_inc(dev_priv);
ret = vmw_resource_init(dev_priv, res, true, res_free,
(dev_priv->has_mob) ? &vmw_gb_surface_func :
&vmw_legacy_surface_func);
if (unlikely(ret != 0)) {
if (!dev_priv->has_mob)
- vmw_3d_resource_dec(dev_priv, false);
+ vmw_fifo_resource_dec(dev_priv);
res_free(res);
return ret;
}
@@ -1035,7 +1035,7 @@ static int vmw_gb_surface_create(struct vmw_resource *res)
if (likely(res->id != -1))
return 0;
- (void) vmw_3d_resource_inc(dev_priv, false);
+ vmw_fifo_resource_inc(dev_priv);
ret = vmw_resource_alloc_id(res);
if (unlikely(ret != 0)) {
DRM_ERROR("Failed to allocate a surface id.\n");
@@ -1075,7 +1075,7 @@ static int vmw_gb_surface_create(struct vmw_resource *res)
out_no_fifo:
vmw_resource_release_id(res);
out_no_id:
- vmw_3d_resource_dec(dev_priv, false);
+ vmw_fifo_resource_dec(dev_priv);
return ret;
}
@@ -1220,7 +1220,7 @@ static int vmw_gb_surface_destroy(struct vmw_resource *res)
vmw_fifo_commit(dev_priv, sizeof(*cmd));
mutex_unlock(&dev_priv->binding_mutex);
vmw_resource_release_id(res);
- vmw_3d_resource_dec(dev_priv, false);
+ vmw_fifo_resource_dec(dev_priv);
return 0;
}