ChangeLog | 151 +++++++++++++++++++++++++++++++ Xext/sync.c | 5 - debian/changelog | 15 +++ debian/patches/22-render-swap-stops.diff | 33 ------ debian/patches/series | 1 exa/exa_accel.c | 2 exa/exa_unaccel.c | 2 hw/xfree86/modes/xf86EdidModes.c | 5 + hw/xfree86/modes/xf86Modes.c | 33 +++++- hw/xfree86/x86emu/ops.c | 83 ++++++++++++----- include/protocol-versions.h | 4 randr/rrscreen.c | 12 ++ render/render.c | 4 13 files changed, 280 insertions(+), 70 deletions(-)
New commits: commit d87cb13e97e210187a26a9582731bcd65a6cdc0d Author: Cyril Brulebois <[email protected]> Date: Wed Jan 12 01:20:26 2011 +0100 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index 5405633..ac93354 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xorg-server (2:1.7.7-11) UNRELEASED; urgency=low +xorg-server (2:1.7.7-11) unstable; urgency=low * Merge server-1.7-branch from upstream: - xfree86/modes: Take rotation into account when checking mode size @@ -11,7 +11,7 @@ xorg-server (2:1.7.7-11) UNRELEASED; urgency=low - render: Fix byteswapping of gradient stops * Drop patch accordingly: 22-render-swap-stops.diff - -- Cyril Brulebois <[email protected]> Wed, 12 Jan 2011 01:09:51 +0100 + -- Cyril Brulebois <[email protected]> Wed, 12 Jan 2011 01:20:21 +0100 xorg-server (2:1.7.7-10) unstable; urgency=low commit dc0ec2a21d341c8c2522dedc10089b4da284ba9d Author: Cyril Brulebois <[email protected]> Date: Wed Jan 12 01:20:14 2011 +0100 Drop patch accordingly: 22-render-swap-stops.diff diff --git a/debian/changelog b/debian/changelog index 58ac9d1..5405633 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ xorg-server (2:1.7.7-11) UNRELEASED; urgency=low - x86emu: fix jump_near_IMM to handle DATA: flag correctly. - Add and use SERVER_SYNC_*_VERSION - render: Fix byteswapping of gradient stops + * Drop patch accordingly: 22-render-swap-stops.diff -- Cyril Brulebois <[email protected]> Wed, 12 Jan 2011 01:09:51 +0100 diff --git a/debian/patches/22-render-swap-stops.diff b/debian/patches/22-render-swap-stops.diff deleted file mode 100644 index de52e8d..0000000 --- a/debian/patches/22-render-swap-stops.diff +++ /dev/null @@ -1,33 +0,0 @@ -From: Andrea Canciani <[email protected]> -Date: Tue, 2 Nov 2010 20:10:32 +0100 -To: [email protected] -Cc: Andrea Canciani <[email protected]> -Subject: [PATCH 2/2] render: Fix byteswapping of gradient stops -Message-Id: <[email protected]> - -The function swapStops repeatedly swaps the color components as -CARD16, but incorrectly steps over them as if they were CARD32. - -This causes half of the stops not to be swapped at all and some -unrelated data be swapped instead. - -Reviewed-by: Soren Sandmann <[email protected]> ---- - render/render.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -Index: xorg-server/render/render.c -=================================================================== ---- xorg-server.orig/render/render.c -+++ xorg-server/render/render.c -@@ -2565,8 +2565,8 @@ static void swapStops(void *stuff, int n - } - colors = (CARD16 *)(stops); - for (i = 0; i < 4*num; ++i) { -- swaps(stops, n); -- ++stops; -+ swaps(colors, n); -+ ++colors; - } - } - diff --git a/debian/patches/series b/debian/patches/series index 7c3b4fc..4a57f61 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,4 +20,3 @@ 19-compresize-fix.diff 20-randr-shadow-crashes.diff 21-device-mode-list.diff -22-render-swap-stops.diff commit 5f516db347365841d44e5c4bc4e30ba7c4b98322 Author: Cyril Brulebois <[email protected]> Date: Wed Jan 12 01:12:12 2011 +0100 Bump changelogs. diff --git a/ChangeLog b/ChangeLog index 58e8aff..b9683ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,154 @@ +commit 2fd67c34549f1703e8ca522f92be518b18f90e81 +Author: Ville Syrjälä <[email protected]> +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ä <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + (cherry picked from commit 2e781457d43ec4bf0d633257ac6852cde3b00541) + (cherry picked from commit aec278eb65fe1ca98ab551a8c3873a7195bad540) + +commit 6a6d907e77777057cadbd80572119c09732385cd +Author: Tiago Vignatti <[email protected]> +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 <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + Reviewed-by: Daniel Stone <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit d1107918d4626268803b54033a07405122278e7f) + +commit 5b979a13df331ad28ce7f1c90d6e059f6fd4eedb +Author: Michel Dänzer <[email protected]> +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 <[email protected]> + Reviewed-by: Dave Airlie <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit e06fa804009798ea95efa8babaabb0228dfdfe65) + +commit 561afd799fc4060111b650657f3a0a01cce484b3 +Author: Jörn Horstmann <[email protected]> +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 <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit 4b88c7be8de4149fe3d166bf115775f9e81a1373) + +commit cd82012d5da9a88537e7079f8204853a886ab4e5 +Author: Adam Jackson <[email protected]> +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 <[email protected]> + Signed-off-by: Adam Jackson <[email protected]> + (cherry picked from commit bb18f277156c08be028a6e12d8987fb1593e9168) + +commit 2194c381c8a0b4e1a163f9b0f6abe92093f531fa +Author: Luc Verhaegen <[email protected]> +Date: Sun Oct 24 23:57:06 2010 +0200 + + x86emu: fix jump_near_IMM to handle DATA: flag correctly. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348 + + Before (data flag ignored -> broken): + 66 DATA: + e944f1 JMP 1ff6 + + After (fixed): + 66 DATA: + e944f1ffff JMP 00001ff8 + + This subtle difference in the length of decoded instruction meant + that the VBE call jumped to the routine setting AX=0x14F (VBE Failed) + instead of the routine that set AX=0x4F (VBE success). + + The ability to run the same code in vm86 significantly aided the + debugging of this issue. Those X.org developers who would like to drop + vm86 better take special care towards _all_ vesa bugs, as those will + expose further issues. + + Patch applies easily to even xserver 1.4.2. + + Signed-off-by: Luc Verhaegen <[email protected]> + Tested-by: Luc Verhaegen <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit cc2c73ddcb4370a7c3ad439cda4da825156c26c9) + +commit c038d008e4004914dc5ad58ba73d51baf0cd91ac +Author: James Jones <[email protected]> +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 <[email protected]> + Reviewed-by: Keith Packard <[email protected]> + (cherry picked from commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459) + +commit 472163b7f3a5e7aa7f40fa81b1facc71dd3529bc +Author: Andrea Canciani <[email protected]> +Date: Tue Nov 2 20:10:32 2010 +0100 + + render: Fix byteswapping of gradient stops + + The function swapStops repeatedly swaps the color components as + CARD16, but incorrectly steps over them as if they were CARD32. + + This causes half of the stops not to be swapped at all and some + unrelated data be swapped instead. + + Signed-off-by: Andrea Canciani <[email protected]> + Reviewed-by: Soren Sandmann <[email protected]> + Reviewed-by: Julien Cristau <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit dab064fa5e0b1f5c67222562ad5367005832cba1) + commit 6f7f3e2b799984e1b8aade89726dc226fc0b89ac Author: Cyril Brulebois <[email protected]> Date: Wed Dec 1 14:12:55 2010 +0100 diff --git a/debian/changelog b/debian/changelog index cdeb157..58ac9d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +xorg-server (2:1.7.7-11) UNRELEASED; urgency=low + + * Merge server-1.7-branch from upstream: + - xfree86/modes: Take rotation into account when checking mode size + - randr: check for virtual size limits before set crtc + - EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703). + - Add EDID quirk for HP Compaq nc8430. + - x86emu: Fix more mis-decoding of the data prefix + - x86emu: fix jump_near_IMM to handle DATA: flag correctly. + - Add and use SERVER_SYNC_*_VERSION + - render: Fix byteswapping of gradient stops + + -- Cyril Brulebois <[email protected]> Wed, 12 Jan 2011 01:09:51 +0100 + xorg-server (2:1.7.7-10) unstable; urgency=low * render: Fix byteswapping of gradient stops commit 2fd67c34549f1703e8ca522f92be518b18f90e81 Author: Ville Syrjälä <[email protected]> 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ä <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit 2e781457d43ec4bf0d633257ac6852cde3b00541) (cherry picked from commit aec278eb65fe1ca98ab551a8c3873a7195bad540) diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 862a473..a107001 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -362,15 +362,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 6a6d907e77777057cadbd80572119c09732385cd Author: Tiago Vignatti <[email protected]> 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 <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit d1107918d4626268803b54033a07405122278e7f) diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 630ff57..0fee1f5 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -921,6 +921,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 5b979a13df331ad28ce7f1c90d6e059f6fd4eedb Author: Michel Dänzer <[email protected]> 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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit e06fa804009798ea95efa8babaabb0228dfdfe65) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index d4eae89..76012d3 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -1049,6 +1049,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 9bc765a..fa8e791 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -525,6 +525,8 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap) return pixel; } case 8: + case 4: + case 1: { CARD8 pixel; commit 561afd799fc4060111b650657f3a0a01cce484b3 Author: Jörn Horstmann <[email protected]> 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 <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit 4b88c7be8de4149fe3d166bf115775f9e81a1373) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index b057d7d..50e1bfd 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -170,6 +170,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 cd82012d5da9a88537e7079f8204853a886ab4e5 Author: Adam Jackson <[email protected]> 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 <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (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 2194c381c8a0b4e1a163f9b0f6abe92093f531fa Author: Luc Verhaegen <[email protected]> Date: Sun Oct 24 23:57:06 2010 +0200 x86emu: fix jump_near_IMM to handle DATA: flag correctly. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348 Before (data flag ignored -> broken): 66 DATA: e944f1 JMP 1ff6 After (fixed): 66 DATA: e944f1ffff JMP 00001ff8 This subtle difference in the length of decoded instruction meant that the VBE call jumped to the routine setting AX=0x14F (VBE Failed) instead of the routine that set AX=0x4F (VBE success). The ability to run the same code in vm86 significantly aided the debugging of this issue. Those X.org developers who would like to drop vm86 better take special care towards _all_ vesa bugs, as those will expose further issues. Patch applies easily to even xserver 1.4.2. Signed-off-by: Luc Verhaegen <[email protected]> Tested-by: Luc Verhaegen <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit cc2c73ddcb4370a7c3ad439cda4da825156c26c9) diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c index 21a0347..c6b2f0a 100644 --- a/hw/xfree86/x86emu/ops.c +++ b/hw/xfree86/x86emu/ops.c @@ -9691,15 +9691,23 @@ Handles opcode 0xe9 ****************************************************************************/ static void x86emuOp_jump_near_IMM(u8 X86EMU_UNUSED(op1)) { - int ip; + u32 ip; START_OF_INSTR(); DECODE_PRINTF("JMP\t"); - ip = (s16)fetch_word_imm(); - ip += (s16)M.x86.R_IP; - DECODE_PRINTF2("%04x\n", (u16)ip); - TRACE_AND_STEP(); - M.x86.R_IP = (u16)ip; + if (M.x86.mode & SYSMODE_PREFIX_DATA) { + ip = (u32)fetch_long_imm(); + ip += (u32)M.x86.R_EIP; + DECODE_PRINTF2("%08x\n", (u32)ip); + TRACE_AND_STEP(); + M.x86.R_EIP = (u32)ip; + } else { + ip = (s16)fetch_word_imm(); + ip += (s16)M.x86.R_IP; + DECODE_PRINTF2("%04x\n", (u16)ip); + TRACE_AND_STEP(); + M.x86.R_IP = (u16)ip; + } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } commit c038d008e4004914dc5ad58ba73d51baf0cd91ac Author: James Jones <[email protected]> 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 <[email protected]> Reviewed-by: Keith Packard <[email protected]> (cherry picked from commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459) diff --git a/Xext/sync.c b/Xext/sync.c index 667f8ab..48dea6f 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) @@ -1140,8 +1141,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 da9770c..f623b3c 100644 --- a/include/protocol-versions.h +++ b/include/protocol-versions.h @@ -99,6 +99,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 472163b7f3a5e7aa7f40fa81b1facc71dd3529bc Author: Andrea Canciani <[email protected]> Date: Tue Nov 2 20:10:32 2010 +0100 render: Fix byteswapping of gradient stops The function swapStops repeatedly swaps the color components as CARD16, but incorrectly steps over them as if they were CARD32. This causes half of the stops not to be swapped at all and some unrelated data be swapped instead. Signed-off-by: Andrea Canciani <[email protected]> Reviewed-by: Soren Sandmann <[email protected]> Reviewed-by: Julien Cristau <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit dab064fa5e0b1f5c67222562ad5367005832cba1) diff --git a/render/render.c b/render/render.c index b78c75b..405f7db 100644 --- a/render/render.c +++ b/render/render.c @@ -2565,8 +2565,8 @@ static void swapStops(void *stuff, int num) } colors = (CARD16 *)(stops); for (i = 0; i < 4*num; ++i) { - swaps(stops, n); - ++stops; + swaps(colors, n); + ++colors; } } -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

