aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-04 09:07:26 +0200
committermarha <marha@users.sourceforge.net>2013-06-04 09:07:26 +0200
commit150771e7aabf4c864b0b970c5b8d773634793abe (patch)
tree3d544cc0d8d06dd70e843d6ca7e4b0ef421d2758 /xorg-server/hw/xfree86/os-support
parentfbe681216618af573ce29ca03b382b39b5919a52 (diff)
downloadvcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.tar.gz
vcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.tar.bz2
vcxsrv-150771e7aabf4c864b0b970c5b8d773634793abe.zip
xwininfo fontconfig libX11 libXau libXdmcp libXext mesa libXinerama libxcb libxcb/xcb-proto libfontenc pixman xkbcomp mkfontscale xkeyboard-config git update 4 Jun 2013
xserver commit c21344add2fc589df83b29be5831c36a372201bd libxcb commit 9ae84ad187e2ba440c40f44b8eb21c82c2fdbf12 libxcb/xcb-proto commit bdfedfa57a13ff805580cfacafc70f9cc55df363 xkeyboard-config commit dad9ade4e83d1ef5a517fcc4cc9ad3a79b47acce libX11 commit 8496122eb00ce6cd5d2308ee54f64b68c378e455 libXdmcp commit 0b443c1b769b9c9a3b45b4252afe07e18b709ff4 libXext commit d8366afbb0d2e4fbb1e419b1187f490522270bea libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff libXau commit 899790011304c4029e15abf410e49ce7cec17e0a xkbcomp commit ed582f4fccd4e23abcfba8b3b03649fea6414f44 pixman commit 2acfac5f8e097ee2ae225d986f981b55d65dd152 mkfontscale commit 19e2cb7c6a3ec2c5b1bc0d24866fa685eef0ee13 xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13 fontconfig commit cd9b1033a68816a7acfbba1718ba0aa5888f6ec7 mesa commit 7bafd88c153e395274b632e7eae4bc9fc3aec1d2
Diffstat (limited to 'xorg-server/hw/xfree86/os-support')
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Sbus.c8
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_platform.c62
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/posix_tty.c3
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_init.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSproc.h3
5 files changed, 63 insertions, 15 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
index 826000712..14e6d4bfd 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
@@ -617,8 +617,10 @@ sparcPromPathname2Node(const char *pathName)
return 0;
strcpy(name, pathName);
name[i + 1] = 0;
- if (name[0] != '/')
+ if (name[0] != '/') {
+ free(name);
return 0;
+ }
p = strchr(name + 1, '/');
if (p)
*p = 0;
@@ -629,8 +631,10 @@ sparcPromPathname2Node(const char *pathName)
*regstr++ = 0;
else
regstr = p;
- if (name + 1 == regstr)
+ if (name + 1 == regstr) {
+ free(name);
return 0;
+ }
promGetSibling(0);
i = promWalkPathname2Node(name + 1, regstr, promRootNode, 0);
free(name);
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
index 76f5583dd..1865b31b9 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_platform.c
@@ -7,6 +7,8 @@
#include <xf86drm.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
+#include <string.h>
/* Linux platform device support */
#include "xf86_OSproc.h"
@@ -18,11 +20,12 @@
#include "hotplug.h"
static Bool
-get_drm_info(struct OdevAttributes *attribs, char *path)
+get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
{
drmSetVersion sv;
char *buf;
int fd;
+ int err = 0;
fd = open(path, O_RDWR, O_CLOEXEC);
if (fd == -1)
@@ -32,19 +35,26 @@ get_drm_info(struct OdevAttributes *attribs, char *path)
sv.drm_di_minor = 4;
sv.drm_dd_major = -1; /* Don't care */
sv.drm_dd_minor = -1; /* Don't care */
- if (drmSetInterfaceVersion(fd, &sv)) {
- ErrorF("setversion 1.4 failed\n");
- return FALSE;
+
+ err = drmSetInterfaceVersion(fd, &sv);
+ if (err) {
+ ErrorF("setversion 1.4 failed: %s\n", strerror(-err));
+ goto out;
}
- xf86_add_platform_device(attribs);
+ /* for a delayed probe we've already added the device */
+ if (delayed_index == -1) {
+ xf86_add_platform_device(attribs);
+ delayed_index = xf86_num_platform_devices - 1;
+ }
buf = drmGetBusid(fd);
- xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
+ xf86_add_platform_device_attrib(delayed_index,
ODEV_ATTRIB_BUSID, buf);
drmFreeBusid(buf);
+out:
close(fd);
- return TRUE;
+ return (err == 0);
}
Bool
@@ -89,6 +99,23 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
}
void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs)
+{
+ Bool ret;
+ char *dpath;
+ dpath = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH);
+
+ ret = get_drm_info(attribs, dpath, index);
+ if (ret == FALSE) {
+ xf86_remove_platform_device(index);
+ return;
+ }
+ ret = xf86platformAddDevice(index);
+ if (ret == -1)
+ xf86_remove_platform_device(index);
+}
+
+void
xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
{
struct OdevAttribute *attrib;
@@ -116,10 +143,17 @@ xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
if (i != xf86_num_platform_devices)
goto out_free;
- LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n",
- path);
+ LogMessage(X_INFO, "xfree86: Adding drm device (%s)\n", path);
- ret = get_drm_info(attribs, path);
+ if (!xf86VTOwner()) {
+ /* if we don't currently own the VT then don't probe the device,
+ just mark it as unowned for later use */
+ attribs->unowned = TRUE;
+ xf86_add_platform_device(attribs);
+ return;
+ }
+
+ ret = get_drm_info(attribs, path, -1);
if (ret == FALSE)
goto out_free;
@@ -138,6 +172,9 @@ void NewGPUDeviceRequest(struct OdevAttributes *attribs)
if (old_num == xf86_num_platform_devices)
return;
+ if (xf86_get_platform_device_unowned(xf86_num_platform_devices - 1) == TRUE)
+ return;
+
ret = xf86platformAddDevice(xf86_num_platform_devices-1);
if (ret == -1)
xf86_remove_platform_device(xf86_num_platform_devices-1);
@@ -171,7 +208,10 @@ void DeleteGPUDeviceRequest(struct OdevAttributes *attribs)
ErrorF("xf86: remove device %d %s\n", index, syspath);
- xf86platformRemoveDevice(index);
+ if (xf86_get_platform_device_unowned(index) == TRUE)
+ xf86_remove_platform_device(index);
+ else
+ xf86platformRemoveDevice(index);
out:
config_odev_free_attribute_list(attribs);
}
diff --git a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
index ab3757a2a..4d08c1e85 100644
--- a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
+++ b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c
@@ -421,7 +421,8 @@ xf86FlushInput(int fd)
{
fd_set fds;
struct timeval timeout;
- char c[4];
+ /* this needs to be big enough to flush an evdev event. */
+ char c[256];
DebugF("FlushingSerial\n");
if (tcflush(fd, TCIFLUSH) == 0)
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
index 4b75a98ac..68527a577 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
@@ -274,7 +274,7 @@ xf86OpenConsole(void)
* this is to make sure we don't continue until the activate
* signal is received.
*/
- if (!xf86Screens[0]->vtSema)
+ if (!xf86VTOwner())
sleep(5);
}
#endif /* HAS_USL_VTS */
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
index ea2b16e46..6be594651 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
@@ -223,6 +223,9 @@ extern _X_EXPORT void xf86InitVidMem(void);
#include "hotplug.h"
void
xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
+
+void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
#endif
_XFUNCPROTOEND