[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'ubuntu'



 debian/changelog                                    |    4 
 debian/patches/150_config_file_preferred_mode.patch |  126 ++++++++++++++++++++
 debian/patches/series                               |    1 
 3 files changed, 130 insertions(+), 1 deletion(-)

New commits:
commit 112ec55f878fd82b9f937bb29c62f6565404b6ff
Author: Bryce Harrington <bryce@bryce@bryceharrington.org>
Date:   Thu Feb 14 17:12:02 2008 -0800

    Adding other patch found by Tormod, to permit users to override the
    monitor's normal preferred mode.

diff --git a/debian/changelog b/debian/changelog
index 7f1ece7..759cd2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,13 @@
 xorg-server (2:1.4.1~git20080131-1ubuntu3) UNRELEASED; urgency=low
 
   [Bryce Harrington]
+  * Add 150_config_file_preferred_mode.patch to make user-specified modes
+    preferred when set in xorg.conf.  (LP: #151311)
   * Add 149_add_quirks_for_physical_screen_size_issues.patch to help
     address various common EDID issues (like monitors that report in
     centimeters instead of millimeters, etc.)  (LP: #151311)
 
- -- Bryce Harrington <bryce@ubuntu.com>  Thu, 14 Feb 2008 16:23:47 -0800
+ -- Bryce Harrington <bryce@ubuntu.com>  Thu, 14 Feb 2008 17:10:05 -0800
 
 xorg-server (2:1.4.1~git20080131-1ubuntu2) hardy; urgency=low
 
diff --git a/debian/patches/150_config_file_preferred_mode.patch b/debian/patches/150_config_file_preferred_mode.patch
new file mode 100644
index 0000000..b9b8bb6
--- /dev/null
+++ b/debian/patches/150_config_file_preferred_mode.patch
@@ -0,0 +1,126 @@
+From: Keith Packard <keithp@koto.keithp.com>
+Date: Wed, 17 Oct 2007 03:42:28 +0000 (+0800)
+Subject: Make config file preferred mode override monitor preferred mode.
+X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=feac0759522cbdc3e61ccfa373df735903c5cb27
+
+Make config file preferred mode override monitor preferred mode.
+
+Add a new even-more-preferred bit to each mode which is used to make config
+file preferences selected instead of the monitor preferred mode.
+---
+
+--- a/hw/xfree86/common/xf86str.h
++++ b/hw/xfree86/common/xf86str.h
+@@ -142,6 +142,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 {
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -711,7 +711,8 @@ xf86DefaultMode (xf86OutputPtr output, i
+     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, 
+ 			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 sc
+     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 sc
+     }
+     
+     /*
+-     * 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];
+--- 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 8e6819e..25a6849 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -43,3 +43,4 @@
 147_X86EMU-pass-the-correct-bus-dev-fn-tag-to-pci-emula.patch
 148_dix_touchscreen_fixes.diff
 149_add_quirks_for_physical_screen_size_issues.patch
+150_config_file_preferred_mode.patch


Reply to: