ChangeLog | 88 ++++++++++++++++++ configure.ac | 3 debian/changelog | 7 + man/chips.man | 3 src/ct_accel.c | 46 +-------- src/ct_driver.c | 255 +++++++------------------------------------------------ src/ct_driver.h | 7 - src/ct_video.c | 3 util/dRegs.c | 57 ------------ util/iopl.h | 60 ++++++++++++ util/mRegs.c | 57 ------------ util/modClock.c | 53 ----------- 12 files changed, 204 insertions(+), 435 deletions(-)
New commits: commit 9afb2c9858b88f88d4975170f1f6cff0e69478ae Author: Cyril Brulebois <[email protected]> Date: Tue May 1 14:13:26 2012 +0200 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index a7c4ec6..ed5c3c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -xserver-xorg-video-chips (1:1.2.4-2) UNRELEASED; urgency=low +xserver-xorg-video-chips (1:1.2.4-2) unstable; urgency=low * Merge upstream master branch up to 989cf4f1fb to cope with the new vgaHW ABI, fixing the FTBFS against X server 1.12. - -- Cyril Brulebois <[email protected]> Tue, 01 May 2012 14:11:57 +0200 + -- Cyril Brulebois <[email protected]> Tue, 01 May 2012 14:13:21 +0200 xserver-xorg-video-chips (1:1.2.4-1) unstable; urgency=low commit aa7e2fc805bc22f2482c98c745b9b65e08e5e50a Author: Cyril Brulebois <[email protected]> Date: Tue May 1 14:13:19 2012 +0200 Bump changelogs. diff --git a/ChangeLog b/ChangeLog index 36a87d3..a30a8c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,91 @@ +commit 989cf4f1fb2ac57f38d363734b71a5cf749db146 +Author: Adam Jackson <[email protected]> +Date: Mon Dec 19 17:45:41 2011 -0500 + + Fix for new vgaHW ABI + + Signed-off-by: Adam Jackson <[email protected]> + +commit 5d5753551609f1483801e5edd8d42b11713c981e +Author: Adam Jackson <[email protected]> +Date: Mon Dec 19 16:18:34 2011 -0500 + + Fall back to shadowfb if XAA is unavailable + + Signed-off-by: Adam Jackson <[email protected]> + +commit 8a5ea07f30cc71ecc413fad0713facff72f77472 +Author: Jeremy Huddleston <[email protected]> +Date: Tue Oct 18 23:21:33 2011 -0700 + + Build fix for ABI Version 12 + + ABI Version 12 removes support for multiple PCI domains. If you need to + use this driver on a system with more than one PCI domain, you should + either port this driver to using libpciaccess directly or stick with an + older server. + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit c421f2477c99990d0dc712d6aece981fa6c961e5 +Author: Jeremy Huddleston <[email protected]> +Date: Tue Oct 18 23:09:09 2011 -0700 + + Fix implicit declaration of iopl + + warning: implicit declaration of function ‘iopl’ [-Wimplicit-function-declaration] + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit 94a8b34528b42a4fe6f81c8b8bd1ddb6bebaeea9 +Author: Jeremy Huddleston <[email protected]> +Date: Tue Oct 18 23:04:32 2011 -0700 + + util: Consolidate common macros + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit f5191838b70d67e991bef3491d2a60915988079c +Author: Jeremy Huddleston <[email protected]> +Date: Tue Oct 18 22:37:00 2011 -0700 + + configure.ac: Remove AM_PROG_CC_C_O + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit 7ca1840f39d0216e44fe1ca938cfc3ced048da1d +Author: Jeremy Huddleston <[email protected]> +Date: Tue Oct 18 22:24:54 2011 -0700 + + Use malloc/calloc/realloc/free directly + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit 5f8a7320123255408b393eab9ecfae783920622a +Author: Mark Kettenis <[email protected]> +Date: Mon Sep 26 21:26:26 2011 +0200 + + PciTag is unused when using libpciaccess + + Signed-off-by: Mark Kettenis <[email protected]> + Reviewed-by: Jeremy Huddleston <[email protected]> + Reviewed-by: Julien Cristau <[email protected]> + +commit e4bd864898fd276a62dac05cdfff394e98434f02 +Author: Dave Airlie <[email protected]> +Date: Tue Mar 29 13:53:31 2011 +1000 + + chips: gut the overlay 8/16 support from driver. + + This driver is for chips that were bought by Intel in 1997, + this feature means maintaining a lot of code in the X server + for little gain. + + Drop it like its hot. + + Signed-off-by: Dave Airlie <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + commit 314b72730340ce934c00f1756e4489e97635e1a9 Author: Julien Cristau <[email protected]> Date: Sun Feb 27 17:12:48 2011 +0100 diff --git a/debian/changelog b/debian/changelog index ada2355..a7c4ec6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-chips (1:1.2.4-2) UNRELEASED; urgency=low + + * Merge upstream master branch up to 989cf4f1fb to cope with + the new vgaHW ABI, fixing the FTBFS against X server 1.12. + + -- Cyril Brulebois <[email protected]> Tue, 01 May 2012 14:11:57 +0200 + xserver-xorg-video-chips (1:1.2.4-1) unstable; urgency=low * New upstream release. commit 989cf4f1fb2ac57f38d363734b71a5cf749db146 Author: Adam Jackson <[email protected]> Date: Mon Dec 19 17:45:41 2011 -0500 Fix for new vgaHW ABI Signed-off-by: Adam Jackson <[email protected]> diff --git a/src/ct_driver.c b/src/ct_driver.c index 95092a2..08ccd72 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1444,6 +1444,7 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) return FALSE; hwp = VGAHWPTR(pScrn); + vgaHWSetStdFuncs(hwp); vgaHWGetIOBase(hwp); #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 cPtr->PIOBase = hwp->PIOOffset; commit 5d5753551609f1483801e5edd8d42b11713c981e Author: Adam Jackson <[email protected]> Date: Mon Dec 19 16:18:34 2011 -0500 Fall back to shadowfb if XAA is unavailable Signed-off-by: Adam Jackson <[email protected]> diff --git a/src/ct_driver.c b/src/ct_driver.c index a2e5c94..95092a2 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1345,10 +1345,9 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flags) if (cPtr->Flags & ChipsAccelSupport) { if (!xf86LoadSubModule(pScrn, "xaa")) { - vbeFree(cPtr->pVbe); - cPtr->pVbe = NULL; - CHIPSFreeRec(pScrn); - return FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n"); + cPtr->Flags &= ~(ChipsAccelSupport); + cPtr->Flags |= ChipsShadowFB; } } commit 8a5ea07f30cc71ecc413fad0713facff72f77472 Author: Jeremy Huddleston <[email protected]> Date: Tue Oct 18 23:21:33 2011 -0700 Build fix for ABI Version 12 ABI Version 12 removes support for multiple PCI domains. If you need to use this driver on a system with more than one PCI domain, you should either port this driver to using libpciaccess directly or stick with an older server. Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/src/ct_driver.c b/src/ct_driver.c index e6538c6..a2e5c94 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1446,7 +1446,12 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) hwp = VGAHWPTR(pScrn); vgaHWGetIOBase(hwp); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 cPtr->PIOBase = hwp->PIOOffset; +#else + cPtr->PIOBase = 0; +#endif + /* * Must allow ensure that storage for the 2nd set of vga registers is * allocated for dual channel cards diff --git a/src/ct_driver.h b/src/ct_driver.h index 39eeb6e..9033867 100644 --- a/src/ct_driver.h +++ b/src/ct_driver.h @@ -276,8 +276,8 @@ typedef struct _CHIPSRec { #endif int Chipset; EntityInfoPtr pEnt; - IOADDRESS PIOBase; - CARD32 IOAddress; + unsigned long PIOBase; + unsigned long IOAddress; unsigned long FbAddress; unsigned int IOBase; unsigned char * FbBase; commit c421f2477c99990d0dc712d6aece981fa6c961e5 Author: Jeremy Huddleston <[email protected]> Date: Tue Oct 18 23:09:09 2011 -0700 Fix implicit declaration of iopl warning: implicit declaration of function ‘iopl’ [-Wimplicit-function-declaration] Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/util/iopl.h b/util/iopl.h index d7890b3..e08207c 100644 --- a/util/iopl.h +++ b/util/iopl.h @@ -3,6 +3,12 @@ # include <machine/pio.h> # include <machine/sysarch.h> #else +# if defined(__linux__) +/* Can't because <sys/iopl.h> provides conflicting inb, outb, etc + * # include <sys/io.h> + */ +int iopl(int level); +# endif # if defined(SVR4) && defined(i386) # include <sys/types.h> # ifdef NCR commit 94a8b34528b42a4fe6f81c8b8bd1ddb6bebaeea9 Author: Jeremy Huddleston <[email protected]> Date: Tue Oct 18 23:04:32 2011 -0700 util: Consolidate common macros Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/util/dRegs.c b/util/dRegs.c index b7edc8f..0d2f0cb 100644 --- a/util/dRegs.c +++ b/util/dRegs.c @@ -1,63 +1,8 @@ - - - - - - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" int main(void) { diff --git a/util/iopl.h b/util/iopl.h new file mode 100644 index 0000000..d7890b3 --- /dev/null +++ b/util/iopl.h @@ -0,0 +1,54 @@ +#ifdef __NetBSD__ +# include <sys/types.h> +# include <machine/pio.h> +# include <machine/sysarch.h> +#else +# if defined(SVR4) && defined(i386) +# include <sys/types.h> +# ifdef NCR + /* broken NCR <sys/sysi86.h> */ +# define __STDC +# include <sys/sysi86.h> +# undef __STDC +# else +# include <sys/sysi86.h> +# endif +# ifdef SVR4 +# if !defined(sun) +# include <sys/seg.h> +# endif +# endif +# include <sys/v86.h> +# if defined(sun) +# include <sys/psw.h> +# endif +# endif +# include "AsmMacros.h" +#endif /* NetBSD */ + +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> + +#ifdef __NetBSD__ +# define SET_IOPL() i386_iopl(3) +# define RESET_IOPL() i386_iopl(0) +#else +# if defined(SVR4) && defined(i386) +# ifndef SI86IOPL +# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) +# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) +# else +# define SET_IOPL() sysi86(SI86IOPL,3) +# define RESET_IOPL() sysi86(SI86IOPL,0) +# endif +# else +# ifdef linux +# define SET_IOPL() iopl(3) +# define RESET_IOPL() iopl(0) +# else +# define SET_IOPL() (void)0 +# define RESET_IOPL() (void)0 +# endif +# endif +#endif diff --git a/util/mRegs.c b/util/mRegs.c index f359738..843d01d 100644 --- a/util/mRegs.c +++ b/util/mRegs.c @@ -1,63 +1,8 @@ - - - - - - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" int hex2int(char* str); diff --git a/util/modClock.c b/util/modClock.c index 89a291a..45af19b 100644 --- a/util/modClock.c +++ b/util/modClock.c @@ -1,61 +1,12 @@ - -#ifdef __NetBSD__ -# include <sys/types.h> -# include <machine/pio.h> -# include <machine/sysarch.h> -#else -# if defined(SVR4) && defined(i386) -# include <sys/types.h> -# ifdef NCR - /* broken NCR <sys/sysi86.h> */ -# define __STDC -# include <sys/sysi86.h> -# undef __STDC -# else -# include <sys/sysi86.h> -# endif -# ifdef SVR4 -# if !defined(sun) -# include <sys/seg.h> -# endif -# endif -# include <sys/v86.h> -# if defined(sun) -# include <sys/psw.h> -# endif -# endif -# include "AsmMacros.h" -#endif /* NetBSD */ - #include <unistd.h> #include <stdio.h> #include <stdlib.h> + #ifndef Lynx #include <fnmatch.h> #endif -#ifdef __NetBSD__ -# define SET_IOPL() i386_iopl(3) -# define RESET_IOPL() i386_iopl(0) -#else -# if defined(SVR4) && defined(i386) -# ifndef SI86IOPL -# define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) -# define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) -# else -# define SET_IOPL() sysi86(SI86IOPL,3) -# define RESET_IOPL() sysi86(SI86IOPL,0) -# endif -# else -# ifdef linux -# define SET_IOPL() iopl(3) -# define RESET_IOPL() iopl(0) -# else -# define SET_IOPL() (void)0 -# define RESET_IOPL() (void)0 -# endif -# endif -#endif +#include "iopl.h" #define tolerance 0.01 /* +/- 1% */ commit f5191838b70d67e991bef3491d2a60915988079c Author: Jeremy Huddleston <[email protected]> Date: Tue Oct 18 22:37:00 2011 -0700 configure.ac: Remove AM_PROG_CC_C_O Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/configure.ac b/configure.ac index 225e516..c0ed508 100644 --- a/configure.ac +++ b/configure.ac @@ -44,9 +44,6 @@ XORG_DEFAULT_OPTIONS AC_DISABLE_STATIC AC_PROG_LIBTOOL -# Checks for programs. -AM_PROG_CC_C_O - AH_TOP([#include "xorg-server.h"]) # Define a configure option for an alternate module directory commit 7ca1840f39d0216e44fe1ca938cfc3ced048da1d Author: Jeremy Huddleston <[email protected]> Date: Tue Oct 18 22:24:54 2011 -0700 Use malloc/calloc/realloc/free directly Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/src/ct_driver.c b/src/ct_driver.c index 08df050..e6538c6 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -949,7 +949,7 @@ CHIPSProbe(DriverPtr drv, int flags) } } - xfree(usedChips); + free(usedChips); } } @@ -981,12 +981,12 @@ CHIPSProbe(DriverPtr drv, int flags) pScrn->ValidMode = CHIPSValidMode; foundScreen = TRUE; } - xfree(usedChips); + free(usedChips); } } #endif - xfree(devSections); + free(devSections); return foundScreen; } #endif @@ -4126,7 +4126,7 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY, pScrn->displayWidth, pBankInfo)) { - xfree(pBankInfo); + free(pBankInfo); pBankInfo = NULL; return FALSE; } commit 5f8a7320123255408b393eab9ecfae783920622a Author: Mark Kettenis <[email protected]> Date: Mon Sep 26 21:26:26 2011 +0200 PciTag is unused when using libpciaccess Signed-off-by: Mark Kettenis <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> Reviewed-by: Julien Cristau <[email protected]> diff --git a/src/ct_driver.h b/src/ct_driver.h index 10a24d4..39eeb6e 100644 --- a/src/ct_driver.h +++ b/src/ct_driver.h @@ -271,7 +271,9 @@ typedef struct { typedef struct _CHIPSRec { pciVideoPtr PciInfo; +#ifndef XSERVER_LIBPCIACCESS PCITAG PciTag; +#endif int Chipset; EntityInfoPtr pEnt; IOADDRESS PIOBase; commit e4bd864898fd276a62dac05cdfff394e98434f02 Author: Dave Airlie <[email protected]> Date: Tue Mar 29 13:53:31 2011 +1000 chips: gut the overlay 8/16 support from driver. This driver is for chips that were bought by Intel in 1997, this feature means maintaining a lot of code in the X server for little gain. Drop it like its hot. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Adam Jackson <[email protected]> diff --git a/man/chips.man b/man/chips.man index 740af38..0c022ee 100644 --- a/man/chips.man +++ b/man/chips.man @@ -165,9 +165,6 @@ Force the use of memory mapped IO where it can be used. Default: off Force driver to leave centering and stretching registers alone. This can fix some laptop suspend/resume problems. Default: off .TP -.BI "Option \*qOverlay\*q" -Enable 8+24 overlay mode. Only appropriate for depth 24. Default: off. -.TP .BI "Option \*qColorKey\*q \*q" integer \*q Set the colormap index used for the transparency key for the depth 8 plane when operating in 8+16 overlay mode. The value must be in the range diff --git a/src/ct_accel.c b/src/ct_accel.c index 3920b0a..4b5776a 100644 --- a/src/ct_accel.c +++ b/src/ct_accel.c @@ -428,19 +428,7 @@ chips_imagewrite: infoPtr->ImageWriteFlags |= NO_PLANEMASK; #endif - -#ifdef CHIPS_HIQV - if (XAAInit(pScreen, infoPtr)) { - if (cPtr->Flags & ChipsOverlay8plus16) - return(XAAInitDualFramebufferOverlay(pScreen, - CTNAME(DepthChange))); - else - return TRUE; - } else - return FALSE; -#else return(XAAInit(pScreen, infoPtr)); -#endif } #ifdef CHIPS_HIQV @@ -1243,11 +1231,6 @@ CTNAME(SubsequentScreenToScreenColorExpandFill)(ScrnInfoPtr pScrn, #endif w *= cAcl->BytesPerPixel; ctBLTWAIT; -#ifdef CHIPS_HIQV - if ((y >= pScrn->virtualY) && (cPtr->Flags & ChipsOverlay8plus16) && - (pScrn->depth == 8)) - ctSETPITCH(cAcl->PitchInBytes << 1, cAcl->PitchInBytes); -#endif ctSETSRCADDR(srcaddr); ctSETDSTADDR(destaddr); #ifdef CHIPS_HIQV @@ -1271,10 +1254,6 @@ CTNAME(SetupForColor8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty, patternaddr = (paty * pScrn->displayWidth + (patx & ~0x3F)) * cAcl->BytesPerPixel; cAcl->patternyrot = (patx & 0x3F) >> 3; -#ifdef CHIPS_HIQV - if (cPtr->Flags & ChipsOverlay8plus16) - patternaddr += cPtr->FbOffset16; -#endif ctBLTWAIT; ctSETPATSRCADDR(patternaddr); @@ -1338,10 +1317,7 @@ CTNAME(SetupForMono8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty, #ifdef CHIPS_HIQV patternaddr = paty * pScrn->displayWidth + patx; - if (cPtr->Flags & ChipsOverlay8plus16) - patternaddr = patternaddr * 2 + cPtr->FbOffset16; - else - patternaddr *= cAcl->BytesPerPixel; + patternaddr *= cAcl->BytesPerPixel; #else patternaddr = (paty * pScrn->displayWidth + patx) * cAcl->BytesPerPixel; #endif @@ -1593,10 +1569,7 @@ CTNAME(WritePixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, dwords = (((skipleft + bytesPerLine + 0x7) & ~0x7)) >> 2; destaddr = (y * pScrn->displayWidth + x) * (bpp >> 3); destpitch = pScrn->displayWidth * (bpp >> 3); - if ((y >= pScrn->virtualY) && (cPtr->Flags & ChipsOverlay8plus16)) - destaddr += cPtr->FbOffset16; - else - destaddr += cAcl->FbOffset; + destaddr += cAcl->FbOffset; ctBLTWAIT; @@ -1681,10 +1654,7 @@ CTNAME(WritePixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, y++; destaddr = (y * pScrn->displayWidth + x) * (bpp >> 3); - if ((y >= pScrn->virtualY) && (cPtr->Flags & ChipsOverlay8plus16)) - destaddr += cPtr->FbOffset16; - else - destaddr += cAcl->FbOffset; + destaddr += cAcl->FbOffset; ctBLTWAIT; ctSETDSTADDR(destaddr); @@ -1717,10 +1687,7 @@ CTNAME(ReadPixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, dwords = (((bytesPerLine + 0x7) & ~0x7)) >> 2; srcaddr = (y * pScrn->displayWidth + x) * (bpp >> 3); srcpitch = pScrn->displayWidth * (bpp >> 3); - if ((y >= pScrn->virtualY) && (cPtr->Flags & ChipsOverlay8plus16)) - srcaddr += cPtr->FbOffset16; - else - srcaddr += cAcl->FbOffset; + srcaddr += cAcl->FbOffset; ctBLTWAIT; ctSETROP( ctDSTSYSTEM | ctLEFT2RIGHT | ctTOP2BOTTOM | @@ -1755,10 +1722,7 @@ CTNAME(ReadPixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, dst += dstwidth; y++; srcaddr = (y * pScrn->displayWidth + x) * (bpp >> 3); - if ((y >= pScrn->virtualY) && (cPtr->Flags & ChipsOverlay8plus16)) - srcaddr += cPtr->FbOffset16; - else - srcaddr += cAcl->FbOffset; + srcaddr += cAcl->FbOffset; ctBLTWAIT; ctSETSRCADDR(srcaddr); ctSETHEIGHTWIDTHGO(h, bytesPerLine); diff --git a/src/ct_driver.c b/src/ct_driver.c index 6624b79..08df050 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -1639,55 +1639,15 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) } } - if ((s = xf86GetOptValString(cPtr->Options, OPTION_OVERLAY))) { - if (!*s || !xf86NameCmp(s, "8,16") || !xf86NameCmp(s, "16,8")) { - if (pScrn->bitsPerPixel == 16) { - if (cPtr->Flags & ChipsLinearSupport) { - cPtr->Flags |= ChipsOverlay8plus16; - if(!xf86GetOptValInteger( - cPtr->Options, OPTION_COLOR_KEY, &(pScrn->colorKey))) - pScrn->colorKey = TRANSPARENCY_KEY; - pScrn->overlayFlags = OVERLAY_8_16_DUALFB; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "PseudoColor overlay enabled.\n"); - if (!xf86IsOptionSet(cPtr->Options, OPTION_LCD_STRETCH)) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - " - Forcing option \"Stretch\" \"ON\".\n"); - if (!xf86IsOptionSet(cPtr->Options, OPTION_LCD_CENTER)) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - " - Forcing option \"LcdCenter\" \"OFF\".\n"); - if (cPtr->Flags & ChipsShadowFB) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - " - Disabling \"Shadow Framebuffer\".\n"); - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - " Not support with option \"8Plus16\".\n"); - cPtr->Flags &= ~ChipsShadowFB; - cPtr->Rotate = 0; - } - } else { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Option \"Overlay\" ignored. Not supported without linear addressing\n"); - } - } else { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Option \"Overlay\" is not supported in this configuration\n"); - } - } else { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "\"%s\" is not a valid value for Option \"Overlay\"\n", s); - } - } - - if (!(cPtr->Flags & ChipsOverlay8plus16)) { - if(xf86GetOptValInteger(cPtr->Options, OPTION_VIDEO_KEY, - &(cPtr->videoKey))) { - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "video key set to 0x%x\n", + if(xf86GetOptValInteger(cPtr->Options, OPTION_VIDEO_KEY, + &(cPtr->videoKey))) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "video key set to 0x%x\n", cPtr->videoKey); - } else { - cPtr->videoKey = (1 << pScrn->offset.red) | + } else { + cPtr->videoKey = (1 << pScrn->offset.red) | (1 << pScrn->offset.green) | (((pScrn->mask.blue >> pScrn->offset.blue) - 1) << pScrn->offset.blue); - } } if (cPtr->Flags & ChipsShadowFB) { @@ -2335,28 +2295,16 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags) /* and 32bits on the others. Thus multiply by a suitable factor */ if (cPtr->Flags & Chips64BitMemory) { if (cPtr->FrameBufferSize && (cPtr->PanelType & ChipsLCD)) - if (cPtr->Flags & ChipsOverlay8plus16 ) - cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 8 * 0.7 / 4); - else cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 8 * 0.7 / (bytesPerPixel + 1)); else - if (cPtr->Flags & ChipsOverlay8plus16) - cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 8 * 0.7 / 3); - else cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 8 * 0.7 / bytesPerPixel); } else { if (cPtr->FrameBufferSize && (cPtr->PanelType & ChipsLCD)) - if (cPtr->Flags & ChipsOverlay8plus16 ) - cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 4 * 0.7 / 4); - else cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 4 * 0.7 / (bytesPerPixel + 1)); else - if (cPtr->Flags & ChipsOverlay8plus16) - cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 4 * 0.7 / 3); - else cPtr->MaxClock = min(cPtr->MaxClock, MemClk->Clk * 4 * 0.7 / bytesPerPixel); } @@ -3736,8 +3684,7 @@ CHIPSEnterVT(int scrnIndex, int flags) /* Should we re-save the text mode on each VT enter? */ if(!chipsModeInit(pScrn, pScrn->currentMode)) return FALSE; - if ((!(cPtr->Flags & ChipsOverlay8plus16)) - && (cPtr->Flags & ChipsVideoSupport) + if ((cPtr->Flags & ChipsVideoSupport) && (cPtr->Flags & ChipsLinearSupport)) CHIPSResetVideo(pScrn); @@ -3788,8 +3735,7 @@ chipsLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, int i, index, shift ; CHIPSEntPtr cPtrEnt; - shift = ((pScrn->depth == 15) && - (!(cPtr->Flags & ChipsOverlay8plus16))) ? 3 : 0; + shift = (pScrn->depth == 15) ? 3 : 0; if (cPtr->UseDualChannel) { cPtrEnt = xf86GetEntityPrivate(pScrn->entityList[0], @@ -3895,18 +3841,6 @@ chipsLoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices, hwp->disablePalette(hwp); } -static Bool -cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8, - int xsize, int ysize, int dpix, int dpiy, - int width16, int width8) -{ - return - (fbOverlaySetupScreen(pScreen, pbits16, pbits8, xsize, ysize, - dpix, dpiy, width16, width8, 16, 8) && - fbOverlayFinishScreenInit(pScreen, pbits16, pbits8, xsize, ysize, - dpix, dpiy, width16, width8, 16, 8, 16, 8)); -} - /* Mandatory */ static Bool CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) @@ -3947,22 +3881,6 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!chipsMapMem(pScrn)) return FALSE; - /* Setup a pointer to the overlay if needed */ - if (cPtr->Flags & ChipsOverlay8plus16) { - cPtr->FbOffset16 = pScrn->displayWidth * pScrn->virtualY; - cPtr->FbSize16 = (pScrn->displayWidth << 1) * pScrn->virtualY; - if (cPtr->FbSize16 > (cPtr->FbMapSize - cPtr->FrameBufferSize)) { - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "Too little memory for overlay. Disabling.\n"); - cPtr->Flags &= ~ChipsOverlay8plus16; - } - if ((pScrn->displayWidth > 1024) || (pScrn->virtualY > 1024)) { - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "Max overlay Width/Height 1024 pixels. Disabling.\n"); - cPtr->Flags &= ~ChipsOverlay8plus16; - } - } - /* Setup the MMIO register access functions if need */ if (cPtr->UseFullMMIO && cPtr->MMIOBaseVGA) { CHIPSSetMmioExtFuncs(cPtr); @@ -4035,18 +3953,10 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) miClearVisualTypes(); /* Setup the visuals we support. */ - if ((pScrn->bitsPerPixel == 16) && (cPtr->Flags & ChipsOverlay8plus16)){ - if (!miSetVisualTypes(8, PseudoColorMask | GrayScaleMask, - pScrn->rgbBits, PseudoColor)) - return FALSE; - if (!miSetVisualTypes(16, TrueColorMask, pScrn->rgbBits, TrueColor)) - return FALSE; - } else { - if (!miSetVisualTypes(pScrn->depth, + if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) - return FALSE; - } + return FALSE; miSetPixmapDepths (); /* @@ -4090,13 +4000,6 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) break; #endif case 16: - if (cPtr->Flags & ChipsOverlay8plus16) { - ret = cfb8_16ScreenInit(pScreen, (unsigned char *)FBStart + - cPtr->FbOffset16, FBStart, width, - height, pScrn->xDpi, pScrn->yDpi, - displayWidth, displayWidth); - break; - } default: ret = fbScreenInit(pScreen, FBStart, width,height, @@ -4244,9 +4147,6 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (pScrn->bitsPerPixel < 8) freespace = allocatebase - pScrn->displayWidth * pScrn->virtualY / 2; - else if ((pScrn->bitsPerPixel == 16) && (cPtr->Flags & ChipsOverlay8plus16)) - freespace = allocatebase - pScrn->displayWidth * - pScrn->virtualY - cPtr->FbSize16; else freespace = allocatebase - pScrn->displayWidth * pScrn->virtualY * (pScrn->bitsPerPixel >> 3); @@ -4369,9 +4269,7 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) AvailFBArea.y2 = cAcl->CacheEnd / (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)); - if (!(cPtr->Flags & ChipsOverlay8plus16)) { - xf86InitFBManager(pScreen, &AvailFBArea); - } + xf86InitFBManager(pScreen, &AvailFBArea); } if (cPtr->Flags & ChipsAccelSupport) { if (IS_HiQV(cPtr)) { @@ -4425,16 +4323,10 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!miCreateDefColormap(pScreen)) return FALSE; - if ((cPtr->Flags & ChipsOverlay8plus16) && (pScrn->bitsPerPixel == 16)) { -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

