aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-08-31 03:42:52 -0400
committerDave Airlie <airlied@redhat.com>2011-09-01 04:38:00 -0400
commit05730b32a78dab4bed8fb7ccc64c53d9fcf31e9d (patch)
tree0c01aee6881e52d22c727284e18e2efd3dd31592 /drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
parentbe38ab6ea7b0de0542a0ff78690d63bb22f66a4d (diff)
vmwgfx: Switch to VGA when we drop master and vmwgfx fbdev is not active
Previously this was not done when any 3D resource was active, since that meant disabling the fifo with all 3D state lost. Now, if there are still 3D resources active, we use the svga hide feature. This fixes X server VT switching with 3D enabled. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_resource.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index dc8904a1c1e1..4b53803d0fa9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -211,7 +211,7 @@ static void vmw_hw_context_destroy(struct vmw_resource *res)
211 cmd->body.cid = cpu_to_le32(res->id); 211 cmd->body.cid = cpu_to_le32(res->id);
212 212
213 vmw_fifo_commit(dev_priv, sizeof(*cmd)); 213 vmw_fifo_commit(dev_priv, sizeof(*cmd));
214 vmw_3d_resource_dec(dev_priv); 214 vmw_3d_resource_dec(dev_priv, false);
215} 215}
216 216
217static int vmw_context_init(struct vmw_private *dev_priv, 217static int vmw_context_init(struct vmw_private *dev_priv,
@@ -248,7 +248,7 @@ static int vmw_context_init(struct vmw_private *dev_priv,
248 cmd->body.cid = cpu_to_le32(res->id); 248 cmd->body.cid = cpu_to_le32(res->id);
249 249
250 vmw_fifo_commit(dev_priv, sizeof(*cmd)); 250 vmw_fifo_commit(dev_priv, sizeof(*cmd));
251 (void) vmw_3d_resource_inc(dev_priv); 251 (void) vmw_3d_resource_inc(dev_priv, false);
252 vmw_resource_activate(res, vmw_hw_context_destroy); 252 vmw_resource_activate(res, vmw_hw_context_destroy);
253 return 0; 253 return 0;
254} 254}
@@ -411,7 +411,7 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
411 cmd->body.sid = cpu_to_le32(res->id); 411 cmd->body.sid = cpu_to_le32(res->id);
412 412
413 vmw_fifo_commit(dev_priv, sizeof(*cmd)); 413 vmw_fifo_commit(dev_priv, sizeof(*cmd));
414 vmw_3d_resource_dec(dev_priv); 414 vmw_3d_resource_dec(dev_priv, false);
415} 415}
416 416
417void vmw_surface_res_free(struct vmw_resource *res) 417void vmw_surface_res_free(struct vmw_resource *res)
@@ -479,7 +479,7 @@ int vmw_surface_init(struct vmw_private *dev_priv,
479 } 479 }
480 480
481 vmw_fifo_commit(dev_priv, submit_size); 481 vmw_fifo_commit(dev_priv, submit_size);
482 (void) vmw_3d_resource_inc(dev_priv); 482 (void) vmw_3d_resource_inc(dev_priv, false);
483 vmw_resource_activate(res, vmw_hw_surface_destroy); 483 vmw_resource_activate(res, vmw_hw_surface_destroy);
484 return 0; 484 return 0;
485} 485}