xserver 1.5.3

This commit is contained in:
Adam Jackson 2008-11-05 20:52:15 +00:00
parent dfe451eac3
commit b87ee0a56f
14 changed files with 50 additions and 1002 deletions

View File

@ -1 +1 @@
xorg-server-1.5.2.tar.bz2
xorg-server-1.5.3.tar.bz2

View File

@ -1,3 +1,4 @@
xorg-x11-server-1_5_0-1_fc10:HEAD:xorg-x11-server-1.5.0-1.fc10.src.rpm:1220485219
xorg-x11-server-1_5_1-1_fc10:HEAD:xorg-x11-server-1.5.1-1.fc10.src.rpm:1222198557
xorg-x11-server-1_5_2-1_fc10:HEAD:xorg-x11-server-1.5.2-1.fc10.src.rpm:1223667007
xorg-x11-server-1_5_3-1_fc10:HEAD:xorg-x11-server-1.5.3-1.fc10.src.rpm:1225918317

View File

@ -1 +1 @@
376a1c790f7519f3ab3e047409c659f0 xorg-server-1.5.2.tar.bz2
308971036e25250e7fe3cccfd5a120f8 xorg-server-1.5.3.tar.bz2

View File

@ -18,8 +18,8 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.5.2
Release: 12%{?dist}
Version: 1.5.3
Release: 1%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@ -40,14 +40,13 @@ Source1: gitignore
Source10: 10-x11-keymap.fdi
Source11: fedora-setup-keyboard
# Useful xvfb-run script
# "useful" xvfb-run script
Source20: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh
# OpenGL compositing manager feature/optimization patches.
Patch100: xorg-x11-server-1.1.0-no-move-damage.patch
Patch101: xserver-1.4.99-dont-backfill-bg-none.patch
# XXX does this need rebasing still?
Patch102: xserver-1.5.0-exa-master-upgrade.patch
Patch102: xserver-1.5.2-exa-master-upgrade.patch
Patch103: xserver-1.5.0-bg-none-root.patch
Patch104: xserver-1.5.0-exa-master-fix-x11perf-crash.patch
Patch105: xserver-1.5.1-exa-fix-glyph-segfault.patch
@ -80,24 +79,10 @@ Patch6000: xserver-1.5.0-hide-cursor.patch
Patch6001: xserver-1.5.0-edid-backport.patch
# force mode debugging on for randr 1.2 drivers
Patch6003: xserver-1.5.1-mode-debug.patch
Patch6004: xserver-1.5.1-global-backtrace.patch
Patch6005: xserver-1.5.2-mieq-backtrace.patch
Patch6006: xserver-1.5.2-backtrace-defines.patch
Patch6007: xserver-1.5.2-lies-damn-lies-and-aspect-ratios.patch
# No evdev grab, disable kbd/mouse
Patch6008: xserver-1.5.2-enable-RAW-console.patch
Patch6009: xserver-1.5.2-disable-kbd-mouse.patch
Patch6010: xserver-1.5.2-no-duplicate-devices.patch
# exa performance fix
Patch6011: xserver-1.5.2-exa-sync-less.patch
Patch6002: xserver-1.5.1-mode-debug.patch
# Bug 434807
Patch6012: xserver-1.5.2-more-sanity-checks.patch
Patch6013: xserver-1.5.2-drain-console.patch
Patch6003: xserver-1.5.2-more-sanity-checks.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
@ -529,6 +514,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Nov 05 2008 Adam Jackson <ajax@redhat.com> 1.5.3-1
- xserver 1.5.3
* Fri Oct 31 2008 Adam Jackson <ajax@redhat.com> 1.5.2-12
- xserver-1.5.2-drain-console.patch: Silently eat any input we get from the
tty fd, lest terrible wakeup storms ensue.

View File

@ -1,427 +0,0 @@
From 7a8a31c041b52d87c1522e684cb301b07ea6ad9b Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 10 Oct 2008 15:53:48 -0400
Subject: [PATCH] Move xorg_backtrace() up to the OS level so we can call it from DIX.
---
hw/xfree86/common/xf86Events.c | 173 ----------------------------------
include/os.h | 2 +
os/Makefile.am | 1 +
os/backtrace.c | 202 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 205 insertions(+), 173 deletions(-)
create mode 100644 os/backtrace.c
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 6ca0ae7..a2c206e 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -358,179 +358,6 @@
xf86SigIllHandler = sigillhandler;
}
-#ifdef HAVE_BACKTRACE
-#include <execinfo.h>
-
-static __inline__ void xorg_backtrace(void)
-{
- void *array[32]; /* deeper nesting than this means something's wrong */
- size_t size, i;
- char **strings;
- ErrorF("\nBacktrace:\n");
- size = backtrace(array, 32);
- strings = backtrace_symbols(array, size);
- for (i = 0; i < size; i++)
- ErrorF("%d: %s\n", i, strings[i]);
- free(strings);
-}
-
-#else /* not glibc or glibc < 2.1 */
-
-# if defined(sun) && defined(__SVR4)
-# define HAVE_PSTACK
-# endif
-
-# if defined(HAVE_WALKCONTEXT) /* Solaris 9 & later */
-
-# include <ucontext.h>
-# include <signal.h>
-# include <dlfcn.h>
-# include <sys/elf.h>
-
-#ifdef _LP64
-# define ElfSym Elf64_Sym
-#else
-# define ElfSym Elf32_Sym
-#endif
-
-/* Called for each frame on the stack to print it's contents */
-static int xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
-{
- Dl_info dlinfo;
- ElfSym *dlsym;
- char header[32];
- int depth = *((int *) arg);
-
- if (signo) {
- char signame[SIG2STR_MAX];
-
- if (sig2str(signo, signame) != 0) {
- strcpy(signame, "unknown");
- }
-
- ErrorF("** Signal %d (%s)\n", signo, signame);
- }
-
- snprintf(header, sizeof(header), "%d: 0x%lx", depth, pc);
- *((int *) arg) = depth + 1;
-
- /* Ask system dynamic loader for info on the address */
- if (dladdr1((void *) pc, &dlinfo, (void **) &dlsym, RTLD_DL_SYMENT)) {
- unsigned long offset = pc - (uintptr_t) dlinfo.dli_saddr;
- const char *symname;
-
- if (offset < dlsym->st_size) { /* inside a function */
- symname = dlinfo.dli_sname;
- } else { /* found which file it was in, but not which function */
- symname = "<section start>";
- offset = pc - (uintptr_t)dlinfo.dli_fbase;
- }
- ErrorF("%s: %s:%s+0x%lx\n", header, dlinfo.dli_fname,
- symname, offset);
-
- } else {
- /* Couldn't find symbol info from system dynamic loader, should
- * probably poke elfloader here, but haven't written that code yet,
- * so we just print the pc.
- */
- ErrorF("%s\n", header);
- }
-
- return 0;
-}
-# endif /* HAVE_WALKCONTEXT */
-
-# ifdef HAVE_PSTACK
-static int xorg_backtrace_pstack(void) {
- pid_t kidpid;
- int pipefd[2];
-
- if (pipe(pipefd) != 0) {
- return -1;
- }
-
- kidpid = fork1();
-
- if (kidpid == -1) {
- /* ERROR */
- return -1;
- } else if (kidpid == 0) {
- /* CHILD */
- char parent[16];
-
- seteuid(0);
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- dup2(pipefd[1],STDOUT_FILENO);
- closefrom(STDERR_FILENO);
-
- snprintf(parent, sizeof(parent), "%d", getppid());
- execle("/usr/bin/pstack", "pstack", parent, NULL);
- exit(1);
- } else {
- /* PARENT */
- char btline[256];
- int kidstat;
- int bytesread;
- int done = 0;
-
- close(pipefd[1]);
-
- while (!done) {
- bytesread = read(pipefd[0], btline, sizeof(btline) - 1);
-
- if (bytesread > 0) {
- btline[bytesread] = 0;
- ErrorF("%s", btline);
- }
- else if ((bytesread < 0) ||
- ((errno != EINTR) && (errno != EAGAIN)))
- done = 1;
- }
- close(pipefd[0]);
- waitpid(kidpid, &kidstat, 0);
- if (kidstat != 0)
- return -1;
- }
- return 0;
-}
-# endif /* HAVE_PSTACK */
-
-
-# if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT)
-
-static __inline__ void xorg_backtrace(void) {
-
- ErrorF("\nBacktrace:\n");
-
-# ifdef HAVE_PSTACK
-/* First try fork/exec of pstack - otherwise fall back to walkcontext
- pstack is preferred since it can print names of non-exported functions */
-
- if (xorg_backtrace_pstack() < 0)
-# endif
- {
-# ifdef HAVE_WALKCONTEXT
- ucontext_t u;
- int depth = 1;
-
- if (getcontext(&u) == 0)
- walkcontext(&u, xorg_backtrace_frame, &depth);
- else
-# endif
- Error("Failed to get backtrace info");
- }
- ErrorF("\n");
-}
-
-# else
-
-/* Default fallback if we can't find any way to get a backtrace */
-static __inline__ void xorg_backtrace(void) { return; }
-
-# endif
-#endif
-
/*
* xf86SigHandler --
* Catch unexpected signals and exit or continue cleanly.
diff --git a/include/os.h b/include/os.h
--- a/include/os.h
+++ b/include/os.h
@@ -517,4 +517,6 @@
extern void Error(char *str);
extern void LogPrintMarkers(void);
+extern void xorg_backtrace(void);
+
#endif /* OS_H */
diff --git a/os/Makefile.am b/os/Makefile.am
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -11,6 +11,7 @@
WaitFor.c \
access.c \
auth.c \
+ backtrace.c \
connection.c \
io.c \
mitauth.c \
diff --git a/os/backtrace.c b/os/backtrace.c
new file mode 100644
--- /dev/null
+++ b/os/backtrace.c
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software")
+ * to deal in the software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "os.h"
+#include "misc.h"
+
+#ifdef HAVE_BACKTRACE
+#include <execinfo.h>
+
+void xorg_backtrace(void)
+{
+ void *array[32]; /* deeper nesting than this means something's wrong */
+ size_t size, i;
+ char **strings;
+ ErrorF("\nBacktrace:\n");
+ size = backtrace(array, 32);
+ strings = backtrace_symbols(array, size);
+ for (i = 0; i < size; i++)
+ ErrorF("%d: %s\n", i, strings[i]);
+ free(strings);
+}
+
+#else /* not glibc or glibc < 2.1 */
+
+# if defined(sun) && defined(__SVR4)
+# define HAVE_PSTACK
+# endif
+
+# if defined(HAVE_WALKCONTEXT) /* Solaris 9 & later */
+
+# include <ucontext.h>
+# include <signal.h>
+# include <dlfcn.h>
+# include <sys/elf.h>
+
+#ifdef _LP64
+# define ElfSym Elf64_Sym
+#else
+# define ElfSym Elf32_Sym
+#endif
+
+/* Called for each frame on the stack to print it's contents */
+static int xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
+{
+ Dl_info dlinfo;
+ ElfSym *dlsym;
+ char header[32];
+ int depth = *((int *) arg);
+
+ if (signo) {
+ char signame[SIG2STR_MAX];
+
+ if (sig2str(signo, signame) != 0) {
+ strcpy(signame, "unknown");
+ }
+
+ ErrorF("** Signal %d (%s)\n", signo, signame);
+ }
+
+ snprintf(header, sizeof(header), "%d: 0x%lx", depth, pc);
+ *((int *) arg) = depth + 1;
+
+ /* Ask system dynamic loader for info on the address */
+ if (dladdr1((void *) pc, &dlinfo, (void **) &dlsym, RTLD_DL_SYMENT)) {
+ unsigned long offset = pc - (uintptr_t) dlinfo.dli_saddr;
+ const char *symname;
+
+ if (offset < dlsym->st_size) { /* inside a function */
+ symname = dlinfo.dli_sname;
+ } else { /* found which file it was in, but not which function */
+ symname = "<section start>";
+ offset = pc - (uintptr_t)dlinfo.dli_fbase;
+ }
+ ErrorF("%s: %s:%s+0x%lx\n", header, dlinfo.dli_fname,
+ symname, offset);
+
+ } else {
+ /* Couldn't find symbol info from system dynamic loader, should
+ * probably poke elfloader here, but haven't written that code yet,
+ * so we just print the pc.
+ */
+ ErrorF("%s\n", header);
+ }
+
+ return 0;
+}
+# endif /* HAVE_WALKCONTEXT */
+
+# ifdef HAVE_PSTACK
+static int xorg_backtrace_pstack(void) {
+ pid_t kidpid;
+ int pipefd[2];
+
+ if (pipe(pipefd) != 0) {
+ return -1;
+ }
+
+ kidpid = fork1();
+
+ if (kidpid == -1) {
+ /* ERROR */
+ return -1;
+ } else if (kidpid == 0) {
+ /* CHILD */
+ char parent[16];
+
+ seteuid(0);
+ close(STDIN_FILENO);
+ close(STDOUT_FILENO);
+ dup2(pipefd[1],STDOUT_FILENO);
+ closefrom(STDERR_FILENO);
+
+ snprintf(parent, sizeof(parent), "%d", getppid());
+ execle("/usr/bin/pstack", "pstack", parent, NULL);
+ exit(1);
+ } else {
+ /* PARENT */
+ char btline[256];
+ int kidstat;
+ int bytesread;
+ int done = 0;
+
+ close(pipefd[1]);
+
+ while (!done) {
+ bytesread = read(pipefd[0], btline, sizeof(btline) - 1);
+
+ if (bytesread > 0) {
+ btline[bytesread] = 0;
+ ErrorF("%s", btline);
+ }
+ else if ((bytesread < 0) ||
+ ((errno != EINTR) && (errno != EAGAIN)))
+ done = 1;
+ }
+ close(pipefd[0]);
+ waitpid(kidpid, &kidstat, 0);
+ if (kidstat != 0)
+ return -1;
+ }
+ return 0;
+}
+# endif /* HAVE_PSTACK */
+
+
+# if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT)
+
+void xorg_backtrace(void) {
+
+ ErrorF("\nBacktrace:\n");
+
+# ifdef HAVE_PSTACK
+/* First try fork/exec of pstack - otherwise fall back to walkcontext
+ pstack is preferred since it can print names of non-exported functions */
+
+ if (xorg_backtrace_pstack() < 0)
+# endif
+ {
+# ifdef HAVE_WALKCONTEXT
+ ucontext_t u;
+ int depth = 1;
+
+ if (getcontext(&u) == 0)
+ walkcontext(&u, xorg_backtrace_frame, &depth);
+ else
+# endif
+ Error("Failed to get backtrace info");
+ }
+ ErrorF("\n");
+}
+
+# else
+
+/* Default fallback if we can't find any way to get a backtrace */
+void xorg_backtrace(void) { return; }
+
+# endif
+#endif
--
1.6.0.1

View File

@ -1,36 +0,0 @@
From ad677238bc96a8578113bbe76d605d7a87aca44c Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 14 Oct 2008 13:00:50 -0400
Subject: [PATCH] Add backtrace definitions to dix-config.h.in
---
include/dix-config.h.in | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 26f4b6a..6c3d91c 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -75,6 +75,9 @@
/* Define to 1 if you have the <asm/mtrr.h> header file. */
#undef HAVE_ASM_MTRR_H
+/* Has backtrace support */
+#undef HAVE_BACKTRACE
+
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
@@ -94,6 +97,9 @@
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
+/* Have execinfo.h */
+#undef HAVE_EXECINFO_H
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
--
1.6.0.1

View File

@ -1,111 +0,0 @@
From d3863202cba03fe564d6cc1fe3641f017392c9e7 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@redhat.com>
Date: Thu, 16 Oct 2008 11:22:29 +1030
Subject: [PATCH] xfree86: If AEI is on, disable "kbd" and "mouse" devices.
This consists of two parts:
In the implicit server layout, ignore those drivers when looking for a core
device.
And after finishing the server layout, run through the list of devices and
remove any that use mouse or kbd.
AEI is mutually exclusive with the kbd and mouse drivers, so pick either - or.
If no config file is present, force AEI on.
---
hw/xfree86/common/xf86Config.c | 39 +++++++++++++++++++++++++++++++++++++--
hw/xfree86/common/xf86Init.c | 2 ++
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a1c2e34..ac80add 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1340,7 +1340,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
}
/* 4. First pointer with 'mouse' as the driver. */
- if (!foundPointer && (!xf86Info.allowEmptyInput || implicitLayout)) {
+ if (!foundPointer && !xf86Info.allowEmptyInput) {
confInput = xf86findInput(CONF_IMPLICIT_POINTER,
xf86configptr->conf_input_lst);
if (!confInput) {
@@ -1480,7 +1480,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
}
/* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
- if (!foundKeyboard && (!xf86Info.allowEmptyInput || implicitLayout)) {
+ if (!foundKeyboard && !xf86Info.allowEmptyInput) {
confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
xf86configptr->conf_input_lst);
if (!confInput) {
@@ -2481,6 +2481,41 @@ addDefaultModes(MonPtr monitorp)
static void
checkInput(serverLayoutPtr layout, Bool implicit_layout) {
checkCoreInputDevices(layout, implicit_layout);
+
+ /* AllowEmptyInput and the "kbd" and "mouse" drivers are mutually
+ * exclusive. Trawl the list for mouse/kbd devices and disable them.
+ */
+ if (xf86Info.allowEmptyInput && layout->inputs)
+ {
+ IDevPtr *dev = layout->inputs;
+ BOOL warned = FALSE;
+
+ while(*dev)
+ {
+ if (strcmp((*dev)->driver, "kbd") == 0 ||
+ strcmp((*dev)->driver, "mouse") == 0)
+ {
+ IDevPtr *current;
+ if (!warned)
+ {
+ xf86Msg(X_WARNING, "AllowEmptyInput is on, devices using "
+ "drivers 'kbd' or 'mouse' will be disabled.\n");
+ warned = TRUE;
+ }
+
+ xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->identifier);
+
+ current = dev;
+ xfree(*dev);
+
+ do {
+ *current = *(current + 1);
+ current++;
+ } while(*current);
+ } else
+ dev++;
+ }
+ }
}
/*
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 68dc387..eb4ebfa 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -508,6 +508,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Msg(X_ERROR, "Error parsing the config file\n");
return;
case CONFIG_NOFILE:
+ /* No config file? Then we want HAL to give us the devices. */
+ xf86Info.allowEmptyInput = TRUE;
autoconfig = TRUE;
break;
}
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 0774563..99fcdb3 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -698,6 +698,7 @@ the X server to load. Disabled by default.
If enabled, don't add the standard keyboard and mouse drivers, if there are no
input devices in the config file. Enabled by default if AutoAddDevices and
AutoEnableDevices is enabled, otherwise disabled.
+If AllowEmptyInput is on, devices using the kbd or mouse driver are ignored.
.TP 7
.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
If this option is disabled, then no devices will be added from HAL events.
--
1.6.0.1

View File

@ -1,59 +0,0 @@
From 7a2f6c3d3b1ca39e87ecffd48fd87ab724990f52 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 31 Oct 2008 12:07:39 -0400
Subject: [PATCH] Drain the vt file descriptor.
Apparently putting it in raw mode makes the kernel think we really
really need the events from it, even if we open it write-only, and if we
don't drain input from it then eventually the kernel starts a wakeup
storm trying to enqueue keystrokes that'll never go anywhere. Just eat
the data and pretend everything's fine.
---
hw/xfree86/os-support/linux/lnx_init.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 6f68ba5..da5ca57 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -85,6 +85,14 @@ restoreVtPerms(void)
chown(vtname, vtPermSave[2], vtPermSave[3]);
}
+static void *console_handler;
+
+static void
+drain_console(int fd, void *closure)
+{
+ tcflush(fd, TCIOFLUSH);
+}
+
void
xf86OpenConsole(void)
{
@@ -300,6 +308,10 @@ xf86OpenConsole(void)
cfsetispeed(&nTty, 9600);
cfsetospeed(&nTty, 9600);
tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
+
+ /* need to keep the buffer clean, else the kernel gets angry */
+ console_handler = xf86AddGeneralHandler(xf86Info.consoleFd,
+ drain_console, NULL);
}
/* we really should have a InitOSInputDevices() function instead
@@ -346,6 +358,11 @@ xf86CloseConsole()
if (ShareVTs) return;
+ if (console_handler) {
+ xf86RemoveGeneralHandler(console_handler);
+ console_handler = NULL;
+ };
+
#if defined(DO_OS_FONTRESTORE)
if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts) < 0)
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETSTATE failed: %s\n",
--
1.6.0.3

View File

@ -1,103 +0,0 @@
From 934dab76d01afb3a77439b94631eae37bf05c954 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@redhat.com>
Date: Sun, 12 Oct 2008 21:58:30 +1030
Subject: [PATCH] xfree86: if AllowEmptyInput is true, enable RAW mode on the console.
Usually, the console is set to RAW in the kbd driver. If we hotplug all input
devices (i.e. the evdev driver for keyboards) and the console is left as-is.
As a result, the evdev driver must put an EVIOCGRAB on the device to avoid
characters leaking onto the console. This again breaks many things, amongst
them lirc, in-kernel mouse button emulation and HAL.
This patch sets the console to RAW if AllowEmptyInput is on.
Use-cases:
1. AEI is off
1.1. Only kbd driver is used - behaviour as-is.
1.2. kbd and evdev driver is used: if evdev does not grab the device,
duplicate events are generated.
2. AEI is on
2.1. Only evdev driver is used - behaviour as-is, but evdev does not need
to grab the device anymore.
2.2. evdev and kbd are used: duplicate key events are generated if evdev
does not grab the device.
1.2 is a marginal use-case that can be fixed by adding a "grab" option to the
evdev driver (update of xorg.conf is needed).
2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices
specified in the xorg.conf are still added [1], resulting in duplicate events.
This is a common configuration and needs sorting out.
[1] 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/os-support/linux/lnx_init.c | 35 +++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 4c36b7c..6f68ba5 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -53,6 +53,8 @@ static int activeVT = -1;
static int vtPermSave[4];
static char vtname[11];
+static struct termios tty_attr; /* tty state to restore */
+static int tty_mode; /* kbd mode to restore */
static int
saveVtPerms(void)
@@ -272,6 +274,34 @@ xf86OpenConsole(void)
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
strerror(errno));
+ /* Set the keyboard to RAW mode. If we're using the keyboard
+ * driver, the driver does it for us. If we have AEI on, then
+ * we're expecting the devices to be added (i.e. evdev) and we
+ * have to set it manually.
+ */
+ if (xf86Info.allowEmptyInput)
+ {
+ struct termios nTty;
+
+ tcgetattr(xf86Info.consoleFd, &tty_attr);
+ ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
+
+ if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0)
+ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+ strerror(errno));
+
+ nTty = tty_attr;
+ nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
+ nTty.c_oflag = 0;
+ nTty.c_cflag = CREAD | CS8;
+ nTty.c_lflag = 0;
+ nTty.c_cc[VTIME]=0;
+ nTty.c_cc[VMIN]=1;
+ cfsetispeed(&nTty, 9600);
+ cfsetospeed(&nTty, 9600);
+ tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
+ }
+
/* we really should have a InitOSInputDevices() function instead
* of Init?$#*&Device(). So I just place it here */
@@ -328,7 +358,10 @@ xf86CloseConsole()
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0)
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
strerror(errno));
-
+
+ ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
+ tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
strerror(errno));
--
1.6.0.1

View File

@ -1,10 +1,22 @@
From e99347a3e82e6db47dd482169b6799968afc3893 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 20 Aug 2008 10:11:07 -0400
From 3a5a88ec354de45434b9e037d21cc56c3079f4b2 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 5 Nov 2008 14:59:27 -0500
Subject: [PATCH] Upgrade to master EXA
---
exa/Makefile.am | 1 +
exa/exa.c | 95 +++--
exa/exa.h | 19 +-
exa/exa_accel.c | 144 ++++++--
exa/exa_glyphs.c | 897 ++++++++++++++++++++++++++++++++++++++++++++
exa/exa_migration.c | 45 ++-
exa/exa_priv.h | 76 +++-
exa/exa_render.c | 280 +++++++++++++--
exa/exa_unaccel.c | 30 +-
hw/xfree86/exa/exa.man.pre | 6 -
hw/xfree86/exa/examodule.c | 9 +-
11 files changed, 1446 insertions(+), 156 deletions(-)
create mode 100644 exa/exa_glyphs.c
diff --git a/exa/Makefile.am b/exa/Makefile.am
index e2f7ed3..2b3f1e4 100644
@ -19,7 +31,7 @@ index e2f7ed3..2b3f1e4 100644
exa_offscreen.c \
exa_render.c \
diff --git a/exa/exa.c b/exa/exa.c
index ccf148a..12c1549 100644
index 72539c0..22f3ab9 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -35,8 +35,6 @@
@ -31,7 +43,7 @@ index ccf148a..12c1549 100644
#include "exa.h"
#include "cw.h"
@@ -161,7 +159,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
@@ -165,7 +163,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
RegionPtr pDamageReg;
RegionRec region;
@ -40,7 +52,7 @@ index ccf148a..12c1549 100644
return;
box.x1 = max(x1, 0);
@@ -261,6 +259,21 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
@@ -265,6 +263,21 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
pExaScr->info->pixmapPitchAlign);
}
@ -62,7 +74,7 @@ index ccf148a..12c1549 100644
/**
* exaCreatePixmap() creates a new pixmap.
*
@@ -321,6 +334,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
@@ -325,6 +338,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
paddedWidth, NULL);
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
pExaPixmap->fb_ptr = NULL;
@ -70,7 +82,7 @@ index ccf148a..12c1549 100644
} else {
pExaPixmap->driverPriv = NULL;
/* Scratch pixmaps may have w/h equal to zero, and may not be
@@ -345,21 +359,22 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
@@ -349,21 +363,22 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
fbDestroyPixmap(pPixmap);
return NULL;
}
@ -105,7 +117,7 @@ index ccf148a..12c1549 100644
/* None of the pixmap bits are valid initially */
REGION_NULL(pScreen, &pExaPixmap->validSys);
@@ -656,34 +671,25 @@ exaCreateGC (GCPtr pGC)
@@ -660,34 +675,25 @@ exaCreateGC (GCPtr pGC)
return TRUE;
}
@ -152,7 +164,7 @@ index ccf148a..12c1549 100644
return ret;
}
@@ -737,6 +743,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
@@ -741,6 +747,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
#endif
@ -162,7 +174,7 @@ index ccf148a..12c1549 100644
pScreen->CreateGC = pExaScr->SavedCreateGC;
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
pScreen->GetImage = pExaScr->SavedGetImage;
@@ -750,8 +759,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
@@ -754,8 +763,9 @@ exaCloseScreen(int i, ScreenPtr pScreen)
#ifdef RENDER
if (ps) {
ps->Composite = pExaScr->SavedComposite;
@ -173,7 +185,7 @@ index ccf148a..12c1549 100644
}
#endif
@@ -913,14 +923,16 @@ exaDriverInit (ScreenPtr pScreen,
@@ -917,14 +927,16 @@ exaDriverInit (ScreenPtr pScreen,
pExaScr->SavedComposite = ps->Composite;
ps->Composite = exaComposite;
@ -193,7 +205,7 @@ index ccf148a..12c1549 100644
}
#endif
@@ -968,6 +980,9 @@ exaDriverInit (ScreenPtr pScreen,
@@ -978,6 +990,9 @@ exaDriverInit (ScreenPtr pScreen,
}
}
@ -204,7 +216,7 @@ index ccf148a..12c1549 100644
" operations:\n", pScreen->myNum);
assert(pScreenInfo->PrepareSolid != NULL);
diff --git a/exa/exa.h b/exa/exa.h
index 2562094..8d9bcea 100644
index a3dad69..6486bd3 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -744,21 +744,36 @@ typedef struct _ExaDriver {
@ -246,41 +258,6 @@ index 2562094..8d9bcea 100644
ExaOffscreenArea *
exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
Bool locked,
@@ -771,30 +786,23 @@ exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
void
ExaOffscreenMarkUsed (PixmapPtr pPixmap);
-unsigned long
-exaGetPixmapOffset(PixmapPtr pPix);
-
-unsigned long
-exaGetPixmapPitch(PixmapPtr pPix);
-
-unsigned long
-exaGetPixmapSize(PixmapPtr pPix);
-
void
exaEnableDisableFBAccess (int index, Bool enable);
+
+/* in exa_migration.c */
void
exaMoveInPixmap (PixmapPtr pPixmap);
void
exaMoveOutPixmap (PixmapPtr pPixmap);
-void *
-exaGetPixmapDriverPrivate(PixmapPtr p);
+/* in exa_unaccel.c */
CARD32
exaGetPixmapFirstPixel (PixmapPtr pPixmap);
+
/**
* Returns TRUE if the given planemask covers all the significant bits in the
* pixel values for pDrawable.
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 3ec9625..1c07a0b 100644
--- a/exa/exa_accel.c
@ -1419,7 +1396,7 @@ index 0000000..b23e7f6
+ }
+}
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 5f22474..2bb2ad9 100644
index b7cc062..8f000e9 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -33,8 +33,6 @@
@ -1471,7 +1448,7 @@ index 5f22474..2bb2ad9 100644
* Returns TRUE if the pixmap is not movable. This is the case where it's a
* fake pixmap for the frontbuffer (no pixmap private) or it's a scratch
* pixmap created by some other X Server internals (the score says it's
@@ -211,9 +242,9 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
@@ -212,9 +243,9 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pBox->x1, pBox->y1,
pBox->x2 - pBox->x1,
pBox->y2 - pBox->y1,
@ -1483,7 +1460,7 @@ index 5f22474..2bb2ad9 100644
pExaPixmap->sys_pitch))
{
if (!access_prepared) {
@@ -301,6 +332,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
@@ -303,6 +334,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
ExaScreenPriv (pScreen);
ExaPixmapPriv (pPixmap);
@ -1493,7 +1470,7 @@ index 5f22474..2bb2ad9 100644
/* If we're VT-switched away, no touching card memory allowed. */
if (pExaScr->swappedOut)
return;
@@ -369,6 +403,9 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
@@ -371,6 +405,9 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
PixmapPtr pPixmap = migrate->pPix;
ExaPixmapPriv (pPixmap);
@ -1504,7 +1481,7 @@ index 5f22474..2bb2ad9 100644
return;
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index e4b6b54..0ebe07b 100644
index 387e751..f0696b0 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -61,6 +61,7 @@
@ -1621,7 +1598,7 @@ index e4b6b54..0ebe07b 100644
/* exa_accel.c */
static _X_INLINE Bool
@@ -422,6 +453,13 @@ exaComposite(CARD8 op,
@@ -419,6 +450,13 @@ exaComposite(CARD8 op,
CARD16 height);
void
@ -1635,7 +1612,7 @@ index e4b6b54..0ebe07b 100644
exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntrap, xTrapezoid *traps);
@@ -431,6 +469,13 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
@@ -428,6 +466,13 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntri, xTriangle *tris);
@ -1649,7 +1626,7 @@ index e4b6b54..0ebe07b 100644
void
exaGlyphs (CARD8 op,
PicturePtr pSrc,
@@ -449,4 +494,7 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
@@ -446,4 +491,7 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
void
exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area);
@ -2092,3 +2069,6 @@ index e18da0a..4a8d8f2 100644
static XF86ModuleVersionInfo exaVersRec =
{
"exa",
--
1.6.0.3

View File

@ -1,42 +0,0 @@
From 2188582e5ea90edb432a2f421d0a267439ba08f9 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Michel=20D=C3=A4nzer?= <michel@tungstengraphics.com>
Date: Mon, 20 Oct 2008 09:55:24 -0400
Subject: [PATCH] EXA: Avoid excessive syncing in PutImage
---
exa/exa_migration.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 56b6945..571650c 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -129,6 +129,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
BoxPtr pBox;
int nbox;
Bool access_prepared = FALSE;
+ Bool need_sync = FALSE;
/* Damaged bits are valid in current copy but invalid in other one */
if (exaPixmapIsOffscreen(pPixmap)) {
@@ -220,14 +221,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
exaMemcpyBox (pPixmap, pBox,
fallback_src, fallback_srcpitch,
fallback_dst, fallback_dstpitch);
- }
+ } else
+ need_sync = TRUE;
pBox++;
}
if (access_prepared)
exaFinishAccess(&pPixmap->drawable, fallback_index);
- else
+ else if (need_sync)
sync (pPixmap->drawable.pScreen);
pExaPixmap->offscreen = save_offscreen;
--
1.6.0.1

View File

@ -1,39 +0,0 @@
From bd9c6b3a4d726a3f83ac6d8cf7211eddbc28f25a Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 14 Oct 2008 14:04:01 -0400
Subject: [PATCH] EDID: Catch even more cases of encoding aspect as size.
Very cute, Samsung, not only do you claim to be 16cm by 9cm in the
global size record, you also claim to be 160mm by 90mm in the detailed
timings. Grrr.
---
hw/xfree86/ddc/interpret_edid.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 3596e87..fbb17b1 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -115,12 +115,16 @@ handle_edid_quirks(xf86MonPtr m)
}
}
- if (real_hsize && real_vsize) {
+ if (!real_hsize || !real_vsize) {
+ m->features.hsize = m->features.vsize = 0;
+ } else if ((m->features.hsize * 10 == real_hsize) &&
+ (m->features.vsize * 10 == real_vsize)) {
+ /* exact match is just unlikely, should do a better check though */
+ m->features.hsize = m->features.vsize = 0;
+ } else {
/* convert mm to cm */
m->features.hsize = (real_hsize + 5) / 10;
m->features.vsize = (real_vsize + 5) / 10;
- } else {
- m->features.hsize = m->features.vsize = 0;
}
xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n",
--
1.6.0.1

View File

@ -1,41 +0,0 @@
From b736f477f5324f79af30fc0f941ba0714a34ccda Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 10 Oct 2008 16:33:24 -0400
Subject: [PATCH] mieq: Backtrace when the queue overflows.
Since we're probably stuck down in a driver somewhere, let's at least
try to point out where. This will need to be rethought when the input
thread work lands though.
---
mi/mieq.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/mi/mieq.c b/mi/mieq.c
index 0a1b740..062dede 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -169,6 +169,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
oldtail = (oldtail - 1) % QUEUE_SIZE;
}
else {
+ static int stuck = 0;
newtail = (oldtail + 1) % QUEUE_SIZE;
/* Toss events which come in late. Usually this means your server's
* stuck in an infinite loop somewhere, but SIGIO is still getting
@@ -176,8 +177,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
if (newtail == miEventQueue.head) {
ErrorF("[mi] EQ overflowing. The server is probably stuck "
"in an infinite loop.\n");
+ if (!stuck) {
+ xorg_backtrace();
+ stuck = 1;
+ }
return;
}
+ stuck = 0;
miEventQueue.tail = newtail;
}
--
1.6.0.1

View File

@ -1,63 +0,0 @@
From a4e9b92e2449b4c8f8654a0eaf0f1ca6627da1fc Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@redhat.com>
Date: Mon, 20 Oct 2008 12:19:55 +1030
Subject: [PATCH] config: don't add duplicate devices through HAL.
If HAL is restarted, the device list is send to the server again, leading
first to duplicate devices (and thus duplicate events), and later to a
FatalError "Too many input devices."
dev->config_info contains the UDI for the device. If the UDI of a new devices
is equal to one we already have in the device list, just ignore it.
---
config/hal.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/config/hal.c b/config/hal.c
index 0e0505b..639e0ec 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -166,6 +166,26 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
return ret;
}
+static BOOL
+device_is_duplicate(char *config_info)
+{
+ DeviceIntPtr dev;
+
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
+ return TRUE;
+ }
+
+ for (dev = inputInfo.off_devices; dev; dev = dev->next)
+ {
+ if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
device_added(LibHalContext *hal_ctx, const char *udi)
{
@@ -227,6 +247,13 @@ device_added(LibHalContext *hal_ctx, const char *udi)
}
sprintf(config_info, "hal:%s", udi);
+ /* Check for duplicate devices */
+ if (device_is_duplicate(config_info))
+ {
+ LogMessage(X_WARNING, "config/hal: device %s already added. Ignoring.\n", name);
+ goto unwind;
+ }
+
/* ok, grab options from hal.. iterate through all properties
* and lets see if any of them are options that we can add */
set = libhal_device_get_all_properties(hal_ctx, udi, &error);
--
1.6.0.1