xorg-server: Changes to 'debian-experimental'
debian/changelog | 9
debian/patches/42_fix_RemoveGeneralSocket_crash_from_dbus.diff | 31 ++
debian/patches/43_allow_override_BIOS_EDID_preferred_mode.diff | 131 ++++++++++
debian/patches/series | 2
4 files changed, 173 insertions(+)
New commits:
commit 06e8717973958e5d450519067f3f0c8165b6d159
Author: Brice Goglin <bgoglin@debian.org>
Date: Sat Sep 15 01:33:31 2007 +0200
Add 42_fix_RemoveGeneralSocket_crash_from_dbus.diff and 43_allow_override_BIOS_EDID_preferred_mode.diff
diff --git a/debian/changelog b/debian/changelog
index 4b12eea..88f851f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xorg-server (2:1.4-2) UNRELEASED; urgency=low
+
+ * Add 42_fix_RemoveGeneralSocket_crash_from_dbus.diff to fix a crash
+ when leaving, closes: #440547.
+ * Add 43_allow_override_BIOS_EDID_preferred_mode.diff to allow overriding
+ BIOD/EDID preferred mode with Option PreferredMode in the config file.
+
+ -- Brice Goglin <bgoglin@debian.org> Sat, 15 Sep 2007 01:27:55 +0200
+
xorg-server (2:1.4-1) experimental; urgency=low
* New upstream release (X.Org 7.3)
diff --git a/debian/patches/42_fix_RemoveGeneralSocket_crash_from_dbus.diff b/debian/patches/42_fix_RemoveGeneralSocket_crash_from_dbus.diff
new file mode 100644
index 0000000..eda334e
--- /dev/null
+++ b/debian/patches/42_fix_RemoveGeneralSocket_crash_from_dbus.diff
@@ -0,0 +1,31 @@
+From: Julien Cristau <jcristau@debian.org>
+Date: Thu, 6 Sep 2007 22:20:24 +0200
+Subject: [PATCH] config/dbus: don't call RemoveGeneralSocket if bus_info.fd == -1
+
+Fixes a crash reported at:
+http://bugs.freedesktop.org/show_bug.cgi?id=12291
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440547
+---
+ config/dbus-core.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/config/dbus-core.c b/config/dbus-core.c
+index 2888159..d220cea 100644
+--- a/config/dbus-core.c
++++ b/config/dbus-core.c
+@@ -87,8 +87,10 @@ teardown(void)
+ dbus_connection_unref(bus_info.connection);
+
+ RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
+- RemoveGeneralSocket(bus_info.fd);
+- bus_info.fd = -1;
++ if (bus_info.fd >= 0) {
++ RemoveGeneralSocket(bus_info.fd);
++ bus_info.fd = -1;
++ }
+ bus_info.connection = NULL;
+
+ for (hook = bus_info.hooks; hook; hook = hook->next) {
+--
+1.5.3.1
+
diff --git a/debian/patches/43_allow_override_BIOS_EDID_preferred_mode.diff b/debian/patches/43_allow_override_BIOS_EDID_preferred_mode.diff
new file mode 100644
index 0000000..b084669
--- /dev/null
+++ b/debian/patches/43_allow_override_BIOS_EDID_preferred_mode.diff
@@ -0,0 +1,131 @@
+https://bugs.freedesktop.org/show_bug.cgi?id=10625
+
+From Keith Packard.
+Prefers user-specified PreferredMode over EDID/BIOS specified preferred modes.
+It should cause the config file to override the EDID/BIOS detected preferred modes.
+
+# modified: hw/xfree86/common/xf86str.h
+# modified: hw/xfree86/modes/xf86Crtc.c
+# modified: hw/xfree86/modes/xf86Crtc.h
+#
+diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
+index 086d2bf..31b6343 100644
+--- a/hw/xfree86/common/xf86str.h
++++ b/hw/xfree86/common/xf86str.h
+@@ -132,6 +132,7 @@ typedef enum {
+ # define M_T_DEFAULT 0x10 /* (VESA) default modes */
+ # define M_T_USERDEF 0x20 /* One of the modes from the config file */
+ # define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */
++# define M_T_USERPREF 0x80 /* mode preferred by the user config */
+
+ /* Video mode */
+ typedef struct _DisplayModeRec {
+diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
+index d375da8..7196a2e 100644
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -711,7 +711,8 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
+ for (mode = output->probed_modes; mode; mode = mode->next)
+ {
+ int dpi;
+- int preferred = (mode->type & M_T_PREFERRED) != 0;
++ int preferred = (((mode->type & M_T_PREFERRED) != 0) +
++ ((mode->type & M_T_USERPREF) != 0));
+ int diff;
+
+ if (xf86ModeWidth (mode, output->initial_rotation) > width ||
+@@ -1415,7 +1416,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
+ mode->prev = NULL;
+ output->probed_modes = mode;
+ }
+- mode->type |= M_T_PREFERRED;
++ mode->type |= (M_T_PREFERRED|M_T_USERPREF);
+ }
+ else
+ mode->type &= ~M_T_PREFERRED;
+@@ -1532,6 +1533,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+ int o, c;
+ DisplayModePtr target_mode = NULL;
++ int target_preferred = 0;
+ Rotation target_rotation = RR_Rotate_0;
+ xf86CrtcPtr *crtcs;
+ DisplayModePtr *modes;
+@@ -1572,43 +1574,34 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
+ }
+
+ /*
+- * Let outputs with preferred modes drive screen size
++ * User preferred > preferred > other modes
+ */
+ for (o = 0; o < config->num_output; o++)
+ {
+- xf86OutputPtr output = config->output[o];
++ xf86OutputPtr output = config->output[o];
++ DisplayModePtr default_mode;
++ int default_preferred;
+
+- if (enabled[o] &&
+- xf86OutputHasPreferredMode (output, width, height))
++ if (!enabled[o])
++ continue;
++ default_mode = xf86DefaultMode (output, width, height);
++ if (!default_mode)
++ continue;
++ default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) +
++ ((default_mode->type & M_T_USERPREF) != 0));
++ if (default_preferred > target_preferred || !target_mode)
+ {
+- target_mode = xf86DefaultMode (output, width, height);
++ target_mode = default_mode;
++ target_preferred = default_preferred;
+ target_rotation = output->initial_rotation;
+- if (target_mode)
+- {
+- modes[o] = target_mode;
+- config->compat_output = o;
+- break;
+- }
+- }
+- }
+- if (!target_mode)
+- {
+- for (o = 0; o < config->num_output; o++)
+- {
+- xf86OutputPtr output = config->output[o];
+- if (enabled[o])
+- {
+- target_mode = xf86DefaultMode (output, width, height);
+- target_rotation = output->initial_rotation;
+- if (target_mode)
+- {
+- modes[o] = target_mode;
+- config->compat_output = o;
+- break;
+- }
+- }
++ config->compat_output = o;
+ }
+ }
++ if (target_mode)
++ modes[config->compat_output] = target_mode;
++ /*
++ * Fill in other output modes
++ */
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
+index 9693e12..4c843cd 100644
+--- a/hw/xfree86/modes/xf86Crtc.h
++++ b/hw/xfree86/modes/xf86Crtc.h
+@@ -39,6 +39,9 @@
+ #ifndef M_T_DRIVER
+ #define M_T_DRIVER 0x40
+ #endif
++#ifndef M_T_USERPREF
++#define M_T_USERPREF 0x80
++#endif
+ #ifndef HARDWARE_CURSOR_ARGB
+ #define HARDWARE_CURSOR_ARGB 0x00004000
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index b06baee..beda004 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,8 @@
13_debian_add_xkbpath_env_variable.diff
21_glx_align_fixes.patch
41_vbe_filter_less.diff
+42_fix_RemoveGeneralSocket_crash_from_dbus.diff
+43_allow_override_BIOS_EDID_preferred_mode.diff
#47_fbdevhw_magic_numbers.diff
#48_disable_type1.diff
#51_xkb-and-loathing.diff
Reply to: