aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-05-28 05:21:57 -0400
committerDave Airlie <airlied@redhat.com>2010-05-31 19:37:15 -0400
commit1925d4565888eb313cc923372da6a08bbfb3a859 (patch)
treeef8dbcc9ba34a0b1075433147808cc56067d17c5 /drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
parent04e9e94dba3e564ce810cedab88e957dfd681b4a (diff)
drm/vmwgfx: Add kernel throttling support. Bump minor.
The throttle_us member in the execbuf argument is now honored. If the member is 0, no waiting for lag will occur, which guarantees backwards compatibility with well-behaved clients. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index 39d43a01d846..a8e5445f94ec 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -120,7 +120,7 @@ int vmw_fifo_init(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
120 120
121 atomic_set(&dev_priv->fence_seq, dev_priv->last_read_sequence); 121 atomic_set(&dev_priv->fence_seq, dev_priv->last_read_sequence);
122 iowrite32(dev_priv->last_read_sequence, fifo_mem + SVGA_FIFO_FENCE); 122 iowrite32(dev_priv->last_read_sequence, fifo_mem + SVGA_FIFO_FENCE);
123 123 vmw_fence_queue_init(&fifo->fence_queue);
124 return vmw_fifo_send_fence(dev_priv, &dummy); 124 return vmw_fifo_send_fence(dev_priv, &dummy);
125out_err: 125out_err:
126 vfree(fifo->static_buffer); 126 vfree(fifo->static_buffer);
@@ -159,6 +159,7 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
159 dev_priv->enable_state); 159 dev_priv->enable_state);
160 160
161 mutex_unlock(&dev_priv->hw_mutex); 161 mutex_unlock(&dev_priv->hw_mutex);
162 vmw_fence_queue_takedown(&fifo->fence_queue);
162 163
163 if (likely(fifo->last_buffer != NULL)) { 164 if (likely(fifo->last_buffer != NULL)) {
164 vfree(fifo->last_buffer); 165 vfree(fifo->last_buffer);
@@ -484,6 +485,8 @@ int vmw_fifo_send_fence(struct vmw_private *dev_priv, uint32_t *sequence)
484 fifo_state->last_buffer_add = true; 485 fifo_state->last_buffer_add = true;
485 vmw_fifo_commit(dev_priv, bytes); 486 vmw_fifo_commit(dev_priv, bytes);
486 fifo_state->last_buffer_add = false; 487 fifo_state->last_buffer_add = false;
488 (void) vmw_fence_push(&fifo_state->fence_queue, *sequence);
489 vmw_update_sequence(dev_priv, fifo_state);
487 490
488out_err: 491out_err:
489 return ret; 492 return ret;