diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-01-13 16:28:38 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-13 21:18:02 -0500 |
commit | 7704befbd599e9c9524f640e14658ca8ed9d8717 (patch) | |
tree | 9ee43b851160e50234d8bd67967e7eb07104d8b9 /drivers/gpu/drm/vmwgfx | |
parent | 50ec3b7c35fda131e92abc6f9d93a230b7e009eb (diff) |
drm/vmwgfx: Make fence sequences continous across a VT switch.
A vt switch in stealth mode would take down the FIFO, and re-
initialize fence sequence numbers. This patch
saves the current state of the fence sequence when the FIFO is
disabled.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 1db1ef30be2b..70e4f5f0c122 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
@@ -217,6 +217,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) | |||
217 | 217 | ||
218 | dev_priv->dev = dev; | 218 | dev_priv->dev = dev; |
219 | dev_priv->vmw_chipset = chipset; | 219 | dev_priv->vmw_chipset = chipset; |
220 | dev_priv->last_read_sequence = (uint32_t) -100; | ||
220 | mutex_init(&dev_priv->hw_mutex); | 221 | mutex_init(&dev_priv->hw_mutex); |
221 | mutex_init(&dev_priv->cmdbuf_mutex); | 222 | mutex_init(&dev_priv->cmdbuf_mutex); |
222 | rwlock_init(&dev_priv->resource_lock); | 223 | rwlock_init(&dev_priv->resource_lock); |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c index 01feb48af333..f7d5f70b52dd 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | |||
@@ -98,8 +98,7 @@ int vmw_fifo_init(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo) | |||
98 | (unsigned int) min, | 98 | (unsigned int) min, |
99 | (unsigned int) fifo->capabilities); | 99 | (unsigned int) fifo->capabilities); |
100 | 100 | ||
101 | dev_priv->fence_seq = (uint32_t) -100; | 101 | dev_priv->fence_seq = dev_priv->last_read_sequence; |
102 | dev_priv->last_read_sequence = (uint32_t) -100; | ||
103 | iowrite32(dev_priv->last_read_sequence, fifo_mem + SVGA_FIFO_FENCE); | 102 | iowrite32(dev_priv->last_read_sequence, fifo_mem + SVGA_FIFO_FENCE); |
104 | 103 | ||
105 | return vmw_fifo_send_fence(dev_priv, &dummy); | 104 | return vmw_fifo_send_fence(dev_priv, &dummy); |