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

xorg-server: Changes to 'upstream-experimental'



 Xext/sync.c                                                         |   35 +
 Xi/exevents.c                                                       |    6 
 configure.ac                                                        |    4 
 exa/exa_accel.c                                                     |    2 
 exa/exa_mixed.c                                                     |    2 
 exa/exa_unaccel.c                                                   |    2 
 hw/xfree86/dri2/dri2.c                                              |   11 
 hw/xfree86/modes/xf86EdidModes.c                                    |    7 
 hw/xfree86/modes/xf86Modes.c                                        |   33 -
 hw/xfree86/x86emu/ops.c                                             |   63 +
 hw/xquartz/GL/Makefile.am                                           |    2 
 hw/xquartz/Makefile.am                                              |    2 
 hw/xquartz/X11Application.h                                         |    1 
 hw/xquartz/X11Application.m                                         |    2 
 hw/xquartz/X11Controller.h                                          |    1 
 hw/xquartz/X11Controller.m                                          |    4 
 hw/xquartz/bundle/Info.plist.cpp                                    |    4 
 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib   |  320 ++++++---
 hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/quartz.c                                                 |   11 
 hw/xquartz/quartz.h                                                 |    1 
 hw/xquartz/quartzAudio.c                                            |  329 ----------
 hw/xquartz/quartzAudio.h                                            |   37 -
 hw/xquartz/quartzKeyboard.c                                         |    1 
 hw/xquartz/quartzStartup.c                                          |    4 
 include/protocol-versions.h                                         |    4 
 mi/mieq.c                                                           |    8 
 os/access.c                                                         |    4 
 os/utils.c                                                          |   16 
 randr/rrscreen.c                                                    |   12 
 render/animcur.c                                                    |    8 
 test/input.c                                                        |   74 +-
 32 files changed, 461 insertions(+), 549 deletions(-)

New commits:
commit 6451a3ff949ff55c9dff7399d0babb6b98201e99
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 7 15:40:25 2011 -0800

    xorg-server 1.9.3.901 (1.9.4 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index f861077..02320c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.9.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-12-13"
+AC_INIT([xorg-server], 1.9.3.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-01-07"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit c11f9bfc081423a7f15d72c36f2f0d6518083591
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 7 15:39:14 2011 -0800

    XQuartz: Update copyright dates in bundle's plist
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 85b439a..eb193bf 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -35,9 +35,9 @@
                 <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
 #endif
 	<key>NSHumanReadableCopyright</key>
-		<string>© 2003-2010 Apple Inc.
+		<string>© 2003-2011 Apple Inc.
 © 2003 XFree86 Project, Inc.
-© 2003-2010 X.org Foundation, Inc.
+© 2003-2011 X.org Foundation, Inc.
 </string>
 	<key>NSMainNibFile</key>
 		<string>main</string>

commit 3d12e6d25a79c1d78964df723731d2510bb932f8
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Jan 4 14:08:16 2011 -0500

    edid: Fix incorrect timings for VIC61
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
    Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
    (cherry picked from commit 86ca434a1ab766c1519ee7146b48dbfead843524)

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index c25b707..d1d2e51 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -961,7 +961,7 @@ static const DisplayModeRec CEAVideoModes[CEA_VIDEO_MODES_NUM] = {
     { MODEPREFIX,   108000, 1440, 1478, 1602, 1716, 0,  480,  488,  494,  525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX },/* VIC 58:1440x480i@240 */
     { MODEPREFIX,   108000, 1440, 1478, 1602, 1716, 0,  480,  488,  494,  525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX },/* VIC 59:1440x480i@240 */
     { MODEPREFIX,    59400, 1280, 3040, 3080, 3300, 0,  720,  725,  730,  750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 60: 1280x720@24Hz */
-    { MODEPREFIX,    74250, 3700, 3740, 1430, 3960, 0,  720,  725,  730,  750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 61: 1280x720@25Hz */
+    { MODEPREFIX,    74250, 1280, 3700, 3740, 3960, 0,  720,  725,  730,  750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 61: 1280x720@25Hz */
     { MODEPREFIX,    74250, 1280, 3040, 3080, 3300, 0,  720,  725,  730,  750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 62: 1280x720@30Hz */
     { MODEPREFIX,   297000, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 63: 1920x1080@120Hz */
     { MODEPREFIX,   297000, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* VIC 64:1920x1080@100Hz */

commit 9213c2525a2be6f8bf1412f1c6001a7bc6ce4538
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Dec 10 14:24:02 2010 -0500

    x86emu: Fix more mis-decoding of the data prefix
    
    cc2c73ddcb4370a7c3ad439cda4da825156c26c9's three-cent titanium tax
    doesn't go too far enough.  Fix the rest of the call and jmp
    instructions to handle the data prefix correctly.
    
    Reference: Intel 64 and IA-32 Architectures Software Developer's Manual
    Volume 2A: Instruction Set Reference, A-M
    
    http://www.intel.com/Assets/PDF/manual/253666.pdf
    
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit bb18f277156c08be028a6e12d8987fb1593e9168)

diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c
index c6b2f0a..5d3cac1 100644
--- a/hw/xfree86/x86emu/ops.c
+++ b/hw/xfree86/x86emu/ops.c
@@ -7065,15 +7065,20 @@ Handles opcode 0x9a
 ****************************************************************************/
 static void x86emuOp_call_far_IMM(u8 X86EMU_UNUSED(op1))
 {
-    u16 farseg, faroff;
+    u32 farseg, faroff;
 
     START_OF_INSTR();
-	DECODE_PRINTF("CALL\t");
+    DECODE_PRINTF("CALL\t");
+    if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+	faroff = fetch_long_imm();
+	farseg = fetch_word_imm();
+    } else {
 	faroff = fetch_word_imm();
 	farseg = fetch_word_imm();
-	DECODE_PRINTF2("%04x:", farseg);
-	DECODE_PRINTF2("%04x\n", faroff);
-	CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, farseg, faroff, "FAR ");
+    }
+    DECODE_PRINTF2("%04x:", farseg);
+    DECODE_PRINTF2("%04x\n", faroff);
+    CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, farseg, faroff, "FAR ");
 
     /* XXX
      * 
@@ -7084,8 +7089,12 @@ static void x86emuOp_call_far_IMM(u8 X86EMU_UNUSED(op1))
     TRACE_AND_STEP();
     push_word(M.x86.R_CS);
     M.x86.R_CS = farseg;
-    push_word(M.x86.R_IP);
-    M.x86.R_IP = faroff;
+    if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+	push_long(M.x86.R_EIP);
+    } else {
+	push_word(M.x86.R_IP);
+    }
+    M.x86.R_EIP = faroff & 0xffff;
     DECODE_CLEAR_SEGOVR();
     END_OF_INSTR();
 }
@@ -9670,17 +9679,30 @@ Handles opcode 0xe8
 ****************************************************************************/
 static void x86emuOp_call_near_IMM(u8 X86EMU_UNUSED(op1))
 {
-    s16 ip;
+    s16 ip16;
+    s32 ip32;
 
     START_OF_INSTR();
-	DECODE_PRINTF("CALL\t");
-	ip = (s16) fetch_word_imm();
-	ip += (s16) M.x86.R_IP;    /* CHECK SIGN */
-	DECODE_PRINTF2("%04x\n", (u16)ip);
-	CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip, "");
+    DECODE_PRINTF("CALL\t");
+    if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+	ip32 = (s32) fetch_long_imm();
+	ip32 += (s16) M.x86.R_IP;    /* CHECK SIGN */
+	DECODE_PRINTF2("%04x\n", (u16)ip32);
+	CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip32, "");
+    } else {
+	ip16 = (s16) fetch_word_imm();
+	ip16 += (s16) M.x86.R_IP;    /* CHECK SIGN */
+	DECODE_PRINTF2("%04x\n", (u16)ip16);
+	CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip16, "");
+    }
     TRACE_AND_STEP();
-    push_word(M.x86.R_IP);
-    M.x86.R_IP = ip;
+    if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+	push_long(M.x86.R_EIP);
+	M.x86.R_EIP = ip32 & 0xffff;
+    } else {
+	push_word(M.x86.R_IP);
+	M.x86.R_EIP = ip16;
+    }
     DECODE_CLEAR_SEGOVR();
     END_OF_INSTR();
 }
@@ -9718,16 +9740,21 @@ Handles opcode 0xea
 ****************************************************************************/
 static void x86emuOp_jump_far_IMM(u8 X86EMU_UNUSED(op1))
 {
-    u16 cs, ip;
+    u16 cs;
+    u32 ip;
 
     START_OF_INSTR();
     DECODE_PRINTF("JMP\tFAR ");
-    ip = fetch_word_imm();
+    if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+	ip = fetch_long_imm();
+    } else {
+	ip = fetch_word_imm();
+    }
     cs = fetch_word_imm();
     DECODE_PRINTF2("%04x:", cs);
     DECODE_PRINTF2("%04x\n", ip);
     TRACE_AND_STEP();
-    M.x86.R_IP = ip;
+    M.x86.R_EIP = ip & 0xffff;
     M.x86.R_CS = cs;
     DECODE_CLEAR_SEGOVR();
     END_OF_INSTR();

commit dc24f90ddc9c116a31347ba961f19feaf63fa843
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Date:   Thu Dec 30 19:19:42 2010 +0200

    os: Fix a memory leak
    
    Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit 617b7d22115ccaaaa7ec69c99885054d33a3bc37)

diff --git a/os/access.c b/os/access.c
index 0279259..eb91ea3 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1145,8 +1145,10 @@ Bool LocalClient(ClientPtr client)
 	}
 	for (host = selfhosts; host; host = host->next)
 	{
-	    if (addrEqual (family, addr, alen, host))
+	    if (addrEqual (family, addr, alen, host)) {
+		free(from);
 		return TRUE;
+	    }
 	}
 	free(from);
     }

commit a87a5b7e83349d3871fcde71fec08f85fa16dc0b
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Date:   Thu Dec 30 19:19:32 2010 +0200

    render: Don't filter 0 return from GetTimeInMillis
    
    In animate cursor block handler code assumes GetTimeInMillis returns
    always nonzero value. This isn't true when time wraps around.
    
    To prevent any problems in case GetTimeInMillis would return zero use
    activeDevice variable to track if we have received time.
    
    Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit aa8cea953dc66bcf4cb4d08f2681f9e6cb1bc8c5)

diff --git a/render/animcur.c b/render/animcur.c
index 2160f50..1a8ca43 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -150,6 +150,7 @@ AnimCurScreenBlockHandler (int screenNum,
     ScreenPtr		pScreen = screenInfo.screens[screenNum];
     AnimCurScreenPtr    as = GetAnimCurScreen(pScreen);
     DeviceIntPtr        dev;
+    Bool                activeDevice = FALSE;
     CARD32              now = 0, 
                         soonest = ~0; /* earliest time to wakeup again */
 
@@ -157,7 +158,10 @@ AnimCurScreenBlockHandler (int screenNum,
     {
 	if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen)
 	{
-	    if (!now) now = GetTimeInMillis (); 
+	    if (!activeDevice) {
+                now = GetTimeInMillis ();
+                activeDevice = TRUE;
+            }
 
 	    if ((INT32) (now - dev->spriteInfo->anim.time) >= 0)
 	    {
@@ -187,7 +191,7 @@ AnimCurScreenBlockHandler (int screenNum,
 	}
     }
 
-    if (now)
+    if (activeDevice)
         AdjustWaitForDelay (pTimeout, soonest - now);
 
     Unwrap (as, pScreen, BlockHandler);

commit aec278eb65fe1ca98ab551a8c3873a7195bad540
Author: Ville Syrjälä <ville.syrjala@nokia.com>
Date:   Thu Dec 16 18:22:13 2010 +0200

    xfree86/modes: Take rotation into account when checking mode size
    
    Assume that a mode can be used in either landscape or portrait
    orientation. I suppose the correct thing to do would be to
    collect all the supported rotations from the CRTCs that can be used
    with a specific output, but that information doesn't seem to be
    readily available when these checks are done. So just assume that
    either orientation is fine.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 2e781457d43ec4bf0d633257ac6852cde3b00541)

diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 05f4319..ef89050 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -364,15 +364,32 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
 {
     DisplayModePtr mode;
 
-    for (mode = modeList; mode != NULL; mode = mode->next) {
-	if (maxPitch > 0 && mode->HDisplay > maxPitch)
-	    mode->status = MODE_BAD_WIDTH;
-
-	if (maxX > 0 && mode->HDisplay > maxX)
-	    mode->status = MODE_VIRTUAL_X;
+    if (maxPitch <= 0)
+	    maxPitch = MAXINT;
+    if (maxX <= 0)
+	    maxX = MAXINT;
+    if (maxY <= 0)
+	    maxY = MAXINT;
 
-	if (maxY > 0 && mode->VDisplay > maxY)
-	    mode->status = MODE_VIRTUAL_Y;
+    for (mode = modeList; mode != NULL; mode = mode->next) {
+	if ((xf86ModeWidth(mode, RR_Rotate_0) > maxPitch ||
+	     xf86ModeWidth(mode, RR_Rotate_0) > maxX ||
+	     xf86ModeHeight(mode, RR_Rotate_0) > maxY) &&
+	    (xf86ModeWidth(mode, RR_Rotate_90) > maxPitch ||
+	     xf86ModeWidth(mode, RR_Rotate_90) > maxX ||
+	     xf86ModeHeight(mode, RR_Rotate_90) > maxY)) {
+	    if (xf86ModeWidth(mode, RR_Rotate_0) > maxPitch ||
+		xf86ModeWidth(mode, RR_Rotate_90) > maxPitch)
+		mode->status = MODE_BAD_WIDTH;
+
+	    if (xf86ModeWidth(mode, RR_Rotate_0) > maxX ||
+		xf86ModeWidth(mode, RR_Rotate_90) > maxX)
+		mode->status = MODE_VIRTUAL_X;
+
+	    if (xf86ModeHeight(mode, RR_Rotate_0) > maxY ||
+		xf86ModeHeight(mode, RR_Rotate_90) > maxY)
+		mode->status = MODE_VIRTUAL_Y;
+	}
 
 	if (mode->next == modeList)
 	    break;

commit 005b465048178d2ab0abecf26ccf6c79c6d5e2cc
Author: Ville Syrjälä <ville.syrjala@nokia.com>
Date:   Fri Dec 3 17:42:16 2010 +0200

    dri2: Don't page flip when the window size doesn't match the pixmap size
    
    If the drawable size doesn't match the pixmap size page flipping should
    not be allowed.
    
    If the window is larger than the pixmap, page flipping might need to
    reposition the CRTC somewhere in the middle of the pixmap. I didn't
    spot any code that would handle that at least in the intel driver.
    
    Also the root pixmap could then move to some negative screen
    coordinates. Not sure if all bits of code could handle that. Perhaps
    when composite is enabled screen_x/y would make it work, but without
    composite there's no way that it would work AFAICS.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
    Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
    (cherry picked from commit 0ce25fd7904c792924c3e0ee6fc21a5f1bec1a68)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index e4693d9..39996f9 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -640,6 +640,17 @@ DRI2CanFlip(DrawablePtr pDraw)
     if (!RegionEqual(&pWin->clipList, &pRoot->winSize))
 	return FALSE;
 
+    /* Does the window match the pixmap exactly? */
+    if (pDraw->x != 0 ||
+	pDraw->y != 0 ||
+#ifdef COMPOSITE
+	pDraw->x != pWinPixmap->screen_x ||
+	pDraw->y != pWinPixmap->screen_y ||
+#endif
+	pDraw->width != pWinPixmap->drawable.width ||
+	pDraw->height != pWinPixmap->drawable.height)
+	return FALSE;
+
     return TRUE;
 }
 

commit 651a96982fb2079367d189f4882749e30200003d
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Fri Aug 27 20:36:37 2010 +1000

    GetTimeInMillis: Use CLOCK_MONOTONIC_COARSE where available
    
    On some systems, using CLOCK_MONOTONIC forces a readback of HPET or some
    similarly expensive timer.  CLOCK_MONOTONIC_COARSE can alleviate this,
    at the cost of negligibly-reduced resolution, so prefer that where we
    can.
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    (cherry picked from commit 44adb31bfece29260a9bbd9075c9212ebf00d24d)

diff --git a/os/utils.c b/os/utils.c
index 51455cc..4871326 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -427,7 +427,21 @@ GetTimeInMillis(void)
 
 #ifdef MONOTONIC_CLOCK
     struct timespec tp;
-    if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+    static clockid_t clockid;
+    if (!clockid) {
+#ifdef CLOCK_MONOTONIC_COARSE
+        if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 &&
+            (tp.tv_nsec / 1000) <= 1000 &&
+            clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0)
+            clockid = CLOCK_MONOTONIC_COARSE;
+        else
+#endif
+        if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+            clockid = CLOCK_MONOTONIC;
+        else
+            clockid = ~0L;
+    }
+    if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
         return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L);
 #endif
 

commit 08db658a19bb532808dba8744f8b64042d773ca0
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Fri Dec 17 16:09:35 2010 +0200

    randr: check for virtual size limits before set crtc
    
    Return a error if the screen is configured to an invalid size.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit d1107918d4626268803b54033a07405122278e7f)

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index f58e657..1bc1a9e 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -915,6 +915,18 @@ ProcRRSetScreenConfig (ClientPtr client)
 	width = mode->mode.height;
 	height = mode->mode.width;
     }
+
+    if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
+	client->errorValue = width;
+	free(pData);
+	return BadValue;
+    }
+    if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) {
+	client->errorValue = height;
+	free(pData);
+	return BadValue;
+    }
+
     if (width != pScreen->width || height != pScreen->height)
     {
 	int	c;

commit a3c7b86472aed80cf16edcfe2b77a92d4f3d196f
Author: Michel Dänzer <daenzer@vmware.com>
Date:   Thu Jan 6 09:55:41 2011 +0100

    EXA: Pad size of system memory copy for 1x1 pixmaps (bug #32803).
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=32803 .
    
    Signed-off-by: Michel Dänzer <daenzer@vmware.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 6358a60065eef167d4e5f4afd981ff26deeba80d)

diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index ef20eb5..606f1e1 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -98,7 +98,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
 	pExaPixmap->use_gpu_copy = FALSE;
 
 	if (w == 1 && h == 1) {
-	    pExaPixmap->sys_ptr = malloc((pPixmap->drawable.bitsPerPixel + 7) / 8);
+	    pExaPixmap->sys_ptr = malloc(paddedWidth);
 
 	    /* Set up damage tracking */
 	    pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL,

commit 93b75c7ce81b3d429f62df20c35c4e79c6216c72
Author: James Jones <jajones@nvidia.com>
Date:   Mon Dec 6 13:36:14 2010 -0800

    Add and use SERVER_SYNC_*_VERSION
    
    Most extensions have a version defined
    in the protocol headers, and also in the
    server's protocol-versions.h.  The latter
    defines which version the server advertises
    support for.  Sync wasn't included in
    protocol-versions.h, and was advertising
    support for whatever was in the protocol
    headers the server was built against.
    
    Signed-off-by: James Jones <jajones@nvidia.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459)

diff --git a/Xext/sync.c b/Xext/sync.c
index 314b63e..deb9869 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,6 +67,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "opaque.h"
 #include <X11/extensions/syncproto.h>
 #include "syncsrv.h"
+#include "protocol-versions.h"
 
 #include <stdio.h>
 #if !defined(WIN32)
@@ -1151,8 +1152,8 @@ ProcSyncInitialize(ClientPtr client)
     memset(&rep, 0, sizeof(xSyncInitializeReply));
     rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
-    rep.majorVersion = SYNC_MAJOR_VERSION;
-    rep.minorVersion = SYNC_MINOR_VERSION;
+    rep.majorVersion = SERVER_SYNC_MAJOR_VERSION;
+    rep.minorVersion = SERVER_SYNC_MINOR_VERSION;
     rep.length = 0;
 
     if (client->swapped)
diff --git a/include/protocol-versions.h b/include/protocol-versions.h
index c674465..ce28797 100644
--- a/include/protocol-versions.h
+++ b/include/protocol-versions.h
@@ -95,6 +95,10 @@
 #define SERVER_SHM_MAJOR_VERSION		1
 #define SERVER_SHM_MINOR_VERSION		1
 
+/* Sync */
+#define SERVER_SYNC_MAJOR_VERSION		3
+#define SERVER_SYNC_MINOR_VERSION		0
+
 /* Windows WM */
 #define SERVER_WINDOWSWM_MAJOR_VERSION		1
 #define SERVER_WINDOWSWM_MINOR_VERSION		0

commit 295a893aa3b594f9e0fb154bff14e12514b4dad5
Author: Michel Dänzer <daenzer@vmware.com>
Date:   Wed Dec 22 11:45:36 2010 +0100

    EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703).
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24703 .
    
    Signed-off-by: Michel Dänzer <daenzer@vmware.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit e06fa804009798ea95efa8babaabb0228dfdfe65)

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 6c677c7..b4c0f83 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1057,6 +1057,8 @@ exaFillRegionSolid (DrawablePtr	pDrawable, RegionPtr pRegion, Pixel pixel,
 		*(CARD16*)pExaPixmap->sys_ptr = pixel;
 		break;
 	    case 8:
+	    case 4:
+	    case 1:
 		*(CARD8*)pExaPixmap->sys_ptr = pixel;
 	    }
 
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index a078cc1..d3c405f 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -748,6 +748,8 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
 	    return pixel;
 	}
     case 8:
+    case 4:
+    case 1:
 	{
 	    CARD8 pixel;
 

commit d819ff1cb521af77764af75e04645af4d4d06e3d
Author: Jörn Horstmann <launchpad@planetxml.de>
Date:   Mon Dec 6 11:24:02 2010 +1100

    Add EDID quirk for HP Compaq nc8430.
    
    Like some other LPL panels, this one reports the vertical size in cm rather
    than mm.
    Patch taken from Launchpad bug #380009 <https://launchpad.net/bugs/380009>
    
    X.Org Bug 28414 <https://bugs.freedesktop.org/show_bug.cgi?id=28414>
    
    Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 4b88c7be8de4149fe3d166bf115775f9e81a1373)

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index a94379f..c25b707 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -145,6 +145,11 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC)
 	DDC->vendor.prod_id == 0x2a00)
 	return TRUE;
 
+    /* Bug #28414: HP Compaq NC8430 LP154W01-TLA8 */
+    if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
+	DDC->vendor.prod_id == 5750)
+	return TRUE;
+
     /* Bug #21750: Samsung Syncmaster 2333HD */
     if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
 	DDC->vendor.prod_id == 1157)

commit 11696bb133a5039e51329514377eee6a2cc8dd5a
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Mon Dec 6 11:24:01 2010 +1100

    IDLETIME: Fix edge-case in IdleTimeBlockHandler
    
    Ensure that if we're called exactly on the threshold of a
    NegativeTransition trigger that we reshedule to pick up
    an idle time over the threshold.
    
    Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit a2e67a6412386782cb8b644b86a5744591397d45)

diff --git a/Xext/sync.c b/Xext/sync.c
index c00e692..314b63e 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2322,6 +2322,14 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
 		break;
 	    }
 	}
+	/* 
+	 * We've been called exactly on the idle time, but we have a
+	 * NegativeTransition trigger which requires a transition from an
+	 * idle time greater than this.  Schedule a wakeup for the next
+	 * millisecond so we won't miss a transition.
+	 */
+	if (XSyncValueEqual (idle, *pIdleTimeValueLess))
+	    AdjustWaitForDelay(wt, 1);
     }
     else if (pIdleTimeValueGreater)
     {

commit 625cb4c14242c3d186ec52425e7c009456eb029b
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Mon Dec 6 11:24:00 2010 +1100

    Xext: Fix edge case with {Positive, Negative}Transition triggers.
    
    The {Positive,Negative}Transition triggers only fire when the counter
    goes from strictly {below,above} the threshold.  If
    SyncComputeBracketValues gets called exactly at this threshold we may update
    the bracket values so that the counter is not updated past the threshold.
    
    Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit b55bf248581dc66321b24b29f199f6dc8d02db1b)

diff --git a/Xext/sync.c b/Xext/sync.c
index a51262a..c00e692 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -959,6 +959,17 @@ SyncComputeBracketValues(SyncCounter *pCounter)
 	    {
 		psci->bracket_less = pTrigger->test_value;
 		pnewltval = &psci->bracket_less;
+	    } else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
+		       XSyncValueLessThan(pTrigger->test_value,
+					  psci->bracket_greater))
+	    {
+	        /*
+		 * The value is exactly equal to our threshold.  We want one
+		 * more event in the positive direction to ensure we pick up
+		 * when the value *exceeds* this threshold.
+		 */
+	        psci->bracket_greater = pTrigger->test_value;
+		pnewgtval = &psci->bracket_greater;
 	    }
 	}
         else if (pTrigger->test_type == XSyncPositiveTransition &&
@@ -969,6 +980,17 @@ SyncComputeBracketValues(SyncCounter *pCounter)
 	    {
 		psci->bracket_greater = pTrigger->test_value;
 		pnewgtval = &psci->bracket_greater;
+	    } else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
+		       XSyncValueGreaterThan(pTrigger->test_value,
+					     psci->bracket_less))
+	    {
+	        /*
+		 * The value is exactly equal to our threshold.  We want one
+		 * more event in the negative direction to ensure we pick up
+		 * when the value is less than this threshold.
+		 */
+	        psci->bracket_less = pTrigger->test_value;
+		pnewltval = &psci->bracket_less;
 	    }
 	}
     } /* end for each trigger */

commit a2c674b75d3b1a663bece6f6e2e34c3e71e6be55
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Feb 5 11:08:27 2010 +1000

    test: reduce range of byte-padding macro tests.
    
    Byte padding and conversion is interesting for the rage of 0-8 bytes, and
    then interesting towards the end of the valid range (INT_MAX - 7 and INT_MAX
    - 3).
    
    Note: this changes the upper range for pad_to_int32() and bytes_to_int32()
    from the previous (INT_MAX - 4) to (INT_MAX - 3).
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit d435e1ecb86e2fe6292b5945262956644f979bbb)

diff --git a/test/input.c b/test/input.c
index 5f03471..d1c4dd9 100644
--- a/test/input.c
+++ b/test/input.c
@@ -682,45 +682,82 @@ static void dix_grab_matching(void)
     g_assert(rc == TRUE);
 }
 
-static void include_byte_padding_macros(void)
+static void test_bits_to_byte(int i)
 {
-    int i;
-    g_test_message("Testing bits_to_bytes()");
-
-    /* the macros don't provide overflow protection */
-    for (i = 0; i < INT_MAX - 7; i++)
-    {
         int expected_bytes;
         expected_bytes = (i + 7)/8;
 
         g_assert(bits_to_bytes(i) >= i/8);
         g_assert((bits_to_bytes(i) * 8) - i <= 7);
         g_assert(expected_bytes == bits_to_bytes(i));
-    }
+}
 
-    g_test_message("Testing bytes_to_int32()");
-    for (i = 0; i < INT_MAX - 3; i++)
-    {
+static void test_bytes_to_int32(int i)
+{
         int expected_4byte;
         expected_4byte = (i + 3)/4;
 
         g_assert(bytes_to_int32(i) <= i);
         g_assert((bytes_to_int32(i) * 4) - i <= 3);
         g_assert(expected_4byte == bytes_to_int32(i));
-    }
-
-    g_test_message("Testing pad_to_int32");
+}
 
-    for (i = 0; i < INT_MAX - 3; i++)
-    {
+static void test_pad_to_int32(int i)
+{
         int expected_bytes;
         expected_bytes = ((i + 3)/4) * 4;
 
         g_assert(pad_to_int32(i) >= i);
         g_assert(pad_to_int32(i) - i <= 3);
         g_assert(expected_bytes == pad_to_int32(i));
-    }
+}
+static void include_byte_padding_macros(void)
+{
+    g_test_message("Testing bits_to_bytes()");
+
+    /* the macros don't provide overflow protection */
+    test_bits_to_byte(0);
+    test_bits_to_byte(1);
+    test_bits_to_byte(2);
+    test_bits_to_byte(7);
+    test_bits_to_byte(8);
+    test_bits_to_byte(0xFF);
+    test_bits_to_byte(0x100);
+    test_bits_to_byte(INT_MAX - 9);
+    test_bits_to_byte(INT_MAX - 8);
+
+    g_test_message("Testing bytes_to_int32()");
+
+    test_bytes_to_int32(0);
+    test_bytes_to_int32(1);
+    test_bytes_to_int32(2);
+    test_bytes_to_int32(7);
+    test_bytes_to_int32(8);
+    test_bytes_to_int32(0xFF);
+    test_bytes_to_int32(0x100);
+    test_bytes_to_int32(0xFFFF);
+    test_bytes_to_int32(0x10000);
+    test_bytes_to_int32(0xFFFFFF);
+    test_bytes_to_int32(0x1000000);
+    test_bytes_to_int32(INT_MAX - 4);
+    test_bytes_to_int32(INT_MAX - 3);
+
+    g_test_message("Testing pad_to_int32");
 
+    test_pad_to_int32(0);
+    test_pad_to_int32(0);
+    test_pad_to_int32(1);
+    test_pad_to_int32(2);
+    test_pad_to_int32(7);
+    test_pad_to_int32(8);
+    test_pad_to_int32(0xFF);
+    test_pad_to_int32(0x100);
+    test_pad_to_int32(0xFFFF);
+    test_pad_to_int32(0x10000);
+    test_pad_to_int32(0xFFFFFF);
+    test_pad_to_int32(0x1000000);
+    test_pad_to_int32(INT_MAX - 4);
+    test_pad_to_int32(INT_MAX - 3);
 }
 
 static void xi_unregister_handlers(void)

commit 8d0866559dd418389b018f1e48c6f8605e6ebc8d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Feb 5 10:59:52 2010 +1000

    test: compare byte padding macros against the expected bytes.
    
    We calculate the expected bytes for each value, let's use it.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit f49ee9074a66883a3c525b0d6e71589123288465)

diff --git a/test/input.c b/test/input.c
index f08e13b..5f03471 100644
--- a/test/input.c
+++ b/test/input.c
@@ -695,6 +695,7 @@ static void include_byte_padding_macros(void)
 
         g_assert(bits_to_bytes(i) >= i/8);
         g_assert((bits_to_bytes(i) * 8) - i <= 7);
+        g_assert(expected_bytes == bits_to_bytes(i));
     }
 
     g_test_message("Testing bytes_to_int32()");
@@ -705,6 +706,7 @@ static void include_byte_padding_macros(void)
 
         g_assert(bytes_to_int32(i) <= i);
         g_assert((bytes_to_int32(i) * 4) - i <= 3);
+        g_assert(expected_4byte == bytes_to_int32(i));
     }
 
     g_test_message("Testing pad_to_int32");
@@ -716,6 +718,7 @@ static void include_byte_padding_macros(void)
 
         g_assert(pad_to_int32(i) >= i);
         g_assert(pad_to_int32(i) - i <= 3);
+        g_assert(expected_bytes == pad_to_int32(i));
     }
 
 }

commit 97f40a17afc197342b5aea92d870dd4099ac6b44
Author: Eoghan Sherry <ejsherry@gmail.com>
Date:   Sun Nov 28 16:15:51 2010 -0500

    Xi: Fix master button update when slave buttons are mapped. #24887
    
    It is currently assumed that an event button delieved to a master device
    corresponds to the slave button states. However, the event button is a
    logical (mapped) slave button and slave button states correspond to
    physical (unmapped) slave buttons. This leads to incorrect update of the
    master button state and incorrect events devlivered to clients. Fix the
    situation by taking the slave button map into account when querying a
    slave button state.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887
    
    Signed-off-by: Eoghan Sherry <ejsherry@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 36b614dedf4ddc428e43ad1542d4f9314f73f60a)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index e19e207..6d88151 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -878,8 +878,10 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
                     continue;
                 if (!sd->button)
                     continue;
-                if (button_is_down(sd, key, BUTTON_PROCESSED))
-                    return DONT_PROCESS;
+                for (i = 1; i <= sd->button->numButtons; i++)
+                    if (sd->button->map[i] == key &&
+                        button_is_down(sd, i, BUTTON_PROCESSED))
+                        return DONT_PROCESS;
             }
         }
         set_button_up(device, key, BUTTON_PROCESSED);

commit faecab3b13bbaecf4f35f49b833d1b79a5fb647d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 3 11:54:41 2010 +1000

    mi: handle DGA subtypes when determining the master device.
    
    The subtype in the DGA event is the core type and all ET_ event types (where
    applicable) are identical to the core types. Thus the switch statement below
    will work as required and assign the right master device.
    
    Fixes a crasher bug on keyboard devices with valuators. If a device sends a
    motion event while grabbed and a DGA client is active (but has not selected
    input through DGA), the valuator event is posted through the VCK and
    eventually results in a NULL-pointer dereference on dev->valuator.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 31ab9f8860848504df18a8be9d19b817b191e0df)

diff --git a/mi/mieq.c b/mi/mieq.c
index d1441e2..01da52a 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -320,6 +320,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
 {
     DeviceIntPtr mdev;
     int len = original->any.length;
+    int type = original->any.type;
 
     CHECKEVENT(original);
 
@@ -327,7 +328,12 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
     if (!sdev || !sdev->u.master)
         return NULL;
 
-    switch(original->any.type)
+#if XFreeXDGA
+    if (type == ET_DGAEvent)
+        type = original->dga_event.subtype;
+#endif
+
+    switch(type)
     {


Reply to: