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

xorg-server: Changes to 'upstream-unstable'



 GL/glx/glxdri.c                                                                 |    6 
 GL/glx/indirect_dispatch_swap.c                                                 |    2 
 GL/glx/indirect_program.c                                                       |    2 
 GL/glx/indirect_texture_compression.c                                           |    2 
 GL/glx/swap_interval.c                                                          |    2 
 Xext/xcmisc.c                                                                   |   13 
 configure.ac                                                                    |   40 
 dev/null                                                                        |binary
 exa/exa_accel.c                                                                 |    8 
 exa/exa_render.c                                                                |   18 
 hw/kdrive/ephyr/ephyr.c                                                         |   25 
 hw/xfree86/Makefile.am                                                          |    8 
 hw/xfree86/common/compiler.h                                                    |    4 
 hw/xfree86/common/xf86.h                                                        |    2 
 hw/xfree86/common/xf86Bus.c                                                     |    8 
 hw/xfree86/common/xf86Bus.h                                                     |    2 
 hw/xfree86/common/xf86Configure.c                                               |    8 
 hw/xfree86/common/xf86Module.h                                                  |    2 
 hw/xfree86/common/xf86PciInfo.h                                                 |    4 
 hw/xfree86/common/xf86xv.c                                                      |   66 
 hw/xfree86/common/xf86xv.h                                                      |    3 
 hw/xfree86/common/xf86xvpriv.h                                                  |    1 
 hw/xfree86/ddc/Makefile.am                                                      |    5 
 hw/xfree86/ddc/ddcProperty.c                                                    |    1 
 hw/xfree86/ddc/xf86DDC.c                                                        |   11 
 hw/xfree86/doc/README.modes                                                     |  474 ++
 hw/xfree86/fbdevhw/fbdevhw.c                                                    |  160 
 hw/xfree86/i2c/Makefile.am                                                      |    5 
 hw/xfree86/loader/Makefile.am                                                   |    3 
 hw/xfree86/loader/loadmod.c                                                     |   25 
 hw/xfree86/loader/xf86sym.c                                                     |   97 
 hw/xfree86/modes/Makefile.am                                                    |   29 
 hw/xfree86/modes/xf86Crtc.c                                                     | 2099 ++++++++++
 hw/xfree86/modes/xf86Crtc.h                                                     |  746 +++
 hw/xfree86/modes/xf86Cursors.c                                                  |  607 ++
 hw/xfree86/modes/xf86DiDGA.c                                                    |  286 +
 hw/xfree86/modes/xf86EdidModes.c                                                |  353 +
 hw/xfree86/modes/xf86Modes.c                                                    |  664 +++
 hw/xfree86/modes/xf86Modes.h                                                    |   98 
 hw/xfree86/modes/xf86RandR12.c                                                  | 1110 +++++
 hw/xfree86/modes/xf86RandR12.h                                                  |   38 
 hw/xfree86/modes/xf86Rename.h                                                   |   84 
 hw/xfree86/modes/xf86Rotate.c                                                   |  476 ++
 hw/xfree86/modes/xf86cvt.c                                                      |  308 +
 hw/xfree86/os-support/xf86_OSlib.h                                              |    2 
 hw/xfree86/parser/Makefile.am                                                   |    4 
 hw/xfree86/ramdac/Makefile.am                                                   |    6 
 hw/xfree86/ramdac/xf86Cursor.c                                                  |    3 
 hw/xfree86/ramdac/xf86Cursor.h                                                  |    3 
 hw/xfree86/utils/xorgcfg/loadmod.c                                              |    2 
 hw/xfree86/utils/xorgcfg/text-mode.c                                            |    1 
 hw/xfree86/utils/xorgconfig/Cards                                               |    5 
 hw/xfree86/x86emu/ops2.c                                                        |   36 
 hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am                 |   10 
 hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am                   |   10 
 hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am                     |    7 
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf          |binary
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf      |binary
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf          |binary
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf         |binary
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCenturySchlbk-Bold.pmf       |    0 
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCenturySchlbk-BoldItalic.pmf |    0 
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCenturySchlbk-Italic.pmf     |    0 
 hw/xprint/config/C/print/models/PSdefault/fonts/NewCenturySchlbk-Roman.pmf      |    0 
 hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am                      |    2 
 os/WaitFor.c                                                                    |    9 
 os/connection.c                                                                 |    2 
 randr/mirandr.c                                                                 |   28 
 randr/randr.c                                                                   |    2 
 randr/randrstr.h                                                                |   62 
 randr/rrcrtc.c                                                                  |  206 
 randr/rrinfo.c                                                                  |   17 
 randr/rrmode.c                                                                  |  218 -
 randr/rroutput.c                                                                |  150 
 randr/rrproperty.c                                                              |  186 
 randr/rrscreen.c                                                                |   91 
 xfixes/cursor.c                                                                 |    3 
 xfixes/select.c                                                                 |    4 
 78 files changed, 8535 insertions(+), 439 deletions(-)

New commits:
commit f9a0b936600cd2665a90e6ddcd5a6bfe7a88f6e9
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 19:09:43 2007 -0700

    Update version to 1.3.0.0

diff --git a/configure.ac b/configure.ac
index 360419c..9e3c0a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure.
 AC_PREREQ(2.57)
 dnl This is the not the Xorg version number, it's the server version number.
 dnl Yes, that's weird.
-AC_INIT([xorg-server], 1.2.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.3.0.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
@@ -38,10 +38,10 @@ dnl
 DEFAULT_VENDOR_NAME="The X.Org Foundation"
 DEFAULT_VENDOR_NAME_SHORT="X.Org"
 DEFAULT_VERSION_MAJOR=1
-DEFAULT_VERSION_MINOR=2
-DEFAULT_VERSION_PATCH=99
-DEFAULT_VERSION_SNAP=905
-DEFAULT_RELEASE_DATE="05 April 2007"
+DEFAULT_VERSION_MINOR=3
+DEFAULT_VERSION_PATCH=0
+DEFAULT_VERSION_SNAP=0
+DEFAULT_RELEASE_DATE="19 April 2007"
 DEFAULT_VENDOR_WEB="http://wiki.x.org";
 
 dnl this gets generated by autoheader, and thus contains all the defines.  we

commit 05e1c45ade9c558820685bfd2541617a2e8de816
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 17:39:51 2007 -0700

    Disable SourceValidate in rotation to capture cursor.
    
    SourceValidate is used exclusively by the software cursor code to pull the
    cursor off of the screen before using the screen as a source operand. This
    eliminates the software cursor from the frame buffer while painting the
    rotated image though. Disabling this function by temporarily setting the
    screen function pointer to NULL causes the cursor image to be captured.

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 94f95a0..359501e 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -278,8 +278,18 @@ xf86RotateRedisplay(ScreenPtr pScreen)
     region = DamageRegion(damage);
     if (REGION_NOTEMPTY(pScreen, region)) 
     {
-	int		    c;
-	
+	int			c;
+	SourceValidateProcPtr	SourceValidate;
+
+	/*
+	 * SourceValidate is used by the software cursor code
+	 * to pull the cursor off of the screen when reading
+	 * bits from the frame buffer. Bypassing this function
+	 * leaves the software cursor in place
+	 */
+	SourceValidate = pScreen->SourceValidate;
+	pScreen->SourceValidate = NULL;
+
 	for (c = 0; c < xf86_config->num_crtc; c++)
 	{
 	    xf86CrtcPtr	    crtc = xf86_config->crtc[c];
@@ -304,6 +314,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
 		REGION_UNINIT (pScreen, &crtc_damage);
 	    }
 	}
+	pScreen->SourceValidate = SourceValidate;
 	DamageEmpty(damage);
     }
 }

commit 8b217dee3a6c46b13fc9571a4a9a95bc55686cdb
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Apr 19 17:37:18 2007 -0700

    Was accidentally disabling rotation updates in mode set.
    
    Setting a mode on an unrotated CRTC was causing all of the rotation updates
    to be disabled; the loop looking for active rotation wasn't actually looking
    at each crtc, it was looking at the modified crtc many times.

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e8fafd0..94f95a0 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -284,7 +284,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
 	{
 	    xf86CrtcPtr	    crtc = xf86_config->crtc[c];
 
-	    if (crtc->rotation != RR_Rotate_0)
+	    if (crtc->rotation != RR_Rotate_0 && crtc->enabled)
 	    {
 		BoxRec	    box;
 		RegionRec   crtc_damage;
@@ -338,7 +338,8 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
     }
 
     for (c = 0; c < xf86_config->num_crtc; c++)
-	if (crtc->rotatedPixmap || crtc->rotatedData)
+	if (xf86_config->crtc[c]->rotatedPixmap ||
+	    xf86_config->crtc[c]->rotatedData)
 	    return;
 
     /*

commit a63704f14a1d97b9a00fef6fa290e74e51b9732b
Author: Erik Andrén <erik.andren@gmail.com>
Date:   Tue Apr 17 21:34:47 2007 -0700

    Syncmaster 226 monitor needs 60Hz refresh (#10545).
    
    I've managed to solve my own bug (#10545) by applying the following
    patch to the xserver.
    
    Please apply.
    
    <Conspiracy mode on>
    This monitor is "Vista Certified". I wonder if this is a pure coincidence...
    <Conspiracy mode off>
    
    With kind regards
    Erik Andrén

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index b6689bb..edcd636 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -86,6 +86,11 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
     if (memcmp (DDC->vendor.name, "ACR", 4) == 0 &&
 	DDC->vendor.prod_id == 44358)
 	return TRUE;
+
+    /* Samsung SyncMaster 226BW */
+    if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
+	DDC->vendor.prod_id == 638)
+	return TRUE;
     
     return FALSE;
 }

commit a3d73ba2cb7e13a6d129cd88d6a7f7d756e2ced2
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 16 09:55:58 2007 -0700

    Allow outputs to be explicitly enabled in config, overriding detect.
    
    Option "Enable" "True" will force the server to enable an output at startup
    time, even if the output is not connected. This also causes the default
    modes to be added for this output, allowing even sync ranges to be used to
    pick out standard modes.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6366222..b293639 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -427,15 +427,29 @@ xf86OutputSetMonitor (xf86OutputPtr output)
 }
 
 static Bool
-xf86OutputEnabled (xf86OutputPtr    output)
+xf86OutputEnabled (xf86OutputPtr output)
 {
-    /* Check to see if this output was disabled in the config file */
-    if (xf86ReturnOptValBool (output->options, OPTION_ENABLE, TRUE) == FALSE ||
-	xf86ReturnOptValBool (output->options, OPTION_DISABLE, FALSE) == TRUE)
+    Bool    enable, disable;
+
+    /* check to see if this output was enabled in the config file */
+    if (xf86GetOptValBool (output->options, OPTION_ENABLE, &enable) && enable)
+    {
+	xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
+		    "Output %s enabled by config file\n", output->name);
+	return TRUE;
+    }
+    /* or if this output was disabled in the config file */
+    if (xf86GetOptValBool (output->options, OPTION_DISABLE, &disable) && disable)
     {
+	xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
+		    "Output %s disabled by config file\n", output->name);
 	return FALSE;
     }
-    return TRUE;
+    /* otherwise, enable if it is not disconnected */
+    enable = output->status != XF86OutputStatusDisconnected;
+    xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
+    	    "Output %s %sconnected\n", output->name, enable ? "" : "dis");
+    return enable;
 }
 
 static Bool
@@ -1225,7 +1239,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	 */
 	output->status = (*output->funcs->detect)(output);
 
-	if (output->status == XF86OutputStatusDisconnected)
+	if (!xf86OutputEnabled (output))
 	{
 	    xf86OutputSetEDID (output, NULL);
 	    continue;
@@ -1527,8 +1541,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
 	xf86OutputPtr output = config->output[o];
 	
 	modes[o] = NULL;
-	enabled[o] = (xf86OutputEnabled (output) &&
-		      output->status != XF86OutputStatusDisconnected);
+	enabled[o] = xf86OutputEnabled (output);
     }
     
     /*
@@ -1573,8 +1586,20 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
     {
 	xf86OutputPtr output = config->output[o];
 	
-	if (enabled[o] && !modes[o])
-	    modes[o] = xf86ClosestMode (output, target_mode, target_rotation, width, height);
+	if (enabled[o])
+	{
+	    if (!modes[o])
+		modes[o] = xf86ClosestMode (output, target_mode,
+					    target_rotation, width, height);
+	    if (!modes[o])
+		xf86DrvMsg (scrn->scrnIndex, X_ERROR,
+			    "Output %s enabled but has no modes\n",
+			    output->name);
+	    else
+		xf86DrvMsg (scrn->scrnIndex, X_INFO,
+			    "Output %s using initial mode %s\n",
+			    output->name, modes[o]->name);
+	}
     }
 
     /*

commit f4a8e54caf6b9431711383a39f55a18e7fd654f4
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 16 09:53:42 2007 -0700

    Use default screen monitor for one of the outputs.
    
    By default, use the screen monitor section for output 0, however, a driver
    can change which output gets the screen monitor by calling
    xf86OutputUseScreenMonitor.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index eba32e4..6366222 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -405,10 +405,25 @@ xf86OutputSetMonitor (xf86OutputPtr output)
     xfree (option_name);
     output->conf_monitor = xf86findMonitor (monitor,
 					    xf86configptr->conf_monitor_lst);
+    /*
+     * Find the monitor section of the screen and use that
+     */
+    if (!output->conf_monitor && output->use_screen_monitor)
+	output->conf_monitor = xf86findMonitor (output->scrn->monitor->id,
+						xf86configptr->conf_monitor_lst);
     if (output->conf_monitor)
+    {
+	xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
+		    "Output %s using monitor section %s\n",
+		    output->name, output->conf_monitor->mon_identifier);
 	xf86ProcessOptions (output->scrn->scrnIndex,
 			    output->conf_monitor->mon_option_lst,
 			    output->options);
+    }
+    else
+	xf86DrvMsg (output->scrn->scrnIndex, X_INFO,
+		    "Output %s has no monitor section\n",
+		    output->name);
 }
 
 static Bool
@@ -454,7 +469,7 @@ xf86OutputInitialRotation (xf86OutputPtr output)
 
 xf86OutputPtr
 xf86OutputCreate (ScrnInfoPtr		    scrn,
-		  const xf86OutputFuncsRec *funcs,
+		  const xf86OutputFuncsRec  *funcs,
 		  const char		    *name)
 {
     xf86OutputPtr	output, *outputs;
@@ -477,6 +492,10 @@ xf86OutputCreate (ScrnInfoPtr		    scrn,
 	strcpy (output->name, name);
     }
     output->subpixel_order = SubPixelUnknown;
+    /*
+     * Use the old per-screen monitor section for the first output
+     */
+    output->use_screen_monitor = (xf86_config->num_output == 0);
 #ifdef RANDR_12_INTERFACE
     output->randr_output = NULL;
 #endif
@@ -528,6 +547,16 @@ xf86OutputRename (xf86OutputPtr output, const char *name)
 }
 
 void
+xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor)
+{
+    if (use_screen_monitor != output->use_screen_monitor)
+    {
+	output->use_screen_monitor = use_screen_monitor;
+	xf86OutputSetMonitor (output);
+    }
+}
+
+void
 xf86OutputDestroy (xf86OutputPtr output)
 {
     ScrnInfoPtr		scrn = output->scrn;
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 42daf60..e64ce1e 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -479,6 +479,9 @@ struct _xf86Output {
     /** driver private information */
     void		*driver_private;
     
+    /** Whether to use the old per-screen Monitor config section */
+    Bool		use_screen_monitor;
+
 #ifdef RANDR_12_INTERFACE
     /**
      * RandR 1.2 output structure.
@@ -611,9 +614,12 @@ xf86CrtcInUse (xf86CrtcPtr crtc);
  * Output functions
  */
 xf86OutputPtr
-xf86OutputCreate (ScrnInfoPtr		scrn,
-		      const xf86OutputFuncsRec *funcs,
-		      const char	*name);
+xf86OutputCreate (ScrnInfoPtr		    scrn,
+		  const xf86OutputFuncsRec  *funcs,
+		  const char		    *name);
+
+void
+xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor);
 
 Bool
 xf86OutputRename (xf86OutputPtr output, const char *name);

commit 00cfd1f765895b4d1b2234f3203727a8871b64b0
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 16 09:39:47 2007 -0700

    typo in built-in module log message

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index c220d8a..6f8f871 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -869,7 +869,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
     for (cim = compiled_in_modules; *cim; cim++)
 	if (!strcmp (module, *cim))
 	{
-	    xf86MsgVerb(X_INFO, 3, "Module alread ybuilt-in");
+	    xf86MsgVerb(X_INFO, 0, "Module already built-in\n");
 	    return (ModuleDescPtr) 1;
 	}
 

commit e2e7c47a528447e90cff6cf10d2ce457742ef48d
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Sun Apr 15 22:59:19 2007 -0300

    RandR 1.2 spec says CRTC info contains screen-relative geometry.
    
    Was reporting mode size instead of adjusting for rotation.

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 1a2a3a7..63da829 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -518,6 +518,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
     RROutput			*outputs;
     RROutput			*possible;
     int				i, j, k, n;
+    int				width, height;
     
     REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
     crtc = LookupCrtc(client, stuff->crtc, SecurityReadAccess);
@@ -540,8 +541,9 @@ ProcRRGetCrtcInfo (ClientPtr client)
     rep.timestamp = pScrPriv->lastSetTime.milliseconds;
     rep.x = crtc->x;
     rep.y = crtc->y;
-    rep.width = mode ? mode->mode.width : 0;
-    rep.height = mode ? mode->mode.height : 0;
+    RRCrtcGetScanoutSize (crtc, &width, &height);
+    rep.width = width;
+    rep.height = height;
     rep.mode = mode ? mode->mode.id : 0;
     rep.rotation = crtc->rotation;
     rep.rotations = crtc->rotations;

commit 1328a288e9030a472a915077160f090d1afd4126
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Fri Apr 13 15:04:29 2007 -0300

    Add quirk for Acer AL1706 monitor to force 60hz refresh.
    
    This Acer monitor reports support for 75hz refresh via EDID, and yet when
    that rate is delivered, the monitor does not sync and reports out of range.
    Use the existing 60hz quirk for this monitor.

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 77c0c87..b6689bb 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -82,6 +82,11 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
 	DDC->vendor.prod_id == 1516)
 	return TRUE;
     
+    /* Acer AL1706 */
+    if (memcmp (DDC->vendor.name, "ACR", 4) == 0 &&
+	DDC->vendor.prod_id == 44358)
+	return TRUE;
+    
     return FALSE;
 }
 

commit efcec7dbd3c2736c7b421d29c4d37e231aa681d2
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 9 14:29:46 2007 -0700

    Rotate screen size as needed from RandR 1.1 change requests.
    
    Screen size must reflect rotated mode size when setting rotated mode using
    RandR 1.1 SetScreenConfig request.

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 8aa26fa..f2981b0 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -741,6 +741,7 @@ ProcRRSetScreenConfig (ClientPtr client)
     RRModePtr		    mode;
     RR10DataPtr		    pData = NULL;
     RRScreenSizePtr    	    pSize;
+    int			    width, height;
     
     UpdateCurrentTime ();
 
@@ -882,8 +883,14 @@ ProcRRSetScreenConfig (ClientPtr client)
      * If the screen size is changing, adjust all of the other outputs
      * to fit the new size, mirroring as much as possible
      */
-    if (mode->mode.width != pScreen->width || 
-	mode->mode.height != pScreen->height)
+    width = mode->mode.width;
+    height = mode->mode.height;
+    if (rotation & (RR_Rotate_90|RR_Rotate_270))
+    {
+	width = mode->mode.height;
+	height = mode->mode.width;
+    }
+    if (width != pScreen->width || height != pScreen->height)
     {
 	int	c;
 
@@ -897,7 +904,7 @@ ProcRRSetScreenConfig (ClientPtr client)
 		goto sendReply;
 	    }
 	}
-	if (!RRScreenSizeSet (pScreen, mode->mode.width, mode->mode.height,
+	if (!RRScreenSizeSet (pScreen, width, height,
 			      pScreen->mmWidth, pScreen->mmHeight))
 	{
 	    rep.status = RRSetConfigFailed;

commit dc6c4f6989f87149d8605604f4514f5cbf11de67
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 9 14:12:27 2007 -0700

    Disable CRTC when SetSingleMode has no matching mode. Update RandR as well.
    
    xf86SetSingleMode tries to resize all crtcs to match the selected mode. When
    a CRTC has no matching mode, it now disables the CRTC (instead of crashing).
    
    Also, poke the RandR extension when xf86SetSingleMode is done so that
    appropriate events can be delivered, and so that future RandR queries return
    correct information.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 325fb64..eba32e4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -233,8 +233,6 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
     int			saved_x, saved_y;
     Rotation		saved_rotation;
 
-    adjusted_mode = xf86DuplicateMode(mode);
-
     crtc->enabled = xf86CrtcInUse (crtc);
     
     if (!crtc->enabled)
@@ -243,6 +241,8 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
 	return TRUE;
     }
 
+    adjusted_mode = xf86DuplicateMode(mode);
+
     didLock = crtc->funcs->lock (crtc);
 
     saved_mode = crtc->mode;
@@ -1817,6 +1817,11 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
 	    else
 		crtc_mode = xf86OutputFindClosestMode (output, desired);
 	}
+	if (!crtc_mode)
+	{
+	    crtc->enabled = FALSE;
+	    continue;
+	}
 	if (!xf86CrtcSetMode (crtc, crtc_mode, rotation, 0, 0))
 	    ok = FALSE;
 	else
@@ -1828,6 +1833,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
 	}
     }
     xf86DisableUnusedFunctions(pScrn);
+    xf86RandR12TellChanged (pScrn->pScreen);
     return ok;
 }
 
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 6f52ee2..90de585 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1048,6 +1048,28 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen)
     return TRUE;
 }
 
+/*
+ * Something happened within the screen configuration due
+ * to DGA, VidMode or hot key. Tell RandR
+ */
+
+void
+xf86RandR12TellChanged (ScreenPtr pScreen)
+{
+    ScrnInfoPtr		pScrn = xf86Screens[pScreen->myNum];
+    xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(pScrn);
+    XF86RandRInfoPtr	randrp = XF86RANDRINFO(pScreen);
+    int			c;
+
+    if (!randrp)
+	return;
+    xf86RandR12SetInfo12 (pScreen);
+    for (c = 0; c < config->num_crtc; c++)
+	xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc);
+
+    RRTellChanged (pScreen);
+}
+
 static void
 xf86RandR12PointerMoved (int scrnIndex, int x, int y)
 {
diff --git a/hw/xfree86/modes/xf86RandR12.h b/hw/xfree86/modes/xf86RandR12.h
index 8a4668b..0d3346a 100644
--- a/hw/xfree86/modes/xf86RandR12.h
+++ b/hw/xfree86/modes/xf86RandR12.h
@@ -33,5 +33,6 @@ Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate,
 Rotation xf86RandR12GetRotation(ScreenPtr pScreen);
 void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y);
 Bool xf86RandR12PreInit (ScrnInfoPtr pScrn);
+void xf86RandR12TellChanged (ScreenPtr pScreen);
 
 #endif /* _XF86_RANDR_H_ */

commit 7cf3a0e0b954cc3bfdf158cdc1ca145d1620fe0c
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Apr 9 12:30:31 2007 -0700

    In AIGLX EnterVT processing, invoke driver EnterVT before resuming glx.
    
    As the driver EnterVT function generally re-enables the hardware and
    prepares it for rendering, it must be called before any gl functions are
    called which could touch the hardware.
    (cherry picked from commit f24391dbfd12a84253dfec794ee7884afd52e197)

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 36464a6..788b87d 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -815,12 +815,16 @@ static Bool
 glxDRIEnterVT (int index, int flags)
 {
     __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
+    Bool ret;
 
     LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
 
+    if (!(*screen->enterVT) (index, flags))
+	return FALSE;
+    
     glxResumeClients();
 
-    return (*screen->enterVT) (index, flags);
+    return TRUE;
 }
 
 static void

commit 970cacb264a597573e0927410dde5a3d3aa6549b
Author: Keith Packard <keithp@guitar.keithp.com>
Date:   Thu Apr 5 23:48:40 2007 -0700

    Bump to version 1.2.99.905 (1.3 RC5)

diff --git a/configure.ac b/configure.ac
index 2c69c30..360419c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure.
 AC_PREREQ(2.57)
 dnl This is the not the Xorg version number, it's the server version number.
 dnl Yes, that's weird.
-AC_INIT([xorg-server], 1.2.99.904, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.2.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
@@ -40,7 +40,7 @@ DEFAULT_VENDOR_NAME_SHORT="X.Org"
 DEFAULT_VERSION_MAJOR=1
 DEFAULT_VERSION_MINOR=2
 DEFAULT_VERSION_PATCH=99
-DEFAULT_VERSION_SNAP=904
+DEFAULT_VERSION_SNAP=905
 DEFAULT_RELEASE_DATE="05 April 2007"
 DEFAULT_VENDOR_WEB="http://wiki.x.org";
 

commit 44c4bd5df3aae191be9fc836be26f91497d02901
Author: Matthieu Herrb <matthieu@roadrock.(none)>
Date:   Tue Apr 3 15:47:18 2007 +0200

    CVE-2007-1003: XC-MISC Extension ProcXCMiscGetXIDList() Memory Corruption
    
    (cherry picked from commit 645d87cf8ef724d4591614f9994cdc4d7549a7a8)

diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index f26218e..8c7a86e 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -42,6 +42,12 @@ from The Open Group.
 #include <X11/extensions/xcmiscstr.h>
 #include "modinit.h"
 
+#if HAVE_STDINT_H
+#include <stdint.h>
+#elif !defined(UINT32_MAX)
+#define UINT32_MAX 0xffffffffU
+#endif
+
 #if 0
 static unsigned char XCMiscCode;
 #endif
@@ -143,7 +149,10 @@ ProcXCMiscGetXIDList(client)
 
     REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
 
-    pids = (XID *)ALLOCATE_LOCAL(stuff->count * sizeof(XID));
+    if (stuff->count > UINT32_MAX / sizeof(XID))
+	    return BadAlloc;
+
+    pids = (XID *)Xalloc(stuff->count * sizeof(XID));
     if (!pids)
     {
 	return BadAlloc;
@@ -164,7 +173,7 @@ ProcXCMiscGetXIDList(client)
     	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
 	WriteSwappedDataToClient(client, count * sizeof(XID), pids);
     }
-    DEALLOCATE_LOCAL(pids);
+    Xfree(pids);
     return(client->noClientException);
 }
 

commit 44ea7a3e0d8fa636f4e5dd392caf618120d98413
Author: Tomas Janousek <tomi@nomi.cz>
Date:   Wed Mar 28 14:46:30 2007 -0400

    Bug #10296: Fix timer rescheduling.
    
    (cherry picked from commit 8c7f56d92d8471ee059c14d322af5f7f555dd5c6)

diff --git a/os/WaitFor.c b/os/WaitFor.c
index ba227a3..d0f9f62 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -125,7 +125,7 @@ struct _OsTimerRec {
 };
 
 static void DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev);
-static void CheckAllTimers(CARD32 now);
+static void CheckAllTimers(void);
 static OsTimerPtr timers = NULL;
 
 /*****************
@@ -204,7 +204,7 @@ WaitForSomething(int *pClientsReady)
 	    timeout = timers->expires - now;
             if (timeout > 0 && timeout > timers->delta + 250) {
                 /* time has rewound.  reset the timers. */
-                CheckAllTimers(now);
+                CheckAllTimers();
             }
 
 	    if (timers) {
@@ -439,11 +439,14 @@ ANYSET(FdMask *src)
 /* If time has rewound, re-run every affected timer.
  * Timers might drop out of the list, so we have to restart every time. */
 static void
-CheckAllTimers(CARD32 now)
+CheckAllTimers(void)
 {
     OsTimerPtr timer;
+    CARD32 now;
 
 start:
+    now = GetTimeInMillis();
+
     for (timer = timers; timer; timer = timer->next) {
         if (timer->expires - now > timer->delta + 250) {
             TimerForce(timer);

commit 042ef1f573d6e98756cc98c296bddd1aa9e4c8ca
Author: Keith Packard <keithp@guitar.keithp.com>
Date:   Thu Apr 5 23:21:19 2007 -0700

    Bump version to 1.2.99.904 (1.3 RC4)

diff --git a/configure.ac b/configure.ac
index 6ba4d03..2c69c30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure.
 AC_PREREQ(2.57)
 dnl This is the not the Xorg version number, it's the server version number.
 dnl Yes, that's weird.
-AC_INIT([xorg-server], 1.2.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.2.99.904, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
@@ -40,8 +40,8 @@ DEFAULT_VENDOR_NAME_SHORT="X.Org"
 DEFAULT_VERSION_MAJOR=1
 DEFAULT_VERSION_MINOR=2
 DEFAULT_VERSION_PATCH=99
-DEFAULT_VERSION_SNAP=903
-DEFAULT_RELEASE_DATE="26 March 2007"
+DEFAULT_VERSION_SNAP=904
+DEFAULT_RELEASE_DATE="05 April 2007"
 DEFAULT_VENDOR_WEB="http://wiki.x.org";
 
 dnl this gets generated by autoheader, and thus contains all the defines.  we

commit 56262a4ee943f328d089a8eb4aa70b9a4bd5d135
Author: Keith Packard <keithp@viola.jf.intel.com>
Date:   Mon Apr 2 14:15:36 2007 -0700

    Don't erase current crtc for outputs on CloseScreen
    
    Erasing this variable causes some outputs (SDVO on intel) to fail
    to be correctly reset at server reset time.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 7d86b66..325fb64 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -589,7 +589,6 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
     {
 	xf86OutputPtr	output = config->output[o];
 
-	output->crtc = NULL;
 	output->randr_output = NULL;
     }
     for (c = 0; c < config->num_crtc; c++)

commit 00e33f87f429a5e9e29da30071f03972a4033b8d
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Mon Mar 26 21:21:50 2007 -0700

    Set version to 1.2.99.903 (1.3 RC3)

diff --git a/configure.ac b/configure.ac
index ed2c631..6ba4d03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure.
 AC_PREREQ(2.57)
 dnl This is the not the Xorg version number, it's the server version number.
 dnl Yes, that's weird.
-AC_INIT([xorg-server], 1.2.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.2.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
@@ -40,8 +40,8 @@ DEFAULT_VENDOR_NAME_SHORT="X.Org"
 DEFAULT_VERSION_MAJOR=1
 DEFAULT_VERSION_MINOR=2
 DEFAULT_VERSION_PATCH=99
-DEFAULT_VERSION_SNAP=902
-DEFAULT_RELEASE_DATE="14 March 2007"
+DEFAULT_VERSION_SNAP=903
+DEFAULT_RELEASE_DATE="26 March 2007"
 DEFAULT_VENDOR_WEB="http://wiki.x.org";
 
 dnl this gets generated by autoheader, and thus contains all the defines.  we

commit 4fd2d3aedfae838940d61598466f89fdb47b1557
Author: Michel Dänzer <michel@tungstengraphics.com>
Date:   Tue Jan 23 10:15:22 2007 +0100

    Bump video driver ABI version to 1.2.
    
    This is necessary because server-1.2-branch bumped to 1.1 for xf86CVTMode and
    we have xf86XVFillKeyHelperDrawable on top of that.
    (cherry picked from commit 788cfce911793a26aed16f38f30678ecee82c873)
    
    Conflicts:
    
    	hw/xfree86/common/xf86Module.h
    
    Avoid picking up XInput ABI change.

diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index edae6f2..e54d9be 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -84,7 +84,7 @@ typedef enum {
  * mask is 0xFFFF0000.
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 3)
-#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(1, 1)
+#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(1, 2)
 #define ABI_XINPUT_VERSION	SET_ABI_VERSION(0, 7)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(0, 3)
 #define ABI_FONT_VERSION	SET_ABI_VERSION(0, 5)

commit dc914ced69e1e619a944c7dcb940c25e195cd4f3
Author: Michel Dänzer <michel@tungstengraphics.com>
Date:   Sun Oct 15 16:48:59 2006 +0200

    Add per-drawable Xv colour key helper function.
    
    This allows overlay Xv adaptors to work slightly better with compositing
    managers.
    
    Bump the video driver ABI minor so drivers only need to check for this at build
    time.
    (cherry picked from commit a232693c8c2a206aac47c07b133c071938204e0b)
    
    Conflicts:
    
    	hw/xfree86/common/xf86Module.h
    
    Avoid picking up XInput ABI version change.

diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 89cb6ba..3e908b8 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -974,6 +974,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
    if(!winPriv) {
 	winPriv = xalloc(sizeof(XF86XVWindowRec));
 	if(!winPriv) return BadAlloc;
+	memset(winPriv, 0, sizeof(XF86XVWindowRec));
 	winPriv->PortRec = portPriv;
 	winPriv->next = PrivRoot;
 	pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
@@ -1026,6 +1027,9 @@ xf86XVDestroyWindow(WindowPtr pWin)
 
      pPriv->pDraw = NULL;
      tmp = WinPriv;
+     if(WinPriv->pGC) {
+       FreeGC(WinPriv->pGC, 0);
+     }
      WinPriv = WinPriv->next;
      xfree(tmp);
   }
@@ -1118,6 +1122,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
   while(WinPriv) {
      pPriv = WinPriv->PortRec;
 
+     if(!pPriv) goto next;
+ 
      if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
 	REGION_DESTROY(pScreen, pPriv->pCompositeClip);
 
@@ -1148,6 +1154,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
 	}
      }
 
+next:
      pPrev = WinPriv;
      WinPriv = WinPriv->next;
   }
@@ -1739,9 +1746,13 @@ xf86XVPutImage(
      REGION_UNINIT(pScreen, &VPReg);
   }
 
-  if(portPriv->pDraw) {
+  /* If we are changing windows, unregister our port in the old window */
+  if(portPriv->pDraw && (portPriv->pDraw != pDraw))
      xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
-  }
+
+  /* Register our port with the new window */



Reply to: