summaryrefslogtreecommitdiff
path: root/src/vmware_bootstrap.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2013-12-16 06:05:35 -0800
committerThomas Hellstrom <thellstrom@vmware.com>2013-12-19 07:46:20 -0800
commitc8e1c498431b1f8758f62c94131c302cf3d07b39 (patch)
treea3f29d800d1a7b94e0e18db10c33a97f07ca15c6 /src/vmware_bootstrap.c
parentf45a551e9b70ccec8f92df02747d4e2af299cf8c (diff)
vmwgfx: Add an infrastructure to be able to run hosted under a compositor v2
Figure out what's needed both for XMir and XWayland and make a common driver structure out of it. v2: Added a lot of comments. No code change. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'src/vmware_bootstrap.c')
-rw-r--r--src/vmware_bootstrap.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c
index bb58325..57f8ae9 100644
--- a/src/vmware_bootstrap.c
+++ b/src/vmware_bootstrap.c
@@ -199,6 +199,12 @@ OptionInfoPtr VMWARECopyOptions(void)
return options;
}
+/*
+ * Also in vmwgfx_hosted.h, which we don't include.
+ */
+void *
+vmwgfx_hosted_detect(void);
+
static Bool
VMwarePreinitStub(ScrnInfoPtr pScrn, int flags)
{
@@ -220,6 +226,11 @@ VMwarePreinitStub(ScrnInfoPtr pScrn, int flags)
if ((*pScrn->PreInit)(pScrn, flags))
return TRUE;
+ /*
+ * Can't run legacy hosted
+ */
+ if (vmwgfx_hosted_detect())
+ return FALSE;
#else
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Driver was compiled without KMS- and 3D support.\n");
@@ -413,15 +424,19 @@ VMWareDriverFunc(ScrnInfoPtr pScrn,
xorgDriverFuncOp op,
pointer data)
{
- CARD32 *flag;
+ uint32_t *flag;
xorgRRModeMM *modemm;
switch (op) {
case GET_REQUIRED_HW_INTERFACES:
- flag = (CARD32 *)data;
+ flag = (uint32_t *)data;
if (flag) {
+#ifdef BUILD_VMWGFX
+ vmwgfx_modify_flags(flag);
+#else
*flag = HW_IO | HW_MMIO;
+#endif
}
return TRUE;
case RR_GET_MODE_MM: