xserver 1.14RC1

This commit is contained in:
Adam Jackson 2013-01-09 18:20:13 -05:00
parent d0ca88f1b9
commit bd41e025fa
8 changed files with 16 additions and 476 deletions

View File

@ -1,86 +0,0 @@
From a15fd634d937aeac3845f269ec5a293a87b7d830 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 14 Nov 2012 13:19:01 -0500
Subject: [PATCH] linux: Prefer ioctl(KDSKBMUTE, 1) over ioctl(KDSKBMODE,
K_OFF)
K_OFF is a slightly broken interface, since if some other process
(cough, systemd) sets the console state to K_UNICODE then it undoes
K_OFF, and now Alt-F2 will switch terminals instead of summoning the
Gnome "run command" dialog.
KDSKBMUTE separates the "don't enqueue events" logic from the keymap, so
doesn't have this problem. Try it first, then continue falling back to
older methods.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=859485
Tested-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/os-support/linux/lnx_init.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 68c296b..bcb039f 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -38,6 +38,14 @@
#include <sys/stat.h>
+#ifndef K_OFF
+#define K_OFF 0x4
+#endif
+
+#ifndef KDSKBMUTE
+#define KDSKBMUTE 0x4B51
+#endif
+
static Bool KeepTty = FALSE;
static int activeVT = -1;
@@ -213,19 +221,23 @@ xf86OpenConsole(void)
tcgetattr(xf86Info.consoleFd, &tty_attr);
SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode));
-#ifdef K_OFF
- /* disable kernel special keys and buffering */
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF));
+ /* disable kernel special keys and buffering, new style */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMUTE, 1));
if (ret < 0)
-#endif
{
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
+ /* disable kernel special keys and buffering, old style */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF));
if (ret < 0)
- FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
- strerror(errno));
-
- /* need to keep the buffer clean, else the kernel gets angry */
- xf86SetConsoleHandler(drain_console, NULL);
+ {
+ /* fine, just disable special keys */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
+ if (ret < 0)
+ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+ strerror(errno));
+
+ /* ... and drain events, else the kernel gets angry */
+ xf86SetConsoleHandler(drain_console, NULL);
+ }
}
nTty = tty_attr;
@@ -271,6 +283,7 @@ xf86CloseConsole(void)
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
strerror(errno));
+ SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMUTE, 0));
SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
--
1.7.11.7

View File

@ -1,136 +0,0 @@
From c02d0e62ca9d073ddd13b4b7493ade16fbc15ade Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 26 Jun 2012 13:12:45 -0400
Subject: [PATCH 1/3] linux: Refactor xf86{En,Dis}ableIO
Pull platform methods into their own sections for legibility, and
rewrite the ifdefs to be more concise.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/os-support/linux/lnx_video.c | 82 ++++++++++++++++++-------------
1 files changed, 48 insertions(+), 34 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 3526a21..895a79b 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -479,39 +479,36 @@ volatile unsigned char *ioBase = NULL;
#define __NR_pciconfig_iobase 200
#endif
-#endif
-
-Bool
-xf86EnableIO(void)
+static Bool
+hwEnableIO(void)
{
-#if defined(__powerpc__)
int fd;
- unsigned int ioBase_phys;
-#endif
-
- if (ExtendedEnabled)
- return TRUE;
-
-#if defined(__powerpc__)
- ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
+ unsigned int ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
fd = open("/dev/mem", O_RDWR);
if (ioBase == NULL) {
ioBase = (volatile unsigned char *) mmap(0, 0x20000,
PROT_READ | PROT_WRITE,
MAP_SHARED, fd, ioBase_phys);
-/* Should this be fatal or just a warning? */
-#if 0
- if (ioBase == MAP_FAILED) {
- xf86Msg(X_WARNING,
- "xf86EnableIOPorts: Failed to map iobase (%s)\n",
- strerror(errno));
- return FALSE;
- }
-#endif
}
close(fd);
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__)
+
+ return ioBase != MAP_FAILED;
+}
+
+static void
+hwDisableIO(void)
+{
+ munmap(ioBase, 0x20000);
+ ioBase = NULL;
+}
+
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \
+ defined(__alpha__)
+
+static Bool
+hwEnableIO(void)
+{
if (ioperm(0, 1024, 1) || iopl(3)) {
if (errno == ENODEV)
ErrorF("xf86EnableIOPorts: no I/O ports found\n");
@@ -526,27 +523,44 @@ xf86EnableIO(void)
ioperm(0x40, 4, 0); /* trap access to the timer chip */
ioperm(0x60, 4, 0); /* trap access to the keyboard controller */
#endif
-#endif
- ExtendedEnabled = TRUE;
return TRUE;
}
+static void
+hwDisableIO(void)
+{
+ iopl(0);
+ ioperm(0, 1024, 0);
+}
+
+#else /* non-IO architectures */
+
+#define hwEnableIO() TRUE
+#define hwDisableIO() do {} while (0)
+
+#endif
+
+Bool
+xf86EnableIO(void)
+{
+ if (ExtendedEnabled)
+ return TRUE;
+
+ ExtendedEnabled = hwEnableIO();
+
+ return ExtendedEnabled;
+}
+
void
xf86DisableIO(void)
{
if (!ExtendedEnabled)
return;
-#if defined(__powerpc__)
- munmap(ioBase, 0x20000);
- ioBase = NULL;
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__)
- iopl(0);
- ioperm(0, 1024, 0);
-#endif
- ExtendedEnabled = FALSE;
- return;
+ hwDisableIO();
+
+ ExtendedEnabled = FALSE;
}
#if defined (__alpha__)
--
1.7.7.6

View File

@ -1,35 +0,0 @@
From c5396ec05a5c6cab6608ba677f703c5227b1de13 Mon Sep 17 00:00:00 2001
From: Thierry Reding <thierry.reding@avionic-design.de>
Date: Wed, 17 Oct 2012 12:11:49 +0200
Subject: [PATCH] xf86: Fix build against recent Linux kernel
Recent Linux kernels reworked the linux/input.h header file, which is
now part of the "user-space API". The include guard therefore has an
additional additional _UAPI prefix.
Instead of adding another case to the #ifdef, drop any include guard
checks and instead always undefine the BUS_* definitions on Linux.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
hw/xfree86/common/xf86str.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 0590262..4c2d147 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -347,7 +347,7 @@ typedef struct _DriverRec {
*/
/* Tolerate prior #include <linux/input.h> */
-#if defined(linux) && defined(_INPUT_H)
+#if defined(linux)
#undef BUS_NONE
#undef BUS_PCI
#undef BUS_SBUS
--
1.7.11.7

View File

@ -1,40 +0,0 @@
From e47530e266b8e7f84004978e9fd247b5e6df0fb7 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 26 Jun 2012 13:15:45 -0400
Subject: [PATCH 2/3] linux: Make failure to iopl non-fatal
We load the driver list, then enable I/O, then call driver probe based
on whether I/O enable succeeded. That's bad, because the loaded
security policy might forbid port access. We happen to treat that as
fatal for some reason, which means even drivers that don't need I/O
access (like kms and fbdev) don't get the chance to run. Facepalm.
How about we just make that non-fatal instead, that sounds like a much
better plan.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/os-support/linux/lnx_video.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 895a79b..d9a5da1 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -510,11 +510,8 @@ static Bool
hwEnableIO(void)
{
if (ioperm(0, 1024, 1) || iopl(3)) {
- if (errno == ENODEV)
- ErrorF("xf86EnableIOPorts: no I/O ports found\n");
- else
- FatalError("xf86EnableIOPorts: failed to set IOPL"
- " for I/O (%s)\n", strerror(errno));
+ ErrorF("xf86EnableIOPorts: failed to set IOPL for I/O (%s)\n",
+ strerror(errno));
return FALSE;
}
#if !defined(__alpha__)
--
1.7.7.6

View File

@ -1,163 +0,0 @@
From d9ea0f90f87c3cf2d8382a1e8a6ae30e58a419b3 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 26 Jun 2012 14:32:31 -0400
Subject: [PATCH 3/3] xfree86: Change the semantics of
driverFunc(GET_REQUIRED_HW_INTERFACES)
This is a really awkward interface, since we're calling it well before
the driver knows what device it's going to drive. Drivers with both KMS
and UMS support therefore don't know whether to say they need I/O port
access or not, and have to assume they do.
With this change we now call it only to query whether port access might
be needed; we don't use that to determine whether to call a driver's
probe function or not, instead we call them unconditionally. If the
driver doesn't check whether port access was enabled, they might crash
ungracefully. To accomodate this, we move xorgHWAccess to be explicitly
intentionally exported (sigh xf86Priv.h) so that drivers can check that
before they attempt port access.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
hw/xfree86/common/xf86.h | 1 +
hw/xfree86/common/xf86Bus.c | 11 -----------
hw/xfree86/common/xf86Configure.c | 27 +--------------------------
hw/xfree86/common/xf86Init.c | 23 +++++++++++------------
hw/xfree86/common/xf86Priv.h | 1 -
5 files changed, 13 insertions(+), 50 deletions(-)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 129660d..913f206 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -55,6 +55,7 @@
extern _X_EXPORT int xf86DoConfigure;
extern _X_EXPORT int xf86DoShowOptions;
extern _X_EXPORT Bool xf86DoConfigurePass1;
+extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 6c86f5e..4ea88aa 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -119,17 +119,6 @@ xf86BusConfig(void)
* instance of the hardware found.
*/
for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xorgHWAccess) {
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
xf86CallDriverProbe(xf86DriverList[i], FALSE);
}
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 6f69117..6c5e359 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -545,41 +545,16 @@ DoConfigure(void)
free(vlist);
- for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags)) {
- xorgHWAccess = TRUE;
- break;
- }
- }
- /* Enable full I/O access */
- if (xorgHWAccess) {
- if (!xf86EnableIO())
- /* oops, we have failed */
- xorgHWAccess = FALSE;
- }
+ xorgHWAccess = xf86EnableIO();
/* Create XF86Config file structure */
xf86config = calloc(1, sizeof(XF86ConfigRec));
/* Call all of the probe functions, reporting the results. */
for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) {
- xorgHWFlags flags;
Bool found_screen;
DriverRec *const drv = xf86DriverList[CurrentDriver];
- if (!xorgHWAccess) {
- if (!drv->driverFunc
- || !drv->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
found_screen = xf86CallDriverProbe(drv, TRUE);
if (found_screen && drv->Identify) {
(*drv->Identify) (0);
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index ca6efd4..581579e 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -527,23 +527,22 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
*/
for (i = 0; i < xf86NumDrivers; i++) {
+ xorgHWFlags flags = HW_IO;
+
if (xf86DriverList[i]->Identify != NULL)
xf86DriverList[i]->Identify(0);
- if (!xorgHWAccess || !xorgHWOpenConsole) {
- xorgHWFlags flags;
+ if (xf86DriverList[i]->driverFunc)
+ xf86DriverList[i]->driverFunc(NULL,
+ GET_REQUIRED_HW_INTERFACES,
+ &flags);
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags))
- flags = HW_IO;
+ /* this is "do we want it" at this point */
+ if (NEED_IO_ENABLED(flags))
+ xorgHWAccess = TRUE;
- if (NEED_IO_ENABLED(flags))
- xorgHWAccess = TRUE;
- if (!(flags & HW_SKIP_CONSOLE))
- xorgHWOpenConsole = TRUE;
- }
+ if (!(flags & HW_SKIP_CONSOLE))
+ xorgHWOpenConsole = TRUE;
}
if (xorgHWOpenConsole)
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 42a3b30..aeca2a9 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -91,7 +91,6 @@ extern _X_EXPORT int xf86NumScreens;
extern _X_EXPORT const char *xf86VisualNames[];
extern _X_EXPORT int xf86Verbose; /* verbosity level */
extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */
-extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
--
1.7.7.6

View File

@ -1 +1 @@
6619f5c0e1086b57888ff7146e8ed5897b50d440
6703a7c7cf1a349c137e247a0c8eb462ff7b07be

View File

@ -6,7 +6,14 @@
mkdir -p abi-rebuild
pushd abi-rebuild
repoquery --qf="%{name}" --whatrequires xserver-abi\* | xargs -n 1 fedpkg co
fedpkg co xorg-x11-drivers
pushd xorg-x11-drivers
driverlist=$(grep ^Requires *.spec | awk '{ print $2 }')
popd
rm -rf xorg-x11-drivers
echo $driverlist | xargs -n1 fedpkg co
for i in */ ; do
[ -e $i/dead.package ] && continue
pushd $i

View File

@ -6,11 +6,10 @@
# If you need to add a patch to the server, just do it like a normal git
# operation, dump it with git-format-patch to a file in the standard naming
# format, and add a PatchN: line. If you want to push something upstream,
# check out the master branch, pull, cherry-pick, and push. FIXME describe
# rebasing, add convenience 'make' targets maybe.
# check out the master branch, pull, cherry-pick, and push.
#global gitdate 20120822
%global stable_abi 1
%global gitdate 20130109
%global stable_abi 0
%if !0%{?gitdate} || %{stable_abi}
# Released ABI versions. Have to keep these manually in sync with the
@ -42,7 +41,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.13.1
Version: 1.13.99.901
Release: 1%{?gitdate:.%{gitdate}}%{dist}
URL: http://www.x.org
License: MIT
@ -92,9 +91,6 @@ Patch7013: xserver-1.12-Xext-fix-selinux-build-failure.patch
# needed when building without xorg (aka s390x)
Patch7017: xserver-1.12.2-xorg-touch-test.patch
Patch7022: 0001-linux-Refactor-xf86-En-Dis-ableIO.patch
Patch7023: 0002-linux-Make-failure-to-iopl-non-fatal.patch
Patch7024: 0003-xfree86-Change-the-semantics-of-driverFunc-GET_REQUI.patch
Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch
# do not upstream - do not even use here yet
@ -102,15 +98,9 @@ Patch7027: xserver-autobind-hotplug.patch
Patch7052: 0001-xf86-return-NULL-for-compat-output-if-no-outputs.patch
# kernel doesn't use _INPUT_H anymore
Patch7060: 0001-xf86-Fix-build-against-recent-Linux-kernel.patch
# Fix non-PCI configuration-less setups - broken
#Patch7061: v2-xf86-Fix-non-PCI-configuration-less-setups.patch
# Bug 878956 - After installation is complete, Alt+F4 is broken
Patch7063: 0001-linux-Prefer-ioctl-KDSKBMUTE-1-over-ioctl-KDSKBMODE-.patch
# mustard: make the default queue length bigger to calm abrt down
Patch7064: 0001-mieq-Bump-default-queue-size-to-512.patch
@ -592,6 +582,9 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
* Wed Jan 09 2013 Adam Jackson <ajax@redhat.com> 1.13.99.901-1
- xserver 1.14RC1
* Tue Dec 18 2012 Peter Hutterer <peter.hutterer@redhat.com> 1.13.1-1
- server 1.13.1