From 51e6bdce032b27e7a653078621c2471c8bb66460 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Mon, 16 Feb 2004 14:53:47 +0000 Subject: [PATCH] many XFree86 bug-fixes: - fixed generic xf86CopyYUV12ToPacked for big-endian system (e.g. mach64 on UltraSPARC) - fixed the mga driver on big-endian systems (e.g. g200 on PowerPC IBM RS/6k) - fixed radeon dual head on big-endian systems (e.g. Mobility M7 in iBooks) - fixed (same work arround as in the Linux kernel radeonfb) radeon PLL computation for iBook panels The fixes took of course several days of debugging with much tea nearby. git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2330 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/x11/xfree86/apm.patch | 2 +- package/x11/xfree86/config.hlp | 2 +- package/x11/xfree86/config.in | 2 +- package/x11/xfree86/devfs-vc.patch | 2 +- package/x11/xfree86/fontconfig-update.patch | 10 +- package/x11/xfree86/ftconfig-h-hotfix.patch | 2 +- package/x11/xfree86/imake_rules.patch | 2 +- package/x11/xfree86/imake_tmpl.patch | 2 +- package/x11/xfree86/imakemdep_ppc.patch | 2 +- package/x11/xfree86/imst.patch | 2 +- .../xfree86/macintosh-xkb-us-de-ibook.patch | 2 +- package/x11/xfree86/mga-ppc-rs6k.patch | 422 ++++++++++++++++++ package/x11/xfree86/no-fc-cache-run.patch | 2 +- package/x11/xfree86/parse-config | 2 +- package/x11/xfree86/radeon-dual-head.patch | 74 +++ package/x11/xfree86/radeon-iBook.patch | 47 ++ package/x11/xfree86/startwm.patch | 2 +- package/x11/xfree86/stone_mod_xfree86.sh | 2 +- package/x11/xfree86/twm-defaults.patch | 2 +- package/x11/xfree86/xconsole-pty.patch | 2 +- package/x11/xfree86/xf_config.sh | 2 +- package/x11/xfree86/xfree86.conf | 2 +- package/x11/xfree86/xfree86.desc | 2 +- package/x11/xfree86/xfs.init | 2 +- package/x11/xfree86/xterm-ls.patch | 2 +- package/x11/xfree86/xv-bigendian.patch | 50 +++ 26 files changed, 619 insertions(+), 26 deletions(-) create mode 100644 package/x11/xfree86/mga-ppc-rs6k.patch create mode 100644 package/x11/xfree86/radeon-dual-head.patch create mode 100644 package/x11/xfree86/radeon-iBook.patch create mode 100644 package/x11/xfree86/xv-bigendian.patch diff --git a/package/x11/xfree86/apm.patch b/package/x11/xfree86/apm.patch index 5488c4b22..ebdc6778b 100644 --- a/package/x11/xfree86/apm.patch +++ b/package/x11/xfree86/apm.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/apm.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/config.hlp b/package/x11/xfree86/config.hlp index e0b5c5d60..2990b26eb 100644 --- a/package/x11/xfree86/config.hlp +++ b/package/x11/xfree86/config.hlp @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/config.hlp -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/config.in b/package/x11/xfree86/config.in index 145a15255..095549a06 100644 --- a/package/x11/xfree86/config.in +++ b/package/x11/xfree86/config.in @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/config.in -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/devfs-vc.patch b/package/x11/xfree86/devfs-vc.patch index 813c80e3c..328686c94 100644 --- a/package/x11/xfree86/devfs-vc.patch +++ b/package/x11/xfree86/devfs-vc.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/devfs-vc.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/fontconfig-update.patch b/package/x11/xfree86/fontconfig-update.patch index 5572abfe4..cde20ef1e 100644 --- a/package/x11/xfree86/fontconfig-update.patch +++ b/package/x11/xfree86/fontconfig-update.patch @@ -1,20 +1,20 @@ # --- ROCK-COPYRIGHT-NOTE-BEGIN --- -# +# # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! -# +# # ROCK Linux: rock-src/package/x11/xfree86/fontconfig-update.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf -# +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. -# +# # --- ROCK-COPYRIGHT-NOTE-END --- This updates the fontconfig version included inside XFree to Keith's diff --git a/package/x11/xfree86/ftconfig-h-hotfix.patch b/package/x11/xfree86/ftconfig-h-hotfix.patch index 674e1c249..412fdaa0e 100644 --- a/package/x11/xfree86/ftconfig-h-hotfix.patch +++ b/package/x11/xfree86/ftconfig-h-hotfix.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/ftconfig-h-hotfix.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/imake_rules.patch b/package/x11/xfree86/imake_rules.patch index ebbc8ace6..1797ca515 100644 --- a/package/x11/xfree86/imake_rules.patch +++ b/package/x11/xfree86/imake_rules.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/imake_rules.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/imake_tmpl.patch b/package/x11/xfree86/imake_tmpl.patch index 670e9f1de..6f821e956 100644 --- a/package/x11/xfree86/imake_tmpl.patch +++ b/package/x11/xfree86/imake_tmpl.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/imake_tmpl.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/imakemdep_ppc.patch b/package/x11/xfree86/imakemdep_ppc.patch index 5273ab472..c7a0a20ec 100644 --- a/package/x11/xfree86/imakemdep_ppc.patch +++ b/package/x11/xfree86/imakemdep_ppc.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/imakemdep_ppc.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/imst.patch b/package/x11/xfree86/imst.patch index 418c135d2..5c2678cc9 100644 --- a/package/x11/xfree86/imst.patch +++ b/package/x11/xfree86/imst.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/imst.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/macintosh-xkb-us-de-ibook.patch b/package/x11/xfree86/macintosh-xkb-us-de-ibook.patch index df959a885..0a36641f3 100644 --- a/package/x11/xfree86/macintosh-xkb-us-de-ibook.patch +++ b/package/x11/xfree86/macintosh-xkb-us-de-ibook.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/macintosh-xkb-us-de-ibook.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/mga-ppc-rs6k.patch b/package/x11/xfree86/mga-ppc-rs6k.patch new file mode 100644 index 000000000..4ad771a98 --- /dev/null +++ b/package/x11/xfree86/mga-ppc-rs6k.patch @@ -0,0 +1,422 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/x11/xfree86/mga-ppc-rs6k.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga.h +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h 2003-10-10 13:06:02.000000000 +0200 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga.h 2004-02-15 00:51:40.000000000 +0100 +@@ -91,7 +91,7 @@ + } MGAOpts; + + +-#if !defined(EXTRADEBUG) ++#if EXTRADEBUG != 1 + #define INREG8(addr) MMIO_IN8(pMga->IOBase, addr) + #define INREG16(addr) MMIO_IN16(pMga->IOBase, addr) + #define INREG(addr) MMIO_IN32(pMga->IOBase, addr) +@@ -99,18 +99,18 @@ + #define OUTREG16(addr, val) MMIO_OUT16(pMga->IOBase, addr, val) + #define OUTREG(addr, val) MMIO_OUT32(pMga->IOBase, addr, val) + #else /* !EXTRADEBUG */ +-CARD8 dbg_inreg8(ScrnInfoPtr,int,int); +-CARD16 dbg_inreg16(ScrnInfoPtr,int,int); +-CARD32 dbg_inreg32(ScrnInfoPtr,int,int); +-void dbg_outreg8(ScrnInfoPtr,int,int); +-void dbg_outreg16(ScrnInfoPtr,int,int); +-void dbg_outreg32(ScrnInfoPtr,int,int); +-#define INREG8(addr) dbg_inreg8(pScrn,addr,1) +-#define INREG16(addr) dbg_inreg16(pScrn,addr,1) +-#define INREG(addr) dbg_inreg32(pScrn,addr,1) +-#define OUTREG8(addr,val) dbg_outreg8(pScrn,addr,val) +-#define OUTREG16(addr,val) dbg_outreg16(pScrn,addr,val) +-#define OUTREG(addr,val) dbg_outreg32(pScrn,addr,val) ++CARD8 dbg_inreg8(ScrnInfoPtr,int,int,char*); ++CARD16 dbg_inreg16(ScrnInfoPtr,int,int,char*); ++CARD32 dbg_inreg32(ScrnInfoPtr,int,int,char*); ++void dbg_outreg8(ScrnInfoPtr,int,int,char*); ++void dbg_outreg16(ScrnInfoPtr,int,int,char*); ++void dbg_outreg32(ScrnInfoPtr,int,int,char*); ++#define INREG8(addr) dbg_inreg8(pScrn,addr,1,__FUNCTION__) ++#define INREG16(addr) dbg_inreg16(pScrn,addr,1,__FUNCTION__) ++#define INREG(addr) dbg_inreg32(pScrn,addr,1,__FUNCTION__) ++#define OUTREG8(addr,val) dbg_outreg8(pScrn,addr,val,__FUNCTION__) ++#define OUTREG16(addr,val) dbg_outreg16(pScrn,addr,val,__FUNCTION__) ++#define OUTREG(addr,val) dbg_outreg32(pScrn,addr,val,__FUNCTION__) + #endif /* EXTRADEBUG */ + + /* +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c 2003-07-25 13:04:46.000000000 +0200 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c 2004-02-13 01:18:07.000000000 +0100 +@@ -70,6 +70,7 @@ + ){ + int yoffset, dyoffset, x, y, a, b, d, mask, k1, k3, dx, dy, tmp; + XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); ++ ScrnInfoPtr pScrn = xf86Screens[pGC->pScreen->myNum]; + MGAPtr pMga = MGAPTR(infoRec->pScrn); + miZeroArcRec info; + Bool do360; +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c 2003-11-21 06:59:14.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c 2004-02-15 01:06:51.000000000 +0100 +@@ -24,6 +24,8 @@ + + #include "mga_bios.h" + #include "mga_reg.h" ++ ++#define EXTRADEBUG 0 + #include "mga.h" + #include "mga_macros.h" + +@@ -548,6 +550,14 @@ + MGACRTC2GetPitch(pScrn, &ModeInfo); + MGACRTC2GetDisplayStart(pScrn, &ModeInfo,0,0,0); + } ++ ++ /* Disable byte-swapping for big-endian architectures - the XFree ++ driver seems to like a little-endian framebuffer -ReneR */ ++#if X_BYTE_ORDER == X_BIG_ENDIAN ++ /* pReg->Option |= 0x80000000; */ ++ pReg->Option &= ~0x80000000; ++#endif ++ + return(TRUE); + } + +@@ -670,6 +680,14 @@ + } + + if(!pMga->SecondCrtc) { ++ /* Do not set the memory config for primary cards as it ++ should be correct already. Only on little endian architectures ++ since we need to modify the byteswap bit. -ReneR */ ++#if X_BYTE_ORDER == X_BIG_ENDIAN ++ optionMask = OPTION1_MASK; ++#else ++ optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK; ++#endif + + MGA_NOT_HAL( + /* +@@ -695,10 +713,6 @@ + outMGAdac(i, mgaReg->DacRegs[i]); + } + +- /* Do not set the memory config for primary cards as it +- should be correct already */ +- optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK; +- + if (!MGAISGx50(pMga)) { + /* restore pci_option register */ + pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, optionMask, +@@ -939,6 +953,7 @@ + MGAPtr pMga = MGAPTR(pScrn); + x += 64; + y += 64; ++ + #ifdef USEMGAHAL + MGA_HAL( + x += pMga->HALGranularityOffX; +@@ -1033,7 +1048,8 @@ + static void + MGAG_I2CGetBits(I2CBusPtr b, int *clock, int *data) + { +- MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]); ++ ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex]; ++ MGAPtr pMga = MGAPTR(pScrn); + unsigned char val; + + /* Get the result. */ +@@ -1054,7 +1070,8 @@ + static void + MGAG_I2CPutBits(I2CBusPtr b, int clock, int data) + { +- MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]); ++ ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex]; ++ MGAPtr pMga = MGAPTR(pScrn); + unsigned char drv, val; + + val = (clock ? DDC_SCL_MASK : 0) | (data ? DDC_SDA_MASK : 0); +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 2003-11-21 06:59:15.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 2004-02-15 01:08:02.000000000 +0100 +@@ -926,7 +926,7 @@ + return 16384; + } + } +- ProbeSize = 16384; ++ ProbeSize = 8192; + break; + case PCI_CHIP_MGAG100: + case PCI_CHIP_MGAG100_PCI: +@@ -954,11 +954,14 @@ + tmp = INREG8(MGAREG_CRTCEXT_DATA); + OUTREG8(MGAREG_CRTCEXT_DATA, tmp | 0x80); + +- /* write, read and compare method */ ++ /* write, read and compare method ++ split into two loops to make it more reliable on RS/6k -ReneR */ + for(i = ProbeSize; i > 2048; i -= 2048) { + base[(i * 1024) - 1] = 0xAA; +- OUTREG8(MGAREG_CRTC_INDEX, 0); /* flush the cache */ +- usleep(1); /* twart write combination */ ++ } ++ OUTREG8(MGAREG_CRTC_INDEX, 0); /* flush the cache */ ++ usleep(4); /* twart write combination */ ++ for(i = ProbeSize; i > 2048; i -= 2048) { + if(base[(i * 1024) - 1] == 0xAA) { + SizeFound = i; + break; +@@ -1266,8 +1269,8 @@ + is handled locally and not visible outside. If the VGA fb is + handeled by the same function the third argument has to be set, + too.*/ +- xf86SetAccessFuncs(pMga->pEnt, &pMga->Access, &pMga->Access, +- &pMga->Access, NULL); ++ /* XXX: does not compile with recent XFree API changes -ReneR */ ++ xf86SetAccessFuncs(pMga->pEnt, &pMga->Access, &pMga->Access); + #endif + + /* Set pScrn->monitor */ +@@ -1779,7 +1782,8 @@ + } + } + #else +- pMga->IOAddress = pMga->PciInfo->memBase[0]; ++ /* changed to memBase[1] - tested on PowerPC RS/6k -ReneR */ ++ pMga->IOAddress = pMga->PciInfo->memBase[1]; + #endif + xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX\n", + (unsigned long)pMga->IOAddress); +@@ -2506,7 +2510,6 @@ + + pMga->FbStart = pMga->FbBase + pMga->YDstOrg * (pScrn->bitsPerPixel / 8); + +- + /* Map the ILOAD transfer window if there is one. We only make + DWORD access on DWORD boundaries to this window */ + if (pMga->ILOADAddress) { +@@ -4065,90 +4068,82 @@ + */ + + CARD8 +-dbg_inreg8(ScrnInfoPtr pScrn,int addr,int verbose) ++dbg_inreg8(ScrnInfoPtr pScrn,int addr,int verbose, char* func) + { +- MGAPtr pMga; + CARD8 ret; + +- pMga = MGAPTR(pScrn); +- ret = *(volatile CARD8 *)(pMga->IOBase + (addr)); ++ ret = MMIO_IN8(MGAPTR(pScrn)->IOBase,addr); + if(verbose) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "inreg8 : 0x%8x = 0x%x\n",addr,ret); ++ "inreg8 : %s: 0x%8x = 0x%x\n",func, addr,ret); + return ret; + } + + CARD16 +-dbg_inreg16(ScrnInfoPtr pScrn,int addr,int verbose) ++dbg_inreg16(ScrnInfoPtr pScrn,int addr,int verbose, char* func) + { +- MGAPtr pMga; + CARD16 ret; + +- pMga = MGAPTR(pScrn); +- ret = *(volatile CARD16 *)(pMga->IOBase + (addr)); ++ ret = MMIO_IN16(MGAPTR(pScrn)->IOBase,addr); + if(verbose) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "inreg16: 0x%8x = 0x%x\n",addr,ret); ++ "inreg16: %s: 0x%8x = 0x%x\n",func, addr,ret); + return ret; + } + + CARD32 +-dbg_inreg32(ScrnInfoPtr pScrn,int addr,int verbose) ++dbg_inreg32(ScrnInfoPtr pScrn,int addr,int verbose, char* func) + { +- MGAPtr pMga; + CARD32 ret; + +- pMga = MGAPTR(pScrn); +- ret = *(volatile CARD32 *)(pMga->IOBase + (addr)); ++ ret = MMIO_IN32(MGAPTR(pScrn)->IOBase,addr); + if(verbose) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "inreg32: 0x%8x = 0x%x\n",addr,ret); ++ "inreg32: %s: 0x%8x = 0x%x\n",func, addr,ret); + return ret; + } + + void +-dbg_outreg8(ScrnInfoPtr pScrn,int addr,int val) ++dbg_outreg8(ScrnInfoPtr pScrn,int addr,int val, char* func) + { +- MGAPtr pMga; + CARD8 ret; + +- pMga = MGAPTR(pScrn); + #if 0 + if( addr = MGAREG_CRTCEXT_DATA ) + return; + #endif + if( addr != 0x3c00 ) { +- ret = dbg_inreg8(pScrn,addr,0); ++ ret = dbg_inreg8(pScrn,addr,0,func); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "outreg8 : 0x%8x = 0x%x was 0x%x\n",addr,val,ret); ++ "outreg8 : %s: 0x%8x = 0x%x was 0x%x\n", ++ func,addr,val,ret); + } + else { +- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "outreg8 : index 0x%x\n",val); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "outreg8 : %s: index 0x%x\n", ++ func,val); + } +- *(volatile CARD8 *)(pMga->IOBase + (addr)) = (val); ++ MMIO_OUT8(MGAPTR(pScrn)->IOBase,addr,val); + } + + void +-dbg_outreg16(ScrnInfoPtr pScrn,int addr,int val) ++dbg_outreg16(ScrnInfoPtr pScrn,int addr,int val, char* func) + { +- MGAPtr pMga; + CARD16 ret; + + #if 0 + if (addr == MGAREG_CRTCEXT_INDEX) + return; + #endif +- pMga = MGAPTR(pScrn); +- ret = dbg_inreg16(pScrn,addr,0); ++ ret = dbg_inreg16(pScrn,addr,0, func); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "outreg16 : 0x%8x = 0x%x was 0x%x\n",addr,val,ret); +- *(volatile CARD16 *)(pMga->IOBase + (addr)) = (val); ++ "outreg16: %s: 0x%8x = 0x%x was 0x%x\n", ++ func,addr,val,ret); ++ MMIO_OUT16(MGAPTR(pScrn)->IOBase,addr,val); + } + + void +-dbg_outreg32(ScrnInfoPtr pScrn,int addr,int val) ++dbg_outreg32(ScrnInfoPtr pScrn,int addr,int val, char* func) + { +- MGAPtr pMga; + CARD32 ret; + + if (((addr & 0xff00) == 0x1c00) +@@ -4162,17 +4157,21 @@ + && (addr != 0x1c98) + && (addr != 0x1c9c) + ) { +- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "refused address 0x%x\n",addr); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s: refused address 0x%x\n", ++ func,addr); + return; + } +- pMga = MGAPTR(pScrn); +- ret = dbg_inreg32(pScrn,addr,0); ++ ret = dbg_inreg32(pScrn,addr,0, func); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, +- "outreg32 : 0x%8x = 0x%x was 0x%x\n",addr,val,ret); +- *(volatile CARD32 *)(pMga->IOBase + (addr)) = (val); ++ "outreg32: %s: 0x%8x = 0x%x was 0x%x\n", ++ func,addr,val,ret); ++ MMIO_OUT32(MGAPTR(pScrn)->IOBase,addr,val); + } + #endif /* DEBUG */ + ++/* Hack for the debug macro shortcomming -ReneR */ ++#define OUTREG(addr, val) MMIO_OUT32(pMga->IOBase, addr, val) ++ + static void + MGAG100BlackMagic(MGAPtr pMga) + { +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c 2003-01-16 17:09:10.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c 2004-02-13 01:16:52.000000000 +0100 +@@ -2359,6 +2359,7 @@ + BoxPtr pbox; + MGAPtr pMga; + int xorg, yorg; ++ ScrnInfoPtr pScrn; + + if(!numRects) return; + +@@ -2369,6 +2370,7 @@ + + infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); + pMga = MGAPTR(infoRec->pScrn); ++ pScrn = xf86Screens[pGC->pScreen->myNum]; + xorg = pDraw->x; + yorg = pDraw->y; + +diff -ur xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c +--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c 2003-11-21 06:59:15.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c 2004-02-15 01:07:28.000000000 +0100 +@@ -458,8 +458,10 @@ + int h, + int w + ){ ++ + w <<= 1; + while(h--) { ++ /* XXX Maybe this one needs big-endian fixes, too? -ReneR */ + memcpy(dst, src, w); + src += srcPitch; + dst += dstPitch; +@@ -489,16 +491,27 @@ + s1 = src1; s2 = src2; s3 = src3; + i = w; + while(i > 4) { ++#if X_BYTE_ORDER == X_LITTLE_ENDIAN + dst[0] = s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24); + dst[1] = s1[2] | (s1[3] << 16) | (s3[1] << 8) | (s2[1] << 24); + dst[2] = s1[4] | (s1[5] << 16) | (s3[2] << 8) | (s2[2] << 24); + dst[3] = s1[6] | (s1[7] << 16) | (s3[3] << 8) | (s2[3] << 24); ++#else ++ dst[0] = (s1[0] << 16) | s1[1] | (s3[0] << 24) | (s2[0] << 8); ++ dst[1] = (s1[2] << 16) | s1[3] | (s3[1] << 24) | (s2[1] << 8); ++ dst[2] = (s1[4] << 16) | s1[5] | (s3[2] << 24) | (s2[2] << 8); ++ dst[3] = (s1[6] << 16) | s1[7] | (s3[3] << 24) | (s2[3] << 8); ++#endif + dst += 4; s2 += 4; s3 += 4; s1 += 8; + i -= 4; + } + + while(i--) { ++#if X_BYTE_ORDER == X_LITTLE_ENDIAN + dst[0] = s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24); ++#else ++ dst[0] = (s1[0] << 16) | s1[1] | (s3[0] << 24) | (s2[0] << 8); ++#endif + dst++; s2++; s3++; + s1 += 2; + } +@@ -1006,6 +1019,7 @@ + XF86SurfacePtr surface + ){ + OffscreenPrivPtr pPriv = (OffscreenPrivPtr)surface->devPrivate.ptr; ++ ScrnInfoPtr pScrn = surface->pScrn; + + if(pPriv->isOn) { + MGAPtr pMga = MGAPTR(surface->pScrn); diff --git a/package/x11/xfree86/no-fc-cache-run.patch b/package/x11/xfree86/no-fc-cache-run.patch index 8ac462882..fcde72594 100644 --- a/package/x11/xfree86/no-fc-cache-run.patch +++ b/package/x11/xfree86/no-fc-cache-run.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/no-fc-cache-run.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/parse-config b/package/x11/xfree86/parse-config index e9b18f424..665b743d5 100644 --- a/package/x11/xfree86/parse-config +++ b/package/x11/xfree86/parse-config @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/parse-config -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/radeon-dual-head.patch b/package/x11/xfree86/radeon-dual-head.patch new file mode 100644 index 000000000..635756157 --- /dev/null +++ b/package/x11/xfree86/radeon-dual-head.patch @@ -0,0 +1,74 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/x11/xfree86/radeon-dual-head.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + + +On dual-head setups the accel engine is reset two times - but for the second +head not all mode data is present. So do not write random data into the +surface control register. + + - Rene Rebe + +diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c +--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c 2003-11-21 06:59:08.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c 2004-02-09 03:54:42.000000000 +0100 +@@ -295,8 +295,10 @@ + OUTREGP(RADEON_DP_DATATYPE, 0, ~RADEON_HOST_BIG_ENDIAN_EN); + #endif + +- /* Restore SURFACE_CNTL */ +- OUTREG(RADEON_SURFACE_CNTL, info->ModeReg.surface_cntl); ++ /* Restore SURFACE_CNTL - only the first head contains valid data -ReneR */ ++ if (!info->IsSecondary) { ++ OUTREG(RADEON_SURFACE_CNTL, info->ModeReg.surface_cntl); ++ } + + RADEONWaitForFifo(pScrn, 1); + OUTREG(RADEON_DEFAULT_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX +diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c +--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2003-11-21 06:59:08.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2004-02-09 15:57:10.000000000 +0100 +@@ -6064,13 +6077,16 @@ + save->disp_merge_cntl &= ~RADEON_DISP_RGB_OFFSET_EN; + + #if X_BYTE_ORDER == X_BIG_ENDIAN ++ /* Alhought we current onlu use aperture 0, also setting aperture 1 should not harm -ReneR */ + switch (pScrn->bitsPerPixel) { + case 16: + save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP; ++ save->surface_cntl |= RADEON_NONSURF_AP1_SWP_16BPP; + break; + + case 32: + save->surface_cntl |= RADEON_NONSURF_AP0_SWP_32BPP; ++ save->surface_cntl |= RADEON_NONSURF_AP1_SWP_32BPP; + break; + } + #endif +diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h +--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h 2003-11-21 06:59:08.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h 2004-02-09 03:10:09.000000000 +0100 +@@ -1064,6 +1064,8 @@ + # define RADEON_SURF_TRANSLATION_DIS (1 << 8) + # define RADEON_NONSURF_AP0_SWP_16BPP (1 << 20) + # define RADEON_NONSURF_AP0_SWP_32BPP (1 << 21) ++# define RADEON_NONSURF_AP1_SWP_16BPP (1 << 22) ++# define RADEON_NONSURF_AP1_SWP_32BPP (1 << 23) + #define RADEON_SURFACE0_INFO 0x0b0c + #define RADEON_SURFACE0_LOWER_BOUND 0x0b04 + #define RADEON_SURFACE0_UPPER_BOUND 0x0b08 diff --git a/package/x11/xfree86/radeon-iBook.patch b/package/x11/xfree86/radeon-iBook.patch new file mode 100644 index 000000000..2288a43d6 --- /dev/null +++ b/package/x11/xfree86/radeon-iBook.patch @@ -0,0 +1,47 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/x11/xfree86/radeon-iBook.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + + +On iBook the PLL values for the LCD port are not caluculated correctly - since +I do not have the databook I applied the same hack as present in the BenH +kernel radeon fb ... + + - Rene Rebe + +diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c +--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2003-11-21 06:59:08.000000000 +0100 ++++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2004-02-09 15:57:10.000000000 +0100 +@@ -6504,8 +6520,17 @@ + save->feedback_div, + save->post_div)); + ++ ErrorF ("ref_div: %d, bitvalue: %d, feedback_div: %d\n", ++ pll->reference_div, post_div->bitvalue, save->feedback_div); ++ + save->ppll_ref_div = pll->reference_div; + save->ppll_div_3 = (save->feedback_div | (post_div->bitvalue << 16)); ++#if defined(__powerpc__) ++ ErrorF ("pll_div_3: %d, ", save->ppll_div_3); ++ //save->ppll_div_3 *= 6; // just a test hack ++ save->ppll_div_3 = 0x000600ad; // -ReneR ++ ErrorF ("is now: %d, should be: %d\n", save->ppll_div_3, 0x000600ad); ++#endif + save->htotal_cntl = 0; + } + diff --git a/package/x11/xfree86/startwm.patch b/package/x11/xfree86/startwm.patch index e673812fb..26a3fe4f1 100644 --- a/package/x11/xfree86/startwm.patch +++ b/package/x11/xfree86/startwm.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/startwm.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/stone_mod_xfree86.sh b/package/x11/xfree86/stone_mod_xfree86.sh index 395ccaac9..3f3637864 100644 --- a/package/x11/xfree86/stone_mod_xfree86.sh +++ b/package/x11/xfree86/stone_mod_xfree86.sh @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/stone_mod_xfree86.sh -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/twm-defaults.patch b/package/x11/xfree86/twm-defaults.patch index 1856ca479..09a20383b 100644 --- a/package/x11/xfree86/twm-defaults.patch +++ b/package/x11/xfree86/twm-defaults.patch @@ -7,7 +7,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/twm-defaults.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/xconsole-pty.patch b/package/x11/xfree86/xconsole-pty.patch index ac021136b..22ea8172c 100644 --- a/package/x11/xfree86/xconsole-pty.patch +++ b/package/x11/xfree86/xconsole-pty.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/xconsole-pty.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/xf_config.sh b/package/x11/xfree86/xf_config.sh index 895e6019a..9c8a469cf 100644 --- a/package/x11/xfree86/xf_config.sh +++ b/package/x11/xfree86/xf_config.sh @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/xf_config.sh -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/xfree86.conf b/package/x11/xfree86/xfree86.conf index 44cdd96e9..dd5ad9fb1 100644 --- a/package/x11/xfree86/xfree86.conf +++ b/package/x11/xfree86/xfree86.conf @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/xfree86.conf -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/xfree86.desc b/package/x11/xfree86/xfree86.desc index 7cf96b20f..c68711b95 100644 --- a/package/x11/xfree86/xfree86.desc +++ b/package/x11/xfree86/xfree86.desc @@ -7,7 +7,7 @@ [COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! [COPY] [COPY] ROCK Linux: rock-src/package/x11/xfree86/xfree86.desc -[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +[COPY] ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf [COPY] [COPY] This program is free software; you can redistribute it and/or modify [COPY] it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/xfs.init b/package/x11/xfree86/xfs.init index 63faa9b52..b2cd45355 100644 --- a/package/x11/xfree86/xfs.init +++ b/package/x11/xfree86/xfs.init @@ -8,7 +8,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/xfs.init -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/package/x11/xfree86/xterm-ls.patch b/package/x11/xfree86/xterm-ls.patch index 39f649432..833897c98 100644 --- a/package/x11/xfree86/xterm-ls.patch +++ b/package/x11/xfree86/xterm-ls.patch @@ -6,7 +6,7 @@ # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/x11/xfree86/xterm-ls.patch -# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license diff --git a/package/x11/xfree86/xv-bigendian.patch b/package/x11/xfree86/xv-bigendian.patch new file mode 100644 index 000000000..93383febf --- /dev/null +++ b/package/x11/xfree86/xv-bigendian.patch @@ -0,0 +1,50 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/x11/xfree86/xv-bigendian.patch +# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +An obvious (but nevertheless hard to track) typo affecting XV on big-endian +systems with drivers using the generic xf86CopyYUV12ToPacked like: mach64, +neomagic, s3, s3virge, siliconmotion and trident. Only ati/mach64 was tested +on UltraSPARC ... + +--- xc/programs/Xserver/hw/xfree86/common/xf86xv.c 2003-11-21 05:59:00.000000000 +0000 ++++ xc-working/programs/Xserver/hw/xfree86/common/xf86xv.c 2004-02-10 01:50:39.010000000 +0000 +@@ -1979,10 +1979,10 @@ + Dst[3] = Y[6] | (Y[7] << 16) | (U[3] << 8) | (V[3] << 24); + #else + /* This assumes a little-endian framebuffer */ +- Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | Y[0]; +- Dst[1] = (Y[2] << 24) | (Y[3] << 8) | (U[1] << 16) | Y[1]; +- Dst[2] = (Y[4] << 24) | (Y[5] << 8) | (U[2] << 16) | Y[2]; +- Dst[3] = (Y[6] << 24) | (Y[7] << 8) | (U[3] << 16) | Y[3]; ++ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; ++ Dst[1] = (Y[2] << 24) | (Y[3] << 8) | (U[1] << 16) | V[1]; ++ Dst[2] = (Y[4] << 24) | (Y[5] << 8) | (U[2] << 16) | V[2]; ++ Dst[3] = (Y[6] << 24) | (Y[7] << 8) | (U[3] << 16) | V[3]; + #endif + Dst += 4; Y += 8; V += 4; U += 4; + i -= 4; +@@ -1993,7 +1993,7 @@ + Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24); + #else + /* This assumes a little-endian framebuffer */ +- Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | Y[0]; ++ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; + #endif + Dst++; Y += 2; V++; U++; + }