aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-05-28 11:21:57 +0200
committerDave Airlie <airlied@redhat.com>2010-06-01 09:37:15 +1000
commit1925d4565888eb313cc923372da6a08bbfb3a859 (patch)
treeef8dbcc9ba34a0b1075433147808cc56067d17c5 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parent04e9e94dba3e564ce810cedab88e957dfd681b4a (diff)
downloadkernel_samsung_smdk4412-1925d4565888eb313cc923372da6a08bbfb3a859.zip
kernel_samsung_smdk4412-1925d4565888eb313cc923372da6a08bbfb3a859.tar.gz
kernel_samsung_smdk4412-1925d4565888eb313cc923372da6a08bbfb3a859.tar.bz2
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_execbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index dbd36b8..bdd67cf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -669,6 +669,15 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
goto out_err;
vmw_apply_relocations(sw_context);
+
+ if (arg->throttle_us) {
+ ret = vmw_wait_lag(dev_priv, &dev_priv->fifo.fence_queue,
+ arg->throttle_us);
+
+ if (unlikely(ret != 0))
+ goto out_err;
+ }
+
vmw_fifo_commit(dev_priv, arg->command_size);
ret = vmw_fifo_send_fence(dev_priv, &sequence);