summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-05-31 20:34:59 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-05-31 22:34:59 +0100
commitd12f2bb9c03a9e8a08824c849200f5b23c05914c (patch)
treea86af4658c5ec1d318b89537f1f477ad761b93ad /src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
parentcd151effe654c460c46ba55780eb89b3072077c0 (diff)
st/xorg, vmware: Make throttling configurable.
The xorg state tracker gets two new options to let the user choose whether to enable / disable dirty throttling and swapbuffer throttling. The default value of these options are enabled, unless the winsys supplies a customizer with other values. The customizer record has been extended to allow this, and also to set winsys-based throttling on a per- context basis. The vmware part of this patch disables the dirty throttling if the kernel supports command submission throttling, and also in that case sets kernel based throttling for everything but swapbuffers. The vmware winsys does not set throttling per context, even if it theoretically could, but instead sets throttling per screen. This should perhaps be changed, should the xorg state tracker start to use multiple rendering contexts. Kernel throttling is off by default for all new screens/contexts, so the dri state tracker is not affected. This significantly improves interactivity of the vmware xorg driver. Cherry-picked from commit a8f3b3f88acc1f0193fa740e76e9d815f07f32ab Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'src/gallium/winsys/svga/drm/vmw_screen_ioctl.c')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
index 5d81fa8c4a..d92ba389d3 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
@@ -241,8 +241,9 @@ vmw_ioctl_surface_destroy(struct vmw_winsys_screen *vws, uint32 sid)
}
void
-vmw_ioctl_command(struct vmw_winsys_screen *vws, void *commands, uint32_t size,
- uint32_t * pfence)
+vmw_ioctl_command(struct vmw_winsys_screen *vws, int32_t cid,
+ uint32_t throttle_us, void *commands, uint32_t size,
+ uint32_t *pfence)
{
struct drm_vmw_execbuf_arg arg;
struct drm_vmw_fence_rep rep;
@@ -275,6 +276,7 @@ vmw_ioctl_command(struct vmw_winsys_screen *vws, void *commands, uint32_t size,
arg.fence_rep = (unsigned long)&rep;
arg.commands = (unsigned long)commands;
arg.command_size = size;
+ arg.throttle_us = throttle_us;
do {
ret = drmCommandWrite(vws->ioctl.drm_fd, DRM_VMW_EXECBUF, &arg, sizeof(arg));