summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_saa.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-12-06 09:53:16 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2011-12-06 18:22:55 +0100
commit2c438ad8b82f47ac3252403052df16655184acbd (patch)
treeb19ac1b0e2be79ec38014b6f42c028e932a70faf /vmwgfx/vmwgfx_saa.c
parent1736a76246f0a0dab01f5a1066332168d34b2803 (diff)
vmwgfx: Add an option to enable rendercheck mode
Rendercheck mode is used to enable acceleration of all supported composite operations, regardless of the current data location. The mode is off by default, but could be turned on to test the hardware composite operation implementation. Due to excessive data migration, rendercheck mode will be slow. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'vmwgfx/vmwgfx_saa.c')
-rw-r--r--vmwgfx/vmwgfx_saa.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index d14c551..7788ed5 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -1070,7 +1070,12 @@ vmwgfx_composite_prepare(struct saa_driver *driver, CARD8 op,
valid_hw = (valid_hw && tmp_valid_hw);
}
- if (!valid_hw && !dirty_hw)
+ /*
+ * In rendercheck mode we try to accelerate all supported
+ * composite operations.
+ */
+
+ if (!valid_hw && !dirty_hw && !vsaa->rendercheck)
goto out_err;
/*
@@ -1320,7 +1325,8 @@ Bool
vmwgfx_saa_init(ScreenPtr pScreen, int drm_fd, struct xa_tracker *xat,
void (*present_flush)(ScreenPtr pScreen),
Bool direct_presents,
- Bool only_hw_presents)
+ Bool only_hw_presents,
+ Bool rendercheck)
{
struct vmwgfx_saa *vsaa;
@@ -1342,6 +1348,7 @@ vmwgfx_saa_init(ScreenPtr pScreen, int drm_fd, struct xa_tracker *xat,
vsaa->can_optimize_dma = FALSE;
vsaa->use_present_opt = direct_presents;
vsaa->only_hw_presents = only_hw_presents;
+ vsaa->rendercheck = rendercheck;
WSBMINITLISTHEAD(&vsaa->sync_x_list);
vsaa->driver = vmwgfx_saa_driver;