[PATCH] Remove 24bpp support

Adam Jackson ajax at redhat.com
Thu Nov 11 07:38:57 PST 2010


The 24bpp code is very poorly tested, and virtually no modern hardware
implements it.  If you need a 24bpp framebuffer, use shadowfb and convert
in the upload hook.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 exa/exa_accel.c                       |    3 +-
 fb/Makefile.am                        |    2 -
 fb/fb.h                               |   68 +----
 fb/fb24_32.c                          |  635 ---------------------------------
 fb/fb24_32.h                          |   51 ---
 fb/fbarc.c                            |    3 -
 fb/fbbits.c                           |   59 ---
 fb/fbblt.c                            |  330 -----------------
 fb/fbbltone.c                         |  359 -------------------
 fb/fbcopy.c                           |    5 -
 fb/fbgc.c                             |   36 --
 fb/fbgetsp.c                          |    7 -
 fb/fbglyph.c                          |  199 ----------
 fb/fbimage.c                          |   22 --
 fb/fbline.c                           |    6 -
 fb/fboverlay.c                        |   76 ----
 fb/fbpict.h                           |  202 -----------
 fb/fbpoint.c                          |   26 --
 fb/fbscreen.c                         |   46 ---
 fb/fbseg.c                            |  192 ----------
 fb/fbsetsp.c                          |    7 -
 fb/fbsolid.c                          |  137 -------
 fb/fbwindow.c                         |   29 --
 hw/xfree86/common/xf86.h              |    1 -
 hw/xfree86/common/xf86Config.c        |   26 --
 hw/xfree86/common/xf86Globals.c       |    2 -
 hw/xfree86/common/xf86Helper.c        |   75 +----
 hw/xfree86/common/xf86Init.c          |   57 +---
 hw/xfree86/common/xf86Privstr.h       |    2 -
 hw/xfree86/common/xf86str.h           |    1 -
 hw/xfree86/ramdac/BT.c                |    3 -
 hw/xfree86/ramdac/IBM.c               |    7 -
 hw/xfree86/ramdac/TI.c                |   44 ---
 hw/xfree86/xaa/Makefile.am            |   29 +--
 hw/xfree86/xaa/xaa.h                  |    3 +-
 hw/xfree86/xaa/xaaBitmap.c            |  141 --------
 hw/xfree86/xaa/xaaCpyArea.c           |    5 +-
 hw/xfree86/xaa/xaaImage.c             |  101 +-----
 hw/xfree86/xaa/xaaInit.c              |    1 -
 hw/xfree86/xaa/xaaInitAccel.c         |  277 ++++-----------
 hw/xfree86/xaa/xaaNonTEGlyph.c        |   37 --
 hw/xfree86/xaa/xaaPCache.c            |   20 -
 hw/xfree86/xaa/xaaStipple.c           |  187 +----------
 hw/xfree86/xaa/xaaTEGlyph.c           |  230 ------------
 hw/xfree86/xaa/xaacexp.h              |   30 --
 render/picture.c                      |    9 -
 render/picture.h                      |    4 -
 47 files changed, 88 insertions(+), 3704 deletions(-)
 delete mode 100644 fb/fb24_32.c
 delete mode 100644 fb/fb24_32.h
 mode change 100755 => 100644 hw/xwin/xlaunch/resources/resources.h
 mode change 100755 => 100644 hw/xwin/xlaunch/window/dialog.h
 mode change 100755 => 100644 hw/xwin/xlaunch/window/window.h
 mode change 100755 => 100644 hw/xwin/xlaunch/window/wizard.h

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 6c677c7..419a057 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1044,8 +1044,7 @@ exaFillRegionSolid (DrawablePtr	pDrawable, RegionPtr pRegion, Pixel pixel,
 
 	if (pExaPixmap->pDamage &&
 	    pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP &&
-	    pDrawable->width == 1 && pDrawable->height == 1 &&
-	    pDrawable->bitsPerPixel != 24) {
+	    pDrawable->width == 1 && pDrawable->height == 1) {
 	    ExaPixmapPriv(pPixmap);
 	    RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
 
diff --git a/fb/Makefile.am b/fb/Makefile.am
index 2f3073d..ab4933e 100644
--- a/fb/Makefile.am
+++ b/fb/Makefile.am
@@ -18,8 +18,6 @@ libwfb_la_LIBADD = $(PIXMAN_LIBS)
 
 libfb_la_SOURCES = 	\
 	fb.h		\
-	fb24_32.c	\
-	fb24_32.h	\
 	fballpriv.c	\
 	fbarc.c		\
 	fbbits.c	\
diff --git a/fb/fb.h b/fb/fb.h
index c290ebf..264a734 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -97,21 +97,6 @@
 #if GLYPHPADBYTES != 4
 #error "GLYPHPADBYTES must be 4"
 #endif
-/* whether to bother to include 24bpp support */
-#ifndef FBNO24BIT
-#define FB_24BIT
-#endif
-
-/*
- * Unless otherwise instructed, fb includes code to advertise 24bpp
- * windows with 32bpp image format for application compatibility
- */
-
-#ifdef FB_24BIT
-#ifndef FBNO24_32
-#define FB_24_32BIT
-#endif
-#endif
 
 #define FB_STIP_SHIFT	LOG2_BITMAP_PAD
 #define FB_STIP_UNIT	(1 << FB_STIP_SHIFT)
@@ -612,10 +597,6 @@ fbGetWinPrivateKey (void);
 extern _X_EXPORT const GCOps	fbGCOps;
 extern _X_EXPORT const GCFuncs	fbGCFuncs;
 
-#ifdef FB_24_32BIT
-#define FB_SCREEN_PRIVATE
-#endif
-
 /* Framebuffer access wrapper */
 typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
 typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
@@ -634,30 +615,24 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
 #define fbFinishAccess(pDraw) \
 	fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
 
-#else
-
-#define fbPrepareAccess(pPix)
-#define fbFinishAccess(pDraw)
-
-#endif
-
 
-#ifdef FB_SCREEN_PRIVATE
 extern _X_EXPORT DevPrivateKey
 fbGetScreenPrivateKey(void);
 
 /* private field of a screen */
 typedef struct {
-    unsigned char	win32bpp;	/* window bpp for 32-bpp images */
-    unsigned char	pix32bpp;	/* pixmap bpp for 32-bpp images */
-#ifdef FB_ACCESS_WRAPPER
     SetupWrapProcPtr	setupWrap;	/* driver hook to set pixmap access wrapping */
     FinishWrapProcPtr	finishWrap;	/* driver hook to clean up pixmap access wrapping */
-#endif
 } FbScreenPrivRec, *FbScreenPrivPtr;
 
 #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
 				     dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
+
+#else /* !FB_ACCESS_WRAPPER */
+
+#define fbPrepareAccess(pPix)
+#define fbFinishAccess(pDraw)
+
 #endif
 
 /* private field of GC */
@@ -667,7 +642,6 @@ typedef struct {
     FbBits		fg, bg, pm;	/* expanded and filled */
     unsigned int	dashLength;	/* total of all dash elements */
     unsigned char    	evenStipple;	/* stipple is even */
-    unsigned char    	bpp;		/* current drawable bpp */
 } FbGCPrivRec, *FbGCPrivPtr;
 
 #define fbGetGCPrivate(pGC)	((FbGCPrivPtr)\
@@ -1223,24 +1197,6 @@ fbBltOne (FbStip   *src,
 	  FbBits   bgand,
 	  FbBits   bgxor);
  
-#ifdef FB_24BIT
-extern _X_EXPORT void
-fbBltOne24 (FbStip    *src,
-	  FbStride  srcStride,	    /* FbStip units per scanline */
-	  int	    srcX,	    /* bit position of source */
-	  FbBits    *dst,
-	  FbStride  dstStride,	    /* FbBits units per scanline */
-	  int	    dstX,	    /* bit position of dest */
-	  int	    dstBpp,	    /* bits per destination unit */
-
-	  int	    width,	    /* width in bits of destination */
-	  int	    height,	    /* height in scanlines */
-
-	  FbBits    fgand,	    /* rrop values */
-	  FbBits    fgxor,
-	  FbBits    bgand,
-	  FbBits    bgxor);
-#endif
 
 extern _X_EXPORT void
 fbBltPlane (FbBits	    *src,
@@ -1868,18 +1824,6 @@ fbSolid (FbBits	    *dst,
 	 FbBits	    and,
 	 FbBits	    xor);
 
-#ifdef FB_24BIT
-extern _X_EXPORT void
-fbSolid24 (FbBits   *dst,
-	   FbStride dstStride,
-	   int	    dstX,
-
-	   int	    width,
-	   int	    height,
-
-	   FbBits   and,
-	   FbBits   xor);
-#endif
 
 /*
  * fbstipple.c
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
deleted file mode 100644
index 2e600ed..0000000
--- a/fb/fb24_32.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <string.h>
-
-#include "fb.h"
-
-/* X apps don't like 24bpp images, this code exposes 32bpp images */
-
-/*
- * These two functions do a full CopyArea while reformatting
- * the data between 24 and 32bpp.  They try to go a bit faster
- * by reading/writing aligned CARD32s where it's easy
- */
-
-#define Get8(a)	((CARD32) READ(a))
-
-#if BITMAP_BIT_ORDER == MSBFirst
-#define Get24(a)    ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
-#define Put24(a,p)  ((WRITE((a+0), (CARD8) ((p) >> 16))), \
-		     (WRITE((a+1), (CARD8) ((p) >> 8))), \
-		     (WRITE((a+2), (CARD8) (p))))
-#else
-#define Get24(a)    (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
-#define Put24(a,p)  ((WRITE((a+0), (CARD8) (p))), \
-		     (WRITE((a+1), (CARD8) ((p) >> 8))), \
-		     (WRITE((a+2), (CARD8) ((p) >> 16))))
-#endif
-
-typedef void (*fb24_32BltFunc) (CARD8	    *srcLine,
-				FbStride    srcStride,
-				int	    srcX,
-
-				CARD8	    *dstLine,
-				FbStride    dstStride,
-				int	    dstX,
-
-				int	    width, 
-				int	    height,
-
-				int	    alu,
-				FbBits	    pm);
-
-static void
-fb24_32BltDown (CARD8	    *srcLine,
-		FbStride    srcStride,
-		int	    srcX,
-
-		CARD8	    *dstLine,
-		FbStride    dstStride,
-		int	    dstX,
-
-		int	    width, 
-		int	    height,
-
-		int	    alu,
-		FbBits	    pm)
-{
-    CARD32  *src;
-    CARD8   *dst;
-    int	    w;
-    Bool    destInvarient;
-    CARD32  pixel, dpixel;
-    FbDeclareMergeRop ();
-    
-    srcLine += srcX * 4;
-    dstLine += dstX * 3;
-
-    FbInitializeMergeRop(alu, (pm | ~(FbBits) 0xffffff));
-    destInvarient = FbDestInvarientMergeRop();
-
-    while (height--)
-    {
-	src = (CARD32 *) srcLine;
-	dst = dstLine;
-	srcLine += srcStride;
-	dstLine += dstStride;
-	w = width;
-	if (destInvarient)
-	{
-	    while (((long) dst & 3) && w)
-	    {
-		w--;
-		pixel = READ(src++);
-		pixel = FbDoDestInvarientMergeRop(pixel);
-		Put24 (dst, pixel);
-		dst += 3;
-	    }
-	    /* Do four aligned pixels at a time */
-	    while (w >= 4)
-	    {
-		CARD32  s0, s1;
-		s0 = READ(src++);
-		s0 = FbDoDestInvarientMergeRop(s0);
-		s1 = READ(src++);
-		s1 = FbDoDestInvarientMergeRop(s1);
-#if BITMAP_BIT_ORDER == LSBFirst
-		WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
-#else
-		WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
-#endif
-		s0 = READ(src++);
-		s0 = FbDoDestInvarientMergeRop(s0);
-#if BITMAP_BIT_ORDER == LSBFirst
-		WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
-#else
-		WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
-#endif
-		s1 = READ(src++);
-		s1 = FbDoDestInvarientMergeRop(s1);
-#if BITMAP_BIT_ORDER == LSBFirst
-		WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
-#else
-		WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
-#endif
-		dst += 12;
-		w -= 4;
-	    }
-	    while (w--)
-	    {
-		pixel = READ(src++);
-		pixel = FbDoDestInvarientMergeRop(pixel);
-		Put24 (dst, pixel);
-		dst += 3;
-	    }
-	}
-	else
-	{
-	    while (w--)
-	    {
-		pixel = READ(src++);
-		dpixel = Get24 (dst);
-		pixel = FbDoMergeRop(pixel, dpixel);
-		Put24 (dst, pixel);
-		dst += 3;
-	    }
-	}
-    }
-}
-
-static void
-fb24_32BltUp (CARD8	    *srcLine,
-	      FbStride	    srcStride,
-	      int	    srcX,
-
-	      CARD8	    *dstLine,
-	      FbStride	    dstStride,
-	      int	    dstX,
-
-	      int	    width, 
-	      int	    height,
-
-	      int	    alu,
-	      FbBits	    pm)
-{
-    CARD8   *src;
-    CARD32  *dst;
-    int	    w;
-    Bool    destInvarient;
-    CARD32  pixel;
-    FbDeclareMergeRop ();
-    
-    FbInitializeMergeRop(alu, (pm | (~(FbBits) 0xffffff)));
-    destInvarient = FbDestInvarientMergeRop();
-
-    srcLine += srcX * 3;
-    dstLine += dstX * 4;
-
-    while (height--)
-    {
-	w = width;
-	src = srcLine;
-	dst = (CARD32 *) dstLine;
-	srcLine += srcStride;
-	dstLine += dstStride;
-	if (destInvarient)
-	{
-	    while (((long) src & 3) && w)
-	    {
-		w--;
-		pixel = Get24(src);
-		src += 3;
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-	    }
-	    /* Do four aligned pixels at a time */
-	    while (w >= 4)
-	    {
-		CARD32  s0, s1;
-
-		s0 = READ((CARD32 *)src);
-#if BITMAP_BIT_ORDER == LSBFirst
-		pixel = s0 & 0xffffff;
-#else
-		pixel = s0 >> 8;
-#endif
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-		s1 = READ((CARD32 *)(src+4));
-#if BITMAP_BIT_ORDER == LSBFirst
-		pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
-#else
-		pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
-#endif
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-		s0 = READ((CARD32 *)(src+8));
-#if BITMAP_BIT_ORDER == LSBFirst
-		pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
-#else
-		pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
-#endif
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-#if BITMAP_BIT_ORDER == LSBFirst
-		pixel = s0 >> 8;
-#else
-		pixel = s0 & 0xffffff;
-#endif
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-		src += 12;
-		w -= 4;
-	    }
-	    while (w)
-	    {
-		w--;
-		pixel = Get24(src);
-		src += 3;
-		WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
-	    }
-	}
-	else
-	{
-	    while (w--)
-	    {
-		pixel = Get24(src);
-		src += 3;
-		WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
-		dst++;
-	    }
-	}
-    }
-}
-
-/*
- * Spans functions; probably unused.
- */
-void
-fb24_32GetSpans(DrawablePtr	pDrawable, 
-		int		wMax, 
-		DDXPointPtr	ppt, 
-		int		*pwidth, 
-		int		nspans, 
-		char		*pchardstStart)
-{
-    FbBits	    *srcBits;
-    CARD8	    *src;
-    FbStride	    srcStride;
-    int		    srcBpp;
-    int		    srcXoff, srcYoff;
-    CARD8	    *dst;
-    
-    fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
-    src = (CARD8 *) srcBits;
-    srcStride *= sizeof (FbBits);
-    
-    while (nspans--)
-    {
-	dst = (CARD8 *) pchardstStart;
-	fb24_32BltUp (src + (ppt->y + srcYoff) * srcStride, srcStride,
-		      ppt->x + srcXoff,
-	       
-		      dst,
-		      1,
-		      0,
-
-		      *pwidth,
-		      1,
-
-		      GXcopy,
-		      FB_ALLONES);
-	
-	pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth);
-	ppt++;
-	pwidth++;
-    }
-
-    fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32SetSpans (DrawablePtr	    pDrawable,
-		 GCPtr		    pGC,
-		 char		    *src,
-		 DDXPointPtr	    ppt,
-		 int		    *pwidth,
-		 int		    nspans,
-		 int		    fSorted)
-{
-    FbGCPrivPtr	    pPriv = fbGetGCPrivate (pGC);
-    RegionPtr	    pClip = fbGetCompositeClip(pGC);
-    FbBits	    *dstBits;
-    CARD8	    *dst, *d, *s;
-    FbStride	    dstStride;
-    int		    dstBpp;
-    int		    dstXoff, dstYoff;
-    BoxPtr	    pbox;
-    int		    n;
-    int		    x1, x2;
-
-    fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-    dst = (CARD8 *) dstBits;
-    dstStride *= sizeof (FbBits);
-    while (nspans--)
-    {
-	d = dst + (ppt->y + dstYoff) * dstStride;
-	s = (CARD8 *) src;
-	n = RegionNumRects(pClip);
-	pbox = RegionRects (pClip);
-	while (n--)
-	{
-	    if (pbox->y1 > ppt->y)
-		break;
-	    if (pbox->y2 > ppt->y)
-	    {
-		x1 = ppt->x;
-		x2 = x1 + *pwidth;
-		if (pbox->x1 > x1)
-		    x1 = pbox->x1;
-		if (pbox->x2 < x2)
-		    x2 = pbox->x2;
-		if (x1 < x2)
-		    fb24_32BltDown (s,
-				    0,
-				    (x1 - ppt->x),
-				    d,
-				    dstStride,
-				    x1 + dstXoff,
-
-				    (x2 - x1),
-				    1,
-				    pGC->alu,
-				    pPriv->pm);
-	    }
-	}
-	src += PixmapBytePad (*pwidth, pDrawable->depth);
-	ppt++;
-	pwidth++;
-    }
-
-    fbFinishAccess (pDrawable);
-}
-
-/*
- * Clip and put 32bpp Z-format images to a 24bpp drawable
- */
-void
-fb24_32PutZImage (DrawablePtr	pDrawable,
-		  RegionPtr	pClip,
-		  int		alu,
-		  FbBits	pm,
-		  int		x,
-		  int		y,
-		  int		width,
-		  int		height,
-		  CARD8		*src,
-		  FbStride	srcStride)
-{
-    FbBits	*dstBits;
-    CARD8	*dst;
-    FbStride	dstStride;
-    int		dstBpp;
-    int		dstXoff, dstYoff;
-    int		nbox;
-    BoxPtr	pbox;
-    int		x1, y1, x2, y2;
-
-    fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-    dstStride *= sizeof(FbBits);
-    dst = (CARD8 *) dstBits;
-
-    for (nbox = RegionNumRects (pClip),
-	 pbox = RegionRects(pClip);
-	 nbox--;
-	 pbox++)
-    {
-	x1 = x;
-	y1 = y;
-	x2 = x + width;
-	y2 = y + height;
-	if (x1 < pbox->x1)
-	    x1 = pbox->x1;
-	if (y1 < pbox->y1)
-	    y1 = pbox->y1;
-	if (x2 > pbox->x2)
-	    x2 = pbox->x2;
-	if (y2 > pbox->y2)
-	    y2 = pbox->y2;
-	if (x1 >= x2 || y1 >= y2)
-	    continue;
-	fb24_32BltDown (src + (y1 - y) * srcStride,
-			srcStride,
-			(x1 - x),
-
-			dst + (y1 + dstYoff) * dstStride,
-			dstStride,
-			x1 + dstXoff,
-
-			(x2 - x1),
-			(y2 - y1),
-
-			alu,
-			pm);
-    }
-
-    fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32GetImage (DrawablePtr     pDrawable,
-		 int             x,
-		 int             y,
-		 int             w,
-		 int             h,
-		 unsigned int    format,
-		 unsigned long   planeMask,
-		 char            *d)
-{
-    FbBits	    *srcBits;
-    CARD8	    *src;
-    FbStride	    srcStride;
-    int		    srcBpp;
-    int		    srcXoff, srcYoff;
-    FbStride	    dstStride;
-    FbBits	    pm;
-
-    fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
-    src = (CARD8 *) srcBits;
-    srcStride *= sizeof (FbBits);
-
-    x += pDrawable->x;
-    y += pDrawable->y;
-    
-    pm = fbReplicatePixel (planeMask, 32);
-    dstStride = PixmapBytePad(w, pDrawable->depth);
-    if (pm != FB_ALLONES)
-	memset (d, 0, dstStride * h);
-    fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
-		  (CARD8 *) d, dstStride, 0,
-		  w, h, GXcopy, pm);
-
-    fbFinishAccess (pDrawable);
-}
-
-void
-fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
-		 DrawablePtr pDstDrawable,
-		 GCPtr       pGC,
-		 BoxPtr      pbox,
-		 int         nbox,
-		 int         dx,
-		 int         dy,
-		 Bool        reverse,
-		 Bool        upsidedown,
-		 Pixel       bitplane,
-		 void        *closure)
-{
-    FbGCPrivPtr	pPriv = fbGetGCPrivate(pGC);
-    FbBits	*srcBits;
-    CARD8	*src;
-    FbStride	srcStride;
-    int		srcBpp;
-    FbBits	*dstBits;
-    CARD8	*dst;
-    FbStride	dstStride;
-    int		dstBpp;
-    fb24_32BltFunc  blt;
-    int		srcXoff, srcYoff;
-    int		dstXoff, dstYoff;
-    
-    fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
-    src = (CARD8 *) srcBits;
-    srcStride *= sizeof (FbBits);
-    fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-    dst = (CARD8 *) dstBits;
-    dstStride *= sizeof (FbBits);
-    if (srcBpp == 24)
-	blt = fb24_32BltUp;
-    else
-	blt = fb24_32BltDown;
-    
-    while (nbox--)
-    {
-	(*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride,
-		srcStride,
-		(pbox->x1 + dx + srcXoff),
-
-		dst + (pbox->y1 + dstYoff) * dstStride,
-		dstStride,
-		(pbox->x1 + dstXoff),
-
-		(pbox->x2 - pbox->x1),
-		(pbox->y2 - pbox->y1),
-
-		pGC->alu,
-		pPriv->pm);
-	pbox++;
-    }
-
-    fbFinishAccess (pSrcDrawable);
-    fbFinishAccess (pDstDrawable);
-}
-
-PixmapPtr
-fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
-{
-    ScreenPtr	pScreen = pOldTile->drawable.pScreen;
-    PixmapPtr	pNewTile;
-    FbBits	*old, *new;
-    FbStride	oldStride, newStride;
-    int		oldBpp, newBpp;
-    fb24_32BltFunc  blt;
-    int		oldXoff, oldYoff;
-    int		newXoff, newYoff;
-
-    pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
-				     pOldTile->drawable.height,
-				     pOldTile->drawable.depth,
-				     pOldTile->usage_hint);
-    if (!pNewTile)
-	return 0;
-    fbGetDrawable (&pOldTile->drawable, 
-		   old, oldStride, oldBpp, oldXoff, oldYoff);
-    fbGetDrawable (&pNewTile->drawable, 
-		   new, newStride, newBpp, newXoff, newYoff);
-    if (oldBpp == 24)
-	blt = fb24_32BltUp;
-    else
-	blt = fb24_32BltDown;
-
-    (*blt) ((CARD8 *) old,
-	    oldStride * sizeof (FbBits),
-	    0,
-
-	    (CARD8 *) new,
-	    newStride * sizeof (FbBits),
-	    0,
-
-	    pOldTile->drawable.width,
-	    pOldTile->drawable.height,
-
-	    GXcopy,
-	    FB_ALLONES);
-
-    fbFinishAccess (&pOldTile->drawable);
-    fbFinishAccess (&pNewTile->drawable);
-
-    return pNewTile;
-}
-
-typedef struct {
-    pointer pbits; 
-    int width;   
-} miScreenInitParmsRec, *miScreenInitParmsPtr;
-
-Bool
-fb24_32CreateScreenResources(ScreenPtr pScreen)
-{
-    miScreenInitParmsPtr pScrInitParms;
-    int pitch;
-    Bool retval;
-
-    /* get the pitch before mi destroys it */
-    pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
-    pitch = BitmapBytePad(pScrInitParms->width * 24);
-
-    if((retval = miCreateScreenResources(pScreen))) {
-	/* fix the screen pixmap */
-	PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate;
-	pPix->drawable.bitsPerPixel = 24;
-	pPix->devKind = pitch;
-    }
-
-    return retval;
-}
-
-Bool
-fb24_32ModifyPixmapHeader (PixmapPtr   pPixmap,
-			   int         width,
-			   int         height,
-			   int         depth,
-			   int         bitsPerPixel,
-			   int         devKind,
-			   pointer     pPixData)
-{
-    int	    bpp, w;
-
-    if (!pPixmap)
-	return FALSE;
-    bpp = bitsPerPixel;
-    if (bpp <= 0)
-	bpp = pPixmap->drawable.bitsPerPixel;
-    if (bpp == 24)
-    {
-	if (devKind < 0)
-	{
-	    w = width;
-	    if (w <= 0)
-		w = pPixmap->drawable.width;
-	    devKind = BitmapBytePad(w * 24);
-	}
-    }
-    return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
-				devKind, pPixData);	
-}		
diff --git a/fb/fb24_32.h b/fb/fb24_32.h
deleted file mode 100644
index 7c9819e..0000000
--- a/fb/fb24_32.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _FB24_32_H_
-#define _FB24_32_H_
-
-Bool
-fb24_32FinishScreenInit(ScreenPtr    pScreen,
-			pointer      pbits,
-			int          xsize,
-			int          ysize,
-			int          dpix,
-			int          dpiy,
-			int          width,
-			int          bpp);
-
-Bool
-fb24_32ScreenInit(ScreenPtr  pScreen,
-		  pointer    pbits,
-		  int        xsize,
-		  int        ysize,
-		  int        dpix,
-		  int        dpiy,
-		  int        width,
-		  int        bpp);
-
-#endif
diff --git a/fb/fbarc.c b/fb/fbarc.c
index 33e44b0..7724d56 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -55,9 +55,6 @@ fbPolyArc (DrawablePtr	pDrawable,
 	    {
 	    case 8:	arc = fbArc8; break;
 	    case 16:    arc = fbArc16; break;
-#ifdef FB_24BIT
-	    case 24:	arc = fbArc24; break;
-#endif
 	    case 32:    arc = fbArc32; break;
 	    }
 	}
diff --git a/fb/fbbits.c b/fb/fbbits.c
index 8083743..2d232df 100644
--- a/fb/fbbits.c
+++ b/fb/fbbits.c
@@ -89,65 +89,6 @@
 #undef BITS4
 #endif
 
-#ifdef FB_24BIT
-#define BRESSOLID   fbBresSolid24
-#define BRESDASH    fbBresDash24
-#define DOTS        fbDots24
-#define ARC         fbArc24
-#define POLYLINE    fbPolyline24
-#define POLYSEGMENT fbPolySegment24
-
-#define BITS        CARD32
-#define BITSUNIT    BYTE
-#define BITSMUL	    3
-
-#define FbDoTypeStore(b,t,x,s)	WRITE(((t *) (b)), (x) >> (s))
-#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
-							  (a) >> (s), \
-							  (x) >> (s)))
-#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
-								    (a) >> (s), \
-								    (x) >> (s), \
-								    (m) >> (s)))
-#if BITMAP_BIT_ORDER == LSBFirst
-#define BITSSTORE(b,x)	((unsigned long) (b) & 1 ? \
-			 (FbDoTypeStore (b, CARD8, x, 0), \
-			  FbDoTypeStore ((b) + 1, CARD16, x, 8)) : \
-			 (FbDoTypeStore (b, CARD16, x, 0), \
-			  FbDoTypeStore ((b) + 2, CARD8, x, 16)))
-#define BITSRROP(b,a,x)	((unsigned long) (b) & 1 ? \
-			 (FbDoTypeRRop(b,CARD8,a,x,0), \
-			  FbDoTypeRRop((b)+1,CARD16,a,x,8)) : \
-			 (FbDoTypeRRop(b,CARD16,a,x,0), \
-			  FbDoTypeRRop((b)+2,CARD8,a,x,16)))
-#else
-#define BITSSTORE(b,x)  ((unsigned long) (b) & 1 ? \
-			 (FbDoTypeStore (b, CARD8, x, 16), \
-			  FbDoTypeStore ((b) + 1, CARD16, x, 0)) : \
-			 (FbDoTypeStore (b, CARD16, x, 8), \
-			  FbDoTypeStore ((b) + 2, CARD8, x, 0)))
-#define BITSRROP(b,a,x)	((unsigned long) (b) & 1 ? \
-			 (FbDoTypeRRop (b, CARD8, a, x, 16), \
-			  FbDoTypeRRop ((b) + 1, CARD16, a, x, 0)) : \
-			 (FbDoTypeRRop (b, CARD16, a, x, 8), \
-			  FbDoTypeRRop ((b) + 2, CARD8, a, x, 0)))
-#endif
-
-#include "fbbits.h"
-
-#undef BITSSTORE
-#undef BITSRROP
-#undef BITSMUL
-#undef BITSUNIT
-#undef BITS
-    
-#undef BRESSOLID
-#undef BRESDASH
-#undef DOTS
-#undef ARC
-#undef POLYLINE
-#undef POLYSEGMENT
-#endif /* FB_24BIT */
 
 #define BRESSOLID   fbBresSolid32
 #define BRESDASH    fbBresDash32
diff --git a/fb/fbblt.c b/fb/fbblt.c
index 38271c0..afad424 100644
--- a/fb/fbblt.c
+++ b/fb/fbblt.c
@@ -67,14 +67,6 @@ fbBlt (FbBits   *srcLine,
     int	    startbyte, endbyte;
     FbDeclareMergeRop ();
 
-#ifdef FB_24BIT
-    if (bpp == 24 && !FbCheck24Pix (pm))
-    {
-	fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
-		 width, height, alu, pm, reverse, upsidedown);
-	return;
-    }
-#endif
 
     if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
             !(srcX & 7) && !(dstX & 7) && !(width & 7)) {
@@ -338,272 +330,6 @@ fbBlt (FbBits   *srcLine,
     }
 }
 
-#ifdef FB_24BIT
-
-#undef DEBUG_BLT24
-#ifdef DEBUG_BLT24
-
-static unsigned long
-getPixel (char *src, int x)
-{
-    unsigned long   l;
-
-    l = 0;
-    memcpy (&l, src + x * 3, 3);
-    return l;
-}
-#endif
-
-static void
-fbBlt24Line (FbBits	    *src,
-	     int	    srcX,
-
-	     FbBits	    *dst,
-	     int	    dstX,
-
-	     int	    width,
-
-	     int	    alu,
-	     FbBits	    pm,
-	 
-	     Bool	    reverse)
-{
-#ifdef DEBUG_BLT24
-    char    *origDst = (char *) dst;
-    FbBits  *origLine = dst + ((dstX >> FB_SHIFT) - 1);
-    int	    origNlw = ((width + FB_MASK) >> FB_SHIFT) + 3;
-    int	    origX = dstX / 24;
-#endif
-    
-    int	    leftShift, rightShift;
-    FbBits  startmask, endmask;
-    int	    n;
-    
-    FbBits  bits, bits1;
-    FbBits  mask;
-
-    int	    rot;
-    FbDeclareMergeRop ();
-    
-    FbInitializeMergeRop (alu, FB_ALLONES);
-    FbMaskBits(dstX, width, startmask, n, endmask);
-#ifdef DEBUG_BLT24
-    ErrorF ("dstX %d width %d reverse %d\n", dstX, width, reverse);
-#endif
-    if (reverse)
-    {
-	src += ((srcX + width - 1) >> FB_SHIFT) + 1;
-	dst += ((dstX + width - 1) >> FB_SHIFT) + 1;
-	rot = FbFirst24Rot (((dstX + width - 8) & FB_MASK));
-	rot = FbPrev24Rot(rot);
-#ifdef DEBUG_BLT24
-	ErrorF ("dstX + width - 8: %d rot: %d\n", (dstX + width - 8) & FB_MASK, rot);
-#endif
-	srcX = (srcX + width - 1) & FB_MASK;
-	dstX = (dstX + width - 1) & FB_MASK;
-    }
-    else
-    {
-	src += srcX >> FB_SHIFT;
-	dst += dstX >> FB_SHIFT;
-	srcX &= FB_MASK;
-	dstX &= FB_MASK;
-	rot = FbFirst24Rot (dstX);
-#ifdef DEBUG_BLT24
-	ErrorF ("dstX: %d rot: %d\n", dstX, rot);
-#endif
-    }
-    mask = FbRot24(pm,rot);
-#ifdef DEBUG_BLT24
-    ErrorF ("pm 0x%x mask 0x%x\n", pm, mask);
-#endif
-    if (srcX == dstX)
-    {
-	if (reverse)
-	{
-	    if (endmask)
-	    {
-		bits = READ(--src);
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
-		mask = FbPrev24Pix (mask);
-	    }
-	    while (n--)
-	    {
-		bits = READ(--src);
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
-		mask = FbPrev24Pix (mask);
-	    }
-	    if (startmask)
-	    {
-		bits = READ(--src);
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
-	    }
-	}
-	else
-	{
-	    if (startmask)
-	    {
-		bits = READ(src++);
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = READ(src++);
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    if (endmask)
-	    {
-		bits = READ(src);
-		WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
-	    }
-	}
-    }
-    else
-    {
-	if (srcX > dstX)
-	{
-	    leftShift = srcX - dstX;
-	    rightShift = FB_UNIT - leftShift;
-	}
-	else
-	{
-	    rightShift = dstX - srcX;
-	    leftShift = FB_UNIT - rightShift;
-	}
-	
-	bits1 = 0;
-	if (reverse)
-	{
-	    if (srcX < dstX)
-		bits1 = READ(--src);
-	    if (endmask)
-	    {
-		bits = FbScrRight(bits1, rightShift); 
-		if (FbScrRight(endmask, leftShift))
-		{
-		    bits1 = READ(--src);
-		    bits |= FbScrLeft(bits1, leftShift);
-		}
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
-		mask = FbPrev24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = FbScrRight(bits1, rightShift); 
-		bits1 = READ(--src);
-		bits |= FbScrLeft(bits1, leftShift);
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
-		mask = FbPrev24Pix(mask);
-	    }
-	    if (startmask)
-	    {
-		bits = FbScrRight(bits1, rightShift); 
-		if (FbScrRight(startmask, leftShift))
-		{
-		    bits1 = READ(--src);
-		    bits |= FbScrLeft(bits1, leftShift);
-		}
-		--dst;
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
-	    }
-	}
-	else
-	{
-	    if (srcX > dstX)
-		bits1 = READ(src++);
-	    if (startmask)
-	    {
-		bits = FbScrLeft(bits1, leftShift); 
-		bits1 = READ(src++);
-		bits |= FbScrRight(bits1, rightShift);
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = FbScrLeft(bits1, leftShift); 
-		bits1 = READ(src++);
-		bits |= FbScrRight(bits1, rightShift);
-		WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    if (endmask)
-	    {
-		bits = FbScrLeft(bits1, leftShift); 
-		if (FbScrLeft(endmask, rightShift))
-		{
-		    bits1 = READ(src);
-		    bits |= FbScrRight(bits1, rightShift);
-		}
-		WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
-	    }
-	}
-    }
-#ifdef DEBUG_BLT24
-    {
-	int firstx, lastx, x;
-
-	firstx = origX;
-	if (firstx)
-	    firstx--;
-	lastx = origX + width/24 + 1;
-	for (x = firstx; x <= lastx; x++)
-	    ErrorF ("%06x ", getPixel (origDst, x));
-	ErrorF ("\n");
-	while (origNlw--)
-	    ErrorF ("%08x ", *origLine++);
-	ErrorF ("\n");
-    }
-#endif
-}
-
-void
-fbBlt24 (FbBits	    *srcLine,
-	 FbStride   srcStride,
-	 int	    srcX,
-
-	 FbBits	    *dstLine,
-	 FbStride   dstStride,
-	 int	    dstX,
-
-	 int	    width, 
-	 int	    height,
-
-	 int	    alu,
-	 FbBits	    pm,
-
-	 Bool	    reverse,
-	 Bool	    upsidedown)
-{
-    if (upsidedown)
-    {
-	srcLine += (height-1) * srcStride;
-	dstLine += (height-1) * dstStride;
-	srcStride = -srcStride;
-	dstStride = -dstStride;
-    }
-    while (height--)
-    {
-	fbBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse);
-	srcLine += srcStride;
-	dstLine += dstStride;
-    }
-#ifdef DEBUG_BLT24
-    ErrorF ("\n");
-#endif
-}
-#endif /* FB_24BIT */
 
 #if FB_SHIFT == FB_STIP_SHIFT + 1
 
@@ -784,49 +510,6 @@ fbBltOdd (FbBits    *srcLine,
     }
 }
 
-#ifdef FB_24BIT
-void
-fbBltOdd24 (FbBits	*srcLine,
-	    FbStride	srcStrideEven,
-	    FbStride	srcStrideOdd,
-	    int		srcXEven,
-	    int		srcXOdd,
-
-	    FbBits	*dstLine,
-	    FbStride	dstStrideEven,
-	    FbStride	dstStrideOdd,
-	    int		dstXEven,
-	    int		dstXOdd,
-
-	    int		width,
-	    int		height,
-
-	    int		alu,
-	    FbBits	pm)
-{
-    Bool    even = TRUE;
-    
-    while (height--)
-    {
-	if (even)
-	{
-	    fbBlt24Line (srcLine, srcXEven, dstLine, dstXEven,
-			 width, alu, pm, FALSE);
-	    srcLine += srcStrideEven;
-	    dstLine += dstStrideEven;
-	    even = FALSE;
-	}
-	else
-	{
-	    fbBlt24Line (srcLine, srcXOdd, dstLine, dstXOdd,
-			 width, alu, pm, FALSE);
-	    srcLine += srcStrideOdd;
-	    dstLine += dstStrideOdd;
-	    even = TRUE;
-	}
-    }
-}
-#endif
 
 #endif
 
@@ -915,19 +598,6 @@ fbBltStip (FbStip   *src,
 		     &dstStrideEven, &dstStrideOdd,
 		     &dstXEven, &dstXOdd);
 		     
-#ifdef FB_24BIT
-	if (bpp == 24 && !FbCheck24Pix (pm))
-	{
-	    fbBltOdd24  (s, srcStrideEven, srcStrideOdd,
-			 srcXEven, srcXOdd,
-
-			 d, dstStrideEven, dstStrideOdd,
-			 dstXEven, dstXOdd,
-
-			 width, height, alu, pm);
-	}
-	else
-#endif
 	{
 	    fbBltOdd (s, srcStrideEven, srcStrideOdd,
 		      srcXEven, srcXOdd,
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 5d5d2e6..3833373 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -169,16 +169,6 @@ fbBltOne (FbStip    *src,
 #endif
     int		    startbyte, endbyte;
 
-#ifdef FB_24BIT
-    if (dstBpp == 24)
-    {
-	fbBltOne24 (src, srcStride, srcX,
-		    dst, dstStride, dstX, dstBpp,
-		    width, height,
-		    fgand, fgxor, bgand, bgxor);
-	return;
-    }
-#endif
 
     /*
      * Do not read past the end of the buffer!
@@ -419,335 +409,6 @@ fbBltOne (FbStip    *src,
     }
 }
 
-#ifdef FB_24BIT
-
-/*
- * Crufty macros to initialize the mask array, most of this
- * is to avoid compile-time warnings about shift overflow
- */
-
-#if BITMAP_BIT_ORDER == MSBFirst
-#define Mask24Pos(x,r) ((x)*24-(r))
-#else
-#define Mask24Pos(x,r) ((x)*24-((r) ? 24 - (r) : 0))
-#endif
-
-#define Mask24Neg(x,r)	(Mask24Pos(x,r) < 0 ? -Mask24Pos(x,r) : 0)
-#define Mask24Check(x,r)    (Mask24Pos(x,r) < 0 ? 0 : \
-			     Mask24Pos(x,r) >= FB_UNIT ? 0 : Mask24Pos(x,r))
-
-#define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \
-		     (Mask24Pos(x,r) < 0 ? \
-		      0xffffff >> Mask24Neg (x,r) : \
-		      0xffffff << Mask24Check(x,r)) : 0)
-
-#define SelMask24(b,n,r)	((((b) >> n) & 1) * Mask24(n,r))
-
-/*
- * Untested for MSBFirst or FB_UNIT == 32
- */
-
-#if FB_UNIT == 64
-#define C4_24(b,r) \
-    (SelMask24(b,0,r) | \
-     SelMask24(b,1,r) | \
-     SelMask24(b,2,r) | \
-     SelMask24(b,3,r))
-
-#define FbStip24New(rot)    (2 + (rot != 0))
-#define FbStip24Len	    4
-
-const FbBits	fbStipple24Bits[3][1 << FbStip24Len] = {
-    /* rotate 0 */
-    {
-	C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0),
-	C4_24( 4, 0), C4_24( 5, 0), C4_24( 6, 0), C4_24( 7, 0),
-	C4_24( 8, 0), C4_24( 9, 0), C4_24(10, 0), C4_24(11, 0),
-	C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0),
-    },
-    /* rotate 8 */
-    {
-	C4_24( 0, 8), C4_24( 1, 8), C4_24( 2, 8), C4_24( 3, 8),
-	C4_24( 4, 8), C4_24( 5, 8), C4_24( 6, 8), C4_24( 7, 8),
-	C4_24( 8, 8), C4_24( 9, 8), C4_24(10, 8), C4_24(11, 8),
-	C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8),
-    },
-    /* rotate 16 */
-    {
-	C4_24( 0,16), C4_24( 1,16), C4_24( 2,16), C4_24( 3,16),
-	C4_24( 4,16), C4_24( 5,16), C4_24( 6,16), C4_24( 7,16),
-	C4_24( 8,16), C4_24( 9,16), C4_24(10,16), C4_24(11,16),
-	C4_24(12,16), C4_24(13,16), C4_24(14,16), C4_24(15,16),
-    }
-};
-
-#endif
-
-#if FB_UNIT == 32
-#define C2_24(b,r)  \
-    (SelMask24(b,0,r) | \
-     SelMask24(b,1,r))
-
-#define FbStip24Len	    2
-#if BITMAP_BIT_ORDER == MSBFirst
-#define FbStip24New(rot)    (1 + (rot == 0))
-#else
-#define FbStip24New(rot)    (1 + (rot == 8))
-#endif
-
-const FbBits	fbStipple24Bits[3][1 << FbStip24Len] = {
-    /* rotate 0 */
-    {
-	C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
-    },
-    /* rotate 8 */
-    {
-	C2_24( 0, 8), C2_24 ( 1, 8), C2_24 ( 2, 8), C2_24 ( 3, 8),
-    },
-    /* rotate 16 */
-    {
-	C2_24( 0,16), C2_24 ( 1,16), C2_24 ( 2,16), C2_24 ( 3,16),
-    }
-};
-#endif
-
-#if BITMAP_BIT_ORDER == LSBFirst
-
-#define FbMergeStip24Bits(left, right, new) \
-	(FbStipLeft (left, new) | FbStipRight ((right), (FbStip24Len - (new))))
-
-#define FbMergePartStip24Bits(left, right, llen, rlen) \
-	(left | FbStipRight(right, llen))
-
-#else
-
-#define FbMergeStip24Bits(left, right, new) \
-	((FbStipLeft (left, new) & ((1 << FbStip24Len) - 1)) | right)
-
-#define FbMergePartStip24Bits(left, right, llen, rlen) \
-	(FbStipLeft(left, rlen) | right)
-
-#endif
-
-#define fbFirstStipBits(len,stip) {\
-    int	__len = (len); \
-    if (len <= remain) { \
-	stip = FbLeftStipBits(bits, len); \
-    } else { \
-	stip = FbLeftStipBits(bits, remain); \
-	bits = (src < srcEnd ? READ(src++) : 0); \
-	__len = (len) - remain; \
-	stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
-				     remain, __len); \
-	remain = FB_STIP_UNIT; \
-    } \
-    bits = FbStipLeft (bits, __len); \
-    remain -= __len; \
-}
-
-#define fbInitStipBits(offset,len,stip) {\
-    bits = FbStipLeft (READ(src++),offset); \
-    remain = FB_STIP_UNIT - offset; \
-    fbFirstStipBits(len,stip); \
-    stip = FbMergeStip24Bits (0, stip, len); \
-}
-    
-#define fbNextStipBits(rot,stip) {\
-    int	    __new = FbStip24New(rot); \
-    FbStip  __right; \
-    fbFirstStipBits(__new, __right); \
-    stip = FbMergeStip24Bits (stip, __right, __new); \
-    rot = FbNext24Rot (rot); \
-}
-
-/*
- * Use deep mask tables that incorporate rotation, pull
- * a variable number of bits out of the stipple and
- * reuse the right bits as needed for the next write
- *
- * Yes, this is probably too much code, but most 24-bpp screens
- * have no acceleration so this code is used for stipples, copyplane
- * and text
- */
-void
-fbBltOne24 (FbStip	*srcLine,
-	    FbStride	srcStride,  /* FbStip units per scanline */
-	    int		srcX,	    /* bit position of source */
-	    FbBits	*dst,
-	    FbStride	dstStride,  /* FbBits units per scanline */
-	    int		dstX,	    /* bit position of dest */
-	    int		dstBpp,	    /* bits per destination unit */
-
-	    int		width,	    /* width in bits of destination */
-	    int		height,	    /* height in scanlines */
-
-	    FbBits	fgand,	    /* rrop values */
-	    FbBits	fgxor,
-	    FbBits	bgand,
-	    FbBits	bgxor)
-{
-    FbStip	*src, *srcEnd;
-    FbBits	leftMask, rightMask, mask;
-    int		nlMiddle, nl;
-    FbStip	stip, bits;
-    int		remain;
-    int		dstS;
-    int		firstlen;
-    int		rot0, rot;
-    int		nDst;
-    
-    /*
-     * Do not read past the end of the buffer!
-     */
-    srcEnd = srcLine + height * srcStride;
-
-    srcLine += srcX >> FB_STIP_SHIFT;
-    dst += dstX >> FB_SHIFT;
-    srcX &= FB_STIP_MASK;
-    dstX &= FB_MASK;
-    rot0 = FbFirst24Rot (dstX);
-    
-    FbMaskBits (dstX, width, leftMask, nlMiddle, rightMask);
-    
-    dstS = (dstX + 23) / 24;
-    firstlen = FbStip24Len - dstS;
-    
-    nDst = nlMiddle;
-    if (leftMask)
-	nDst++;
-    dstStride -= nDst;
-    
-    /* opaque copy */
-    if (bgand == 0 && fgand == 0)
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX,firstlen, stip);
-	    if (leftMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		WRITE(dst, (READ(dst) & ~leftMask) |
-			    (FbOpaqueStipple (mask,
-					      FbRot24(fgxor, rot),
-					      FbRot24(bgxor, rot))
-			     & leftMask));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		mask = fbStipple24Bits[rot>>3][stip];
-		WRITE(dst, FbOpaqueStipple (mask,
-					    FbRot24(fgxor, rot),
-					    FbRot24(bgxor, rot)));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    if (rightMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		WRITE(dst, (READ(dst) & ~rightMask) |
-			    (FbOpaqueStipple (mask,
-					      FbRot24(fgxor, rot),
-					      FbRot24(bgxor, rot))
-			     & rightMask));
-	    }
-	    dst += dstStride;
-	    src += srcStride;
-	}
-    }
-    /* transparent copy */
-    else if (bgand == FB_ALLONES && bgxor == 0 && fgand == 0)
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX, firstlen, stip);
-	    if (leftMask)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
-		    WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
-		}
-		dst++;
-		fbNextStipBits (rot, stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot>>3][stip];
-		    WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask));
-		}
-		dst++;
-		fbNextStipBits (rot, stip);
-	    }
-	    if (rightMask)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
-		    WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
-		}
-	    }
-	    dst += dstStride;
-	}
-    }
-    else
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX, firstlen, stip);
-	    if (leftMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		WRITE(dst, FbStippleRRopMask (READ(dst), mask,
-					      FbRot24(fgand, rot),
-					      FbRot24(fgxor, rot),
-					      FbRot24(bgand, rot),
-					      FbRot24(bgxor, rot),
-					      leftMask));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		WRITE(dst, FbStippleRRop (READ(dst), mask,
-					  FbRot24(fgand, rot),
-					  FbRot24(fgxor, rot),
-					  FbRot24(bgand, rot),
-					  FbRot24(bgxor, rot)));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    if (rightMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		WRITE(dst, FbStippleRRopMask (READ(dst), mask,
-					      FbRot24(fgand, rot),
-					      FbRot24(fgxor, rot),
-					      FbRot24(bgand, rot),
-					      FbRot24(bgxor, rot),
-					      rightMask));
-	    }
-	    dst += dstStride;
-	}
-    }
-}
-#endif
 
 /*
  * Not very efficient, but simple -- copy a single plane
@@ -801,18 +462,6 @@ fbBltPlane (FbBits	    *src,
     w = width / srcBpp;
 
     pm = fbReplicatePixel (planeMask, srcBpp);
-#ifdef FB_24BIT
-    if (srcBpp == 24)
-    {
-	int w = 24;
-
-	rot0 = FbFirst24Rot (srcX);
-	if (srcX + w > FB_UNIT)
-	    w = FB_UNIT - srcX;
-	srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w);
-    }
-    else
-#endif
     {
 	rot0 = 0;
 	srcMaskFirst = pm & FbBitsMask(srcX, srcBpp);
@@ -828,10 +477,6 @@ fbBltPlane (FbBits	    *src,
 	src += srcStride;
 	
 	srcMask = srcMaskFirst;
-#ifdef FB_24BIT
-	if (srcBpp == 24)
-	    srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
-#endif
     	srcBits = READ(s++);
 
 	dstMask = dstMaskFirst;
@@ -845,10 +490,6 @@ fbBltPlane (FbBits	    *src,
 	    if (!srcMask)
 	    {
 		srcBits = READ(s++);
-#ifdef FB_24BIT
-		if (srcBpp == 24)
-		    srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
-#endif
 		srcMask = srcMask0;
 	    }
 	    if (!dstMask)
diff --git a/fb/fbcopy.c b/fb/fbcopy.c
index 9a7c49a..895dfba 100644
--- a/fb/fbcopy.c
+++ b/fb/fbcopy.c
@@ -335,11 +335,6 @@ fbCopyArea (DrawablePtr	pSrcDrawable,
 {
     miCopyProc	copy;
 
-#ifdef FB_24_32BIT
-    if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel)
-	copy = fb24_32CopyMtoN;
-    else
-#endif
 	copy = fbCopyNtoN;
     return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
 		     widthSrc, heightSrc, xOut, yOut, copy, 0, 0);
diff --git a/fb/fbgc.c b/fb/fbgc.c
index b27a030..a689a54 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -71,7 +71,6 @@ fbCreateGC(GCPtr pGC)
     pGC->miTranslate = 1;
     pGC->fExpose = 1;
 
-    fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth);
     return TRUE;
 }
 
@@ -206,41 +205,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	miComputeCompositeClip (pGC, pDrawable);
     }
     
-#ifdef FB_24_32BIT    
-    if (pPriv->bpp != pDrawable->bitsPerPixel)
-    {
-	changes |= GCStipple|GCForeground|GCBackground|GCPlaneMask;
-	pPriv->bpp = pDrawable->bitsPerPixel;
-    }
-    if ((changes & GCTile) && fbGetRotatedPixmap(pGC))
-    {
-	(*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC));
-	fbGetRotatedPixmap(pGC) = 0;
-    }
-	
-    if (pGC->fillStyle == FillTiled)
-    {
-	PixmapPtr	pOldTile, pNewTile;
-
-	pOldTile = pGC->tile.pixmap;
-	if (pOldTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel)
-	{
-	    pNewTile = fbGetRotatedPixmap(pGC);
-	    if (!pNewTile || pNewTile ->drawable.bitsPerPixel != pDrawable->bitsPerPixel)
-	    {
-		if (pNewTile)
-		    (*pGC->pScreen->DestroyPixmap) (pNewTile);
-		pNewTile = fb24_32ReformatTile (pOldTile, pDrawable->bitsPerPixel);
-	    }
-	    if (pNewTile)
-	    {
-		fbGetRotatedPixmap(pGC) = pOldTile;
-		pGC->tile.pixmap = pNewTile;
-		changes |= GCTile;
-	    }
-	}
-    }
-#endif
     if (changes & GCTile)
     {
 	if (!pGC->tileIsPixel && 
diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c
index 6402c6c..68f3415 100644
--- a/fb/fbgetsp.c
+++ b/fb/fbgetsp.c
@@ -47,13 +47,6 @@ fbGetSpans(DrawablePtr	pDrawable,
     if (!fbDrawableEnabled(pDrawable))
 	return;
     
-#ifdef FB_24_32BIT
-    if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
-    {
-	fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart);
-	return;
-    }
-#endif
     
     fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
     
diff --git a/fb/fbglyph.c b/fb/fbglyph.c
index 8208081..1e90b99 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -57,199 +57,6 @@ fbGlyphIn (RegionPtr	pRegion,
     return RegionContainsRect(pRegion, &box) == rgnIN;
 }
 
-#ifdef FB_24BIT
-#ifndef FBNOPIXADDR
-
-#define WRITE1(d,n,fg)	WRITE((d) + (n), (CARD8) fg)
-#define WRITE2(d,n,fg)	WRITE((CARD16 *) &(d[n]), (CARD16) fg)
-#define WRITE4(d,n,fg)	WRITE((CARD32 *) &(d[n]), (CARD32) fg)
-#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
-#define WRITE8(d)	WRITE((FbBits *) &(d[0]), fg)
-#else
-#define WRITE8(d)	WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
-#endif
-			 
-/*
- * This is a bit tricky, but it's brief.  Write 12 bytes worth
- * of dest, which is four pixels, at a time.  This gives constant
- * code for each pattern as they're always aligned the same
- *
- *  a b c d  a b c d  a b c d	bytes
- *  A B C A  B C A B  C A B C	pixels
- * 
- *    f0        f1       f2
- *  A B C A  B C A B  C A B C	pixels LSB
- *  C A B C  A B C A  B C A B	pixels MSB
- *
- *		LSB	MSB
- *  A		f0	f1
- *  B		f1	f2
- *  C		f2	f0
- *  A B		f0	f2
- *  B C		f1	f0
- *  C A		f2	f1
- *  A B C A	f0	f1
- *  B C A B	f1    	f2
- *  C A B C	f2	f0
- */
-
-#undef _A
-#undef _B
-#undef _C
-#undef _AB
-#undef _BC
-#undef _CA
-#undef _ABCA
-#undef _BCAB
-#undef _CABC
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define _A	f1
-#define _B	f2
-#define _C	f0
-#define _AB	f2
-#define _BC	f0
-#define _CA	f1
-#define _ABCA	f1
-#define _BCAB	f2
-#define _CABC	f0
-#define CASE(a,b,c,d)	((a << 3) | (b << 2) | (c << 1) | d)
-#else
-#define _A	f0
-#define _B	f1
-#define _C	f2
-#define _AB	f0
-#define _BC	f1
-#define _CA	f2
-#define _ABCA	f0
-#define _BCAB	f1
-#define _CABC	f2
-#define CASE(a,b,c,d)	(a | (b << 1) | (c << 2) | (d << 3))
-#endif
-
-void
-fbGlyph24 (FbBits   *dstBits,
-	   FbStride dstStride,
-	   int	    dstBpp,
-	   FbStip   *stipple,
-	   FbBits   fg,
-	   int	    x,
-	   int	    height)
-{
-    int	    lshift;
-    FbStip  bits;
-    CARD8   *dstLine;
-    CARD8   *dst;
-    FbStip  f0, f1, f2;
-    int	    n;
-    int	    shift;
-
-    f0 = fg;
-    f1 = FbRot24(f0,16);
-    f2 = FbRot24(f0,8);
-    
-    dstLine = (CARD8 *) dstBits;
-    dstLine += (x & ~3) * 3;
-    dstStride *= (sizeof (FbBits) / sizeof (CARD8));
-    shift = x & 3;
-    lshift = 4 - shift;
-    while (height--)
-    {
-	bits = READ(stipple++);
-	n = lshift;
-	dst = dstLine;
-	while (bits)
-	{
-	    switch (FbStipMoveLsb (FbLeftStipBits (bits, n), 4, n)) {
-	    case CASE(0,0,0,0):
-		break;
-	    case CASE(1,0,0,0):
-		WRITE2(dst,0,_AB);
-		WRITE1(dst,2,_C);
-		break;
-	    case CASE(0,1,0,0):
-		WRITE1(dst,3,_A);
-		WRITE2(dst,4,_BC);
-		break;
-	    case CASE(1,1,0,0):
-		WRITE4(dst,0,_ABCA);
-		WRITE2(dst,4,_BC);
-		break;
-	    case CASE(0,0,1,0):
-		WRITE2(dst,6,_AB);
-		WRITE1(dst,8,_C);
-		break;
-	    case CASE(1,0,1,0):
-		WRITE2(dst,0,_AB);
-		WRITE1(dst,2,_C);
-		
-		WRITE2(dst,6,_AB);
-		WRITE1(dst,8,_C);
-		break;
-	    case CASE(0,1,1,0):
-		WRITE1(dst,3,_A);
-		WRITE4(dst,4,_BCAB);
-		WRITE1(dst,8,_C);
-		break;
-	    case CASE(1,1,1,0):
-		WRITE8(dst);
-		WRITE1(dst,8,_C);
-		break;
-	    case CASE(0,0,0,1):
-		WRITE1(dst,9,_A);
-		WRITE2(dst,10,_BC);
-		break;
-	    case CASE(1,0,0,1):
-		WRITE2(dst,0,_AB);
-		WRITE1(dst,2,_C);
-		
-		WRITE1(dst,9,_A);
-		WRITE2(dst,10,_BC);
-		break;
-	    case CASE(0,1,0,1):
-		WRITE1(dst,3,_A);
-		WRITE2(dst,4,_BC);
-		
-		WRITE1(dst,9,_A);
-		WRITE2(dst,10,_BC);
-		break;
-	    case CASE(1,1,0,1):
-		WRITE4(dst,0,_ABCA);
-		WRITE2(dst,4,_BC);
-		
-		WRITE1(dst,9,_A);
-		WRITE2(dst,10,_BC);
-		break;
-	    case CASE(0,0,1,1):
-		WRITE2(dst,6,_AB);
-		WRITE4(dst,8,_CABC);
-		break;
-	    case CASE(1,0,1,1):
-		WRITE2(dst,0,_AB);
-		WRITE1(dst,2,_C);
-		
-		WRITE2(dst,6,_AB);
-		WRITE4(dst,8,_CABC);
-		break;
-	    case CASE(0,1,1,1):
-		WRITE1(dst,3,_A);
-		WRITE4(dst,4,_BCAB);
-		WRITE4(dst,8,_CABC);
-		break;
-	    case CASE(1,1,1,1):
-		WRITE8(dst);
-		WRITE4(dst,8,_CABC);
-		break;
-	    }
-	    bits = FbStipLeft (bits, n);
-	    n = 4;
-	    dst += 12;
-	}
-	dstLine += dstStride;
-    }
-}
-#endif
-#endif
 
 void
 fbPolyGlyphBlt (DrawablePtr	pDrawable,
@@ -286,9 +93,6 @@ fbPolyGlyphBlt (DrawablePtr	pDrawable,
 	switch (dstBpp) {
 	case 8:	    glyph = fbGlyph8; break;
 	case 16:    glyph = fbGlyph16; break;
-#ifdef FB_24BIT
-	case 24:    glyph = fbGlyph24; break;
-#endif
 	case 32:    glyph = fbGlyph32; break;
 	}
     }
@@ -379,9 +183,6 @@ fbImageGlyphBlt (DrawablePtr	pDrawable,
 	switch (dstBpp) {
 	case 8:	    glyph = fbGlyph8; break;
 	case 16:    glyph = fbGlyph16; break;
-#ifdef FB_24BIT
-	case 24:    glyph = fbGlyph24; break;
-#endif
 	case 32:    glyph = fbGlyph32; break;
 	}
     }
diff --git a/fb/fbimage.c b/fb/fbimage.c
index da1e8bc..55eae20 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -86,20 +86,6 @@ fbPutImage (DrawablePtr	pDrawable,
 	}
 	break;
     case ZPixmap:
-#ifdef FB_24_32BIT
-	if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
-	{
-	    srcStride = PixmapBytePad(w, pDrawable->depth);
-	    fb24_32PutZImage (pDrawable,
-			      fbGetCompositeClip(pGC),
-			      pGC->alu,
-			      (FbBits) pGC->planemask,
-			      x, y, w, h,
-			      (CARD8 *) pImage,
-			      srcStride);
-	}
-	else
-#endif
 	{
 	    srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof (FbStip);
 	    fbPutZImage (pDrawable,
@@ -305,14 +291,6 @@ fbGetImage (DrawablePtr	    pDrawable,
     if (!fbDrawableEnabled(pDrawable))
 	return;
     
-#ifdef FB_24_32BIT
-    if (format == ZPixmap &&
-	pDrawable->bitsPerPixel != BitsPerPixel (pDrawable->depth))
-    {
-	fb24_32GetImage (pDrawable, x, y, w, h, format, planeMask, d);
-	return;
-    }
-#endif
     
     fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
     
diff --git a/fb/fbline.c b/fb/fbline.c
index fa80573..f4401b0 100644
--- a/fb/fbline.c
+++ b/fb/fbline.c
@@ -122,9 +122,6 @@ fbPolyLine (DrawablePtr	pDrawable,
 	    switch (pDrawable->bitsPerPixel) {
 	    case 8:  line = fbPolyline8; break;
 	    case 16: line = fbPolyline16; break;
-#ifdef FB_24BIT
-	    case 24: line = fbPolyline24; break;
-#endif
 	    case 32: line = fbPolyline32; break;
 	    }
 	}
@@ -159,9 +156,6 @@ fbPolySegment (DrawablePtr  pDrawable,
 	    switch (pDrawable->bitsPerPixel) {
 	    case 8:  seg = fbPolySegment8; break;
 	    case 16: seg = fbPolySegment16; break;
-#ifdef FB_24BIT
-	    case 24: seg = fbPolySegment24; break;
-#endif
 	    case 32: seg = fbPolySegment32; break;
 	    }
 	}
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 7fca89c..4887c47 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -55,11 +55,6 @@ fbOverlayCreateWindow(WindowPtr pWin)
     if (pWin->drawable.class != InputOutput)
 	return TRUE;
 
-#ifdef FB_SCREEN_PRIVATE
-    if (pWin->drawable.bitsPerPixel == 32)
-	pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
-#endif
-
     for (i = 0; i < pScrPriv->nlayers; i++)
     {
 	pPixmap = pScrPriv->layer[i].u.run.pixmap;
@@ -295,30 +290,6 @@ fbOverlaySetupScreen(ScreenPtr	pScreen,
 			  bpp1);
 }
 
-static Bool
-fb24_32OverlayCreateScreenResources(ScreenPtr pScreen)
-{
-    FbOverlayScrPrivPtr	pScrPriv = fbOverlayGetScrPriv(pScreen);
-    int pitch;
-    Bool retval;
-    int i;
-
-    if((retval = fbOverlayCreateScreenResources(pScreen))) {
-	for (i = 0; i < pScrPriv->nlayers; i++)
-	{
-	    /* fix the screen pixmap */
-	    PixmapPtr pPix = (PixmapPtr) pScrPriv->layer[i].u.run.pixmap;
-	    if (pPix->drawable.bitsPerPixel == 32) {
-		pPix->drawable.bitsPerPixel = 24;
-		pitch = BitmapBytePad(pPix->drawable.width * 24);
-		pPix->devKind = pitch;
-	    }
-	}
-    }
-
-    return retval;
-}
-
 Bool
 fbOverlayFinishScreenInit(ScreenPtr	pScreen,
 			  pointer	pbits1,
@@ -338,7 +309,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
     DepthPtr	depths;
     int		nvisuals;
     int		ndepths;
-    int		bpp = 0, imagebpp = 32;
     VisualID	defaultVisual;
     FbOverlayScrPrivPtr	pScrPriv;
 
@@ -349,45 +319,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
     if (!pScrPriv)
 	return FALSE;
  
-#ifdef FB_24_32BIT
-    if (bpp1 == 32 || bpp2 == 32)
-	bpp = 32;
-    else if (bpp1 == 24 || bpp2 == 24)
-	bpp = 24;
-
-    if (bpp == 24)
-    {
-	int	f;
-	
-	imagebpp = 32;
-	/*
-	 * Check to see if we're advertising a 24bpp image format,
-	 * in which case windows will use it in preference to a 32 bit
-	 * format.
-	 */
-	for (f = 0; f < screenInfo.numPixmapFormats; f++)
-	{
-	    if (screenInfo.formats[f].bitsPerPixel == 24)
-	    {
-		imagebpp = 24;
-		break;
-	    }
-	}	    
-    }
-#endif
-#ifdef FB_SCREEN_PRIVATE
-    if (imagebpp == 32)
-    {
-	fbGetScreenPrivate(pScreen)->win32bpp = bpp;
-	fbGetScreenPrivate(pScreen)->pix32bpp = bpp;
-    }
-    else
-    {
-	fbGetScreenPrivate(pScreen)->win32bpp = 32;
-	fbGetScreenPrivate(pScreen)->pix32bpp = 32;
-    }
-#endif
-   
     if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
 			&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
 			((unsigned long)1<<(bpp2-1)), 8))
@@ -421,13 +352,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
     pScreen->CreateWindow = fbOverlayCreateWindow;
     pScreen->WindowExposures = fbOverlayWindowExposures;
     pScreen->CopyWindow = fbOverlayCopyWindow;
-#ifdef FB_24_32BIT
-    if (bpp == 24 && imagebpp == 32)
-    {
-	pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
-  	pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources;
-    }
-#endif
 
     return TRUE;
 }
diff --git a/fb/fbpict.h b/fb/fbpict.h
index b89f90f..f945fc6 100644
--- a/fb/fbpict.h
+++ b/fb/fbpict.h
@@ -97,8 +97,6 @@ fbCanGetSolid(PicturePtr pict)
     case PICT_x8b8g8r8:
     case PICT_b8g8r8a8:
     case PICT_b8g8r8x8:
-    case PICT_r8g8b8:
-    case PICT_b8g8r8:
     case PICT_r5g6b5:
     case PICT_b5g6r5:
 	return TRUE;
@@ -118,9 +116,6 @@ fbCanGetSolid(PicturePtr pict)
     case 32: \
 	(bits) = READ((CARD32 *) __bits__); \
 	break; \
-    case 24: \
-	(bits) = Fetch24 ((CARD8 *) __bits__); \
-	break; \
     case 16: \
 	(bits) = READ((CARD16 *) __bits__); \
 	(bits) = cvt0565to0888(bits); \
@@ -167,203 +162,6 @@ fbCanGetSolid(PicturePtr pict)
 			     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
 			     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
 
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \
-		     ((READ((CARD16 *) (a)) << 8) | READ((a)+2)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      (WRITE(a, (CARD8) ((v) >> 16)), \
-		       WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \
-		      (WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \
-		       WRITE((a)+2, (CARD8) (v))))
-#else
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     (READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \
-		     (READ((CARD16 *) (a)) | (READ((a)+2) << 16)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      (WRITE(a, (CARD8) (v)), \
-		       WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \
-		      (WRITE((CARD16 *) (a), (CARD16) (v)),\
-		       WRITE((a)+2, (CARD8) ((v) >> 16))))
-#endif
-		      
-/*
-   The methods below use some tricks to be able to do two color
-   components at the same time.
-*/
-
-/*
-  x_c = (x_c * a) / 255
-*/
-#define FbByteMul(x, a) do {                                      \
-        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
-        t &= 0xff00ff;                                            \
-                                                                  \
-        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;               \
-        x = (x + ((x >> 8) & 0xff00ff));                          \
-        x &= 0xff00ff00;                                          \
-        x += t;                                                   \
-    } while (0)
-
-/*
-  x_c = (x_c * a) / 255 + y
-*/
-#define FbByteMulAdd(x, a, y) do {                                \
-        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
-        t &= 0xff00ff;                                            \
-        t += y & 0xff00ff;                                        \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                   \
-        t &= 0xff00ff;                                            \
-                                                                  \
-        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;                 \
-        x = (x + ((x >> 8) & 0xff00ff)) >> 8;                       \
-        x &= 0xff00ff;                                              \
-        x += (y >> 8) & 0xff00ff;                                   \
-        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                     \
-        x &= 0xff00ff;                                              \
-        x <<= 8;                                                    \
-        x += t;                                                     \
-    } while (0)
-
-/*
-  x_c = (x_c * a + y_c * b) / 255
-*/
-#define FbByteAddMul(x, a, y, b) do {                                   \
-        CARD32 t;                                                       \
-        CARD32 r = (x >> 24) * a + (y >> 24) * b + 0x80;                \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        t = (x & 0xff00) * a + (y & 0xff00) * b;                        \
-        t += (t >> 8) + 0x8000;                                         \
-        t >>= 16;                                                       \
-                                                                        \
-        t |= r << 16;                                                   \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        t &= 0xff00ff;                                                  \
-        t <<= 8;                                                        \
-                                                                        \
-        r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b + 0x80;     \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        x = (x & 0xff) * a + (y & 0xff) * b + 0x80;                     \
-        x += (x >> 8);                                                  \
-        x >>= 8;                                                        \
-        x |= r << 16;                                                   \
-        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
-        x &= 0xff00ff;                                                  \
-        x |= t;                                                         \
-} while (0)
-
-/*
-  x_c = (x_c * a + y_c *b) / 256
-*/
-#define FbByteAddMul_256(x, a, y, b) do {                               \
-        CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;             \
-        t >>= 8;                                                        \
-        t &= 0xff00ff;                                                  \
-                                                                        \
-        x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;      \
-        x &= 0xff00ff00;                                                \
-        x += t;                                                         \
-} while (0)
-/*
-  x_c = (x_c * a_c) / 255
-*/
-#define FbByteMulC(x, a) do {                           \
-        CARD32 t;                                       \
-        CARD32 r = (x & 0xff) * (a & 0xff);             \
-        r |= (x & 0xff0000) * ((a >> 16) & 0xff);       \
-	r += 0x800080;					\
-        r = (r + ((r >> 8) & 0xff00ff)) >> 8;           \
-        r &= 0xff00ff;                                  \
-                                                        \
-        x >>= 8;                                        \
-        t = (x & 0xff) * ((a >> 8) & 0xff);             \
-        t |= (x & 0xff0000) * (a >> 24);                \
-        t += 0x800080;                                  \
-        t = t + ((t >> 8) & 0xff00ff);                  \
-        x = r | (t & 0xff00ff00);                       \
-                                                        \
-    } while (0)
-
-/*
-  x_c = (x_c * a) / 255 + y
-*/
-#define FbByteMulAddC(x, a, y) do {                                 \
-        CARD32 t;                                                   \
-        CARD32 r = (x & 0xff) * (a & 0xff);                         \
-        r |= (x & 0xff0000) * ((a >> 16) & 0xff);                   \
-	r += 0x800080;						    \
-	r = (r + ((r >> 8) & 0xff00ff)) >> 8;			    \
-        r &= 0xff00ff;                                              \
-        r += y & 0xff00ff;                                          \
-        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                     \
-        r &= 0xff00ff;                                              \
-                                                                    \
-        x >>= 8;                                                       \
-        t = (x & 0xff) * ((a >> 8) & 0xff);                            \
-        t |= (x & 0xff0000) * (a >> 24);                               \
-	t += 0x800080;                                                 \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;			       \
-        t &= 0xff00ff;                                                 \
-        t += (y >> 8) & 0xff00ff;                                      \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                        \
-        t &= 0xff00ff;                                                 \
-        x = r | (t << 8);                                              \
-    } while (0)
-
-/*
-  x_c = (x_c * a_c + y_c * b) / 255
-*/
-#define FbByteAddMulC(x, a, y, b) do {                                  \
-        CARD32 t;                                                       \
-        CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b;               \
-        r += (r >> 8) + 0x80;                                           \
-        r >>= 8;                                                        \
-                                                                        \
-        t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b;        \
-        t += (t >> 8) + 0x8000;                                         \
-        t >>= 16;                                                       \
-                                                                        \
-        t |= r << 16;                                                   \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        t &= 0xff00ff;                                                  \
-        t <<= 8;                                                        \
-                                                                        \
-        r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b + 0x80; \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b + 0x80;            \
-        x += (x >> 8);                                                  \
-        x >>= 8;                                                        \
-        x |= r << 16;                                                   \
-        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
-        x &= 0xff00ff;                                                  \
-        x |= t;                                                         \
-    } while (0)
- 
-/*
-  x_c = min(x_c + y_c, 255)
-*/
-#define FbByteAdd(x, y) do {                                            \
-        CARD32 t;                                                       \
-        CARD32 r = (x & 0xff00ff) + (y & 0xff00ff);                     \
-        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                         \
-        r &= 0xff00ff;                                                  \
-                                                                        \
-        t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff);              \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        r |= (t & 0xff00ff) << 8;                                       \
-        x = r;                                                          \
-    } while (0)
-
-#define div_255(x) (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)
-
 #if defined(__i386__) && defined(__GNUC__)
 #define FASTCALL __attribute__((regparm(3)))
 #else
diff --git a/fb/fbpoint.c b/fb/fbpoint.c
index f260a69..3623c33 100644
--- a/fb/fbpoint.c
+++ b/fb/fbpoint.c
@@ -75,29 +75,6 @@ fbDots (FbBits	    *dstOrig,
 	    x = (x + xoff) * dstBpp;
 	    d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT);
 	    x &= FB_STIP_MASK;
-#ifdef FB_24BIT
-	    if (dstBpp == 24)
-	    {
-		FbStip	leftMask, rightMask;
-		int	n, rot;
-		FbStip	andT, xorT;
-		
-		rot = FbFirst24Rot (x);
-		andT = FbRot24Stip(and,rot);
-		xorT = FbRot24Stip(xor,rot);
-		FbMaskStip (x, 24, leftMask, n, rightMask);
-		if (leftMask)
-		{
-		    WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
-		    andT = FbNext24Stip(andT);
-		    xorT = FbNext24Stip(xorT);
-		    d++;
-		}
-		if (rightMask)
-		    WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
-	    }
-	    else
-#endif
 	    {
 		FbStip	mask;
 		mask = FbStipMask(x, dstBpp);
@@ -148,9 +125,6 @@ fbPolyPoint (DrawablePtr    pDrawable,
     switch (dstBpp) {
     case 8:	dots = fbDots8; break;
     case 16:    dots = fbDots16; break;
-#ifdef FB_24BIT
-    case 24:    dots = fbDots24; break;
-#endif
     case 32:    dots = fbDots32; break;
     }
 #endif
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 2502efe..3cc91cf 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -179,49 +179,10 @@ fbFinishScreenInit(ScreenPtr	pScreen,
     fbSetBits ((FbStip *) ((char *) pbits + stride * ysize),
 			   stride / sizeof (FbStip), FB_TAIL_BITS);
 #endif
-    /*
-     * By default, a 24bpp screen will use 32bpp images, this avoids
-     * problems with many applications which just can't handle packed
-     * pixels.  If you want real 24bit images, include a 24bpp
-     * format in the pixmap formats
-     */
-#ifdef FB_24_32BIT
-    if (bpp == 24)
-    {
-	int	f;
-	
-	imagebpp = 32;
-	/*
-	 * Check to see if we're advertising a 24bpp image format,
-	 * in which case windows will use it in preference to a 32 bit
-	 * format.
-	 */
-	for (f = 0; f < screenInfo.numPixmapFormats; f++)
-	{
-	    if (screenInfo.formats[f].bitsPerPixel == 24)
-	    {
-		imagebpp = 24;
-		break;
-	    }
-	}	    
-    }
-#endif
-#ifdef FB_SCREEN_PRIVATE
-    if (imagebpp == 32)
-    {
-	fbGetScreenPrivate(pScreen)->win32bpp = bpp;
-	fbGetScreenPrivate(pScreen)->pix32bpp = bpp;
-    }
-    else
-    {
-	fbGetScreenPrivate(pScreen)->win32bpp = 32;
-	fbGetScreenPrivate(pScreen)->pix32bpp = 32;
-    }
 #ifdef FB_ACCESS_WRAPPER
     fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
     fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
 #endif
-#endif
     rootdepth = 0;
     if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
 			&defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
@@ -236,13 +197,6 @@ fbFinishScreenInit(ScreenPtr	pScreen,
 	return FALSE;
     /* overwrite miCloseScreen with our own */
     pScreen->CloseScreen = fbCloseScreen;
-#ifdef FB_24_32BIT
-    if (bpp == 24 && imagebpp == 32)
-    {
-	pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
-	pScreen->CreateScreenResources = fb24_32CreateScreenResources;
-    }
-#endif
     return TRUE;
 }
 
diff --git a/fb/fbseg.c b/fb/fbseg.c
index 7cc38a2..1ed4bdb 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -330,184 +330,6 @@ fbBresFillDash (DrawablePtr pDrawable,
 	fbSetFg (pDrawable, pGC, fg);
 }
 
-#ifdef FB_24BIT
-static void
-fbBresSolid24RRop (DrawablePtr  pDrawable,
-		   GCPtr	pGC,
-		   int		dashOffset,
-		   int		signdx,
-		   int		signdy,
-		   int		axis,
-		   int		x1,
-		   int		y1,
-		   int		e,
-		   int		e1,
-		   int		e3,
-		   int		len)
-{
-    FbStip	*dst;
-    FbStride	dstStride;
-    int		dstBpp;
-    int		dstXoff, dstYoff;
-    FbGCPrivPtr	pPriv = fbGetGCPrivate (pGC);
-    FbStip	and = pPriv->and;
-    FbStip	xor = pPriv->xor;
-    FbStip	leftMask, rightMask;
-    int		nl;
-    FbStip	*d;
-    int		x;
-    int		rot;
-    FbStip	andT, xorT;
-    
-    fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
-    dst += ((y1 + dstYoff) * dstStride);
-    x1 = (x1 + dstXoff) * 24;
-    if (signdy < 0)
-	dstStride = -dstStride;
-    signdx *= 24;
-    while (len--)
-    {
-	d = dst + (x1 >> FB_STIP_SHIFT);
-	x = x1 & FB_STIP_MASK;
-	rot = FbFirst24Rot (x);
-	andT = FbRot24Stip(and,rot);
-	xorT = FbRot24Stip(xor,rot);
-	FbMaskStip (x, 24, leftMask, nl, rightMask);
-	if (leftMask)
-	{
-	    WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
-	    d++;
-	    andT = FbNext24Stip (andT);
-	    xorT = FbNext24Stip (xorT);
-	}
-	if (rightMask)
-	    WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
-	if (axis == X_AXIS)
-	{
-	    x1 += signdx;
-	    e += e1;
-	    if (e >= 0)
-	    {
-		e += e3;
-		dst += dstStride;
-	    }
-	}
-	else
-	{
-	    dst += dstStride;
-	    e += e1;
-	    if (e >= 0)
-	    {
-		e += e3;
-		x1 += signdx;
-	    }
-	}
-    }
-
-    fbFinishAccess (pDrawable);
-}
-
-static void
-fbBresDash24RRop (DrawablePtr	pDrawable,
-		  GCPtr		pGC,
-		  int		dashOffset,
-		  int		signdx,
-		  int		signdy,
-		  int		axis,
-		  int		x1,
-		  int		y1,
-		  int		e,
-		  int		e1,
-		  int		e3,
-		  int		len)
-{
-    FbStip	*dst;
-    FbStride	dstStride;
-    int		dstBpp;
-    int		dstXoff, dstYoff;
-    FbGCPrivPtr	pPriv = fbGetGCPrivate (pGC);
-    FbStip	andT, xorT;
-    FbStip	fgand = pPriv->and;
-    FbStip	fgxor = pPriv->xor;
-    FbStip	bgand = pPriv->bgand;
-    FbStip	bgxor = pPriv->bgxor;
-    FbStip	leftMask, rightMask;
-    int		nl;
-    FbStip	*d;
-    int		x;
-    int		rot;
-    FbDashDeclare;
-    int		dashlen;
-    Bool	even;
-    Bool	doOdd;
-    
-    fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
-    doOdd = pGC->lineStyle == LineDoubleDash;
-
-    /* compute current dash position */
-    FbDashInit(pGC, pPriv, dashOffset, dashlen, even);
-    
-    dst += ((y1 + dstYoff) * dstStride);
-    x1 = (x1 + dstXoff) * 24;
-    if (signdy < 0)
-	dstStride = -dstStride;
-    signdx *= 24;
-    while (len--)
-    {
-	if (even || doOdd)
-	{
-	    if (even)
-	    {
-		andT = fgand;
-		xorT = fgxor;
-	    }
-	    else
-	    {
-		andT = bgand;
-		xorT = bgxor;
-	    }
-	    d = dst + (x1 >> FB_STIP_SHIFT);
-	    x = x1 & FB_STIP_MASK;
-	    rot = FbFirst24Rot (x);
-	    andT = FbRot24Stip (andT, rot);
-	    xorT = FbRot24Stip (xorT, rot);
-	    FbMaskStip (x, 24, leftMask, nl, rightMask);
-	    if (leftMask)
-	    {
-		WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
-		d++;
-		andT = FbNext24Stip (andT);
-		xorT = FbNext24Stip (xorT);
-	    }
-	    if (rightMask)
-		WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
-	}
-	if (axis == X_AXIS)
-	{
-	    x1 += signdx;
-	    e += e1;
-	    if (e >= 0)
-	    {
-		e += e3;
-		dst += dstStride;
-	    }
-	}
-	else
-	{
-	    dst += dstStride;
-	    e += e1;
-	    if (e >= 0)
-	    {
-		e += e3;
-		x1 += signdx;
-	    }
-	}
-	FbDashStep (dashlen, even);
-    }
-
-    fbFinishAccess (pDrawable);
-}
-#endif
 
 /*
  * For drivers that want to bail drawing some lines, this
@@ -529,19 +351,12 @@ fbSelectBres (DrawablePtr   pDrawable,
 	if (pGC->fillStyle == FillSolid)
 	{
 	    bres = fbBresSolid;
-#ifdef FB_24BIT
-	    if (dstBpp == 24)
-		bres = fbBresSolid24RRop;
-#endif
 #ifndef FBNOPIXADDR
 	    if (pPriv->and == 0)
 	    {
 		switch (dstBpp) {
 		case 8:	bres = fbBresSolid8; break;
 		case 16: bres = fbBresSolid16; break;
-#ifdef FB_24BIT
-		case 24: bres = fbBresSolid24; break;
-#endif
 		case 32: bres = fbBresSolid32; break;
 		}
 	    }
@@ -554,10 +369,6 @@ fbSelectBres (DrawablePtr   pDrawable,
 	if (pGC->fillStyle == FillSolid)
 	{
 	    bres = fbBresDash;
-#ifdef FB_24BIT
-	    if (dstBpp == 24)
-		bres = fbBresDash24RRop;
-#endif
 #ifndef FBNOPIXADDR
 	    if (pPriv->and == 0 && 
 		(pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0))
@@ -565,9 +376,6 @@ fbSelectBres (DrawablePtr   pDrawable,
 		switch (dstBpp) {
 		case 8:	bres = fbBresDash8; break;
 		case 16: bres = fbBresDash16; break;
-#ifdef FB_24BIT
-		case 24: bres = fbBresDash24; break;
-#endif
 		case 32: bres = fbBresDash32; break;
 		}
 	    }
diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c
index 61dc4dc..a7fc2de 100644
--- a/fb/fbsetsp.c
+++ b/fb/fbsetsp.c
@@ -46,13 +46,6 @@ fbSetSpans (DrawablePtr	    pDrawable,
     int		    xoff;
     int		    x1, x2;
     
-#ifdef FB_24_32BIT
-    if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
-    {
-	fb24_32SetSpans (pDrawable, pGC, src, ppt, pwidth, nspans, fSorted);
-	return;
-    }
-#endif
     fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
     while (nspans--)
     {
diff --git a/fb/fbsolid.c b/fb/fbsolid.c
index 53fcae0..cb89976 100644
--- a/fb/fbsolid.c
+++ b/fb/fbsolid.c
@@ -44,13 +44,6 @@ fbSolid (FbBits	    *dst,
     int	    n, nmiddle;
     int	    startbyte, endbyte;
 
-#ifdef FB_24BIT
-    if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor)))
-    {
-	fbSolid24 (dst, dstStride, dstX, width, height, and, xor);
-	return;
-    }
-#endif
     dst += dstX >> FB_SHIFT;
     dstX &= FB_MASK;
     FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, 
@@ -81,133 +74,3 @@ fbSolid (FbBits	    *dst,
     }
 }
 
-#ifdef FB_24BIT
-void
-fbSolid24 (FbBits   *dst,
-	   FbStride dstStride,
-	   int	    dstX,
-
-	   int	    width,
-	   int	    height,
-
-	   FbBits   and,
-	   FbBits   xor)
-{
-    FbBits  startmask, endmask;
-    FbBits  xor0 = 0, xor1 = 0, xor2 = 0;
-    FbBits  and0 = 0, and1 = 0, and2 = 0;
-    FbBits  xorS = 0, andS = 0, xorE = 0, andE = 0;
-    int	    n, nmiddle;
-    int	    rotS, rot;
-
-    dst += dstX >> FB_SHIFT;
-    dstX &= FB_MASK;
-    /*
-     * Rotate pixel values this far across the word to align on
-     * screen pixel boundaries
-     */
-    rot = FbFirst24Rot (dstX);
-    FbMaskBits (dstX, width, startmask, nmiddle, endmask);
-    if (startmask)
-	dstStride--;
-    dstStride -= nmiddle;
-    
-    /*
-     * Precompute rotated versions of the rasterop values
-     */
-    rotS = rot;
-    xor = FbRot24(xor,rotS);
-    and = FbRot24(and,rotS);
-    if (startmask)
-    {
-	xorS = xor;
-	andS = and;
-	xor = FbNext24Pix(xor);
-	and = FbNext24Pix(and);
-    }
-    
-    if (nmiddle)
-    {
-	xor0 = xor;
-	and0 = and;
-	xor1 = FbNext24Pix(xor0);
-	and1 = FbNext24Pix(and0);
-	xor2 = FbNext24Pix(xor1);
-	and2 = FbNext24Pix(and1);
-    }
-    
-    if (endmask)
-    {
-	switch (nmiddle % 3) {
-	case 0:
-	    xorE = xor;
-	    andE = and;
-	    break;
-	case 1:
-	    xorE = xor1;
-	    andE = and1;
-	    break;
-	case 2:
-	    xorE = xor2;
-	    andE = and2;
-	    break;
-	}
-    }
-    
-    while (height--)
-    {
-	if (startmask)
-	{
-	    WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask));
-            dst++;
-	}
-	n = nmiddle;
-	if (!and0)
-	{
-	    while (n >= 3)
-	    {
-		WRITE(dst++, xor0);
-		WRITE(dst++, xor1);
-		WRITE(dst++, xor2);
-		n -= 3;
-	    }
-	    if (n)
-	    {
-		WRITE(dst++, xor0);
-		n--;
-		if (n)
-		{
-		    WRITE(dst++, xor1);
-		}
-	    }
-	}
-	else
-	{
-	    while (n >= 3)
-	    {
-		WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
-                dst++;
-		WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
-                dst++;
-		WRITE(dst, FbDoRRop (READ(dst), and2, xor2));
-                dst++;
-		n -= 3;
-	    }
-	    if (n)
-	    {
-		WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
-                dst++;
-		n--;
-		if (n)
-		{
-		    WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
-                    dst++;
-		}
-	    }
-	}
-	if (endmask)
-	    WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask));
-	dst += dstStride;
-    }
-}
-#endif
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index bb0384d..7ac016f 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -33,10 +33,6 @@ fbCreateWindow(WindowPtr pWin)
 {
     dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(),
 		  fbGetScreenPixmap(pWin->drawable.pScreen));
-#ifdef FB_SCREEN_PRIVATE
-    if (pWin->drawable.bitsPerPixel == 32)
-	pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
-#endif
     return TRUE;
 }
 
@@ -158,18 +154,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 	if (pWin->backgroundState == BackgroundPixmap)
 	{
 	    pPixmap = pWin->background.pixmap;
-#ifdef FB_24_32BIT
-	    if (pPixmap->drawable.bitsPerPixel != pWin->drawable.bitsPerPixel)
-	    {
-		pPixmap = fb24_32ReformatTile (pPixmap,
-					       pWin->drawable.bitsPerPixel);
-		if (pPixmap)
-		{
-		    (*pWin->drawable.pScreen->DestroyPixmap) (pWin->background.pixmap);
-		    pWin->background.pixmap = pPixmap;
-		}
-	    }
-#endif
 	    if (FbEvenTile (pPixmap->drawable.width *
 			    pPixmap->drawable.bitsPerPixel))
 		fbPadPixmap (pPixmap);
@@ -180,19 +164,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 	if (pWin->borderIsPixel == FALSE)
 	{
 	    pPixmap = pWin->border.pixmap;
-#ifdef FB_24_32BIT
-	    if (pPixmap->drawable.bitsPerPixel !=
-		pWin->drawable.bitsPerPixel)
-	    {
-		pPixmap = fb24_32ReformatTile (pPixmap,
-					       pWin->drawable.bitsPerPixel);
-		if (pPixmap)
-		{
-		    (*pWin->drawable.pScreen->DestroyPixmap) (pWin->border.pixmap);
-		    pWin->border.pixmap = pPixmap;
-		}
-	    }
-#endif
 	    if (FbEvenTile (pPixmap->drawable.width *
 			    pPixmap->drawable.bitsPerPixel))
 		fbPadPixmap (pPixmap);
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 886c25b..c16bc53 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -251,7 +251,6 @@ extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num,
 		   int knownclkindex, int knownclkvalue);
 extern _X_EXPORT const char *xf86GetVisualName(int visual);
 extern _X_EXPORT int xf86GetVerbosity(void);
-extern _X_EXPORT Pix24Flags xf86GetPix24(void);
 extern _X_EXPORT int xf86GetDepth(void);
 extern _X_EXPORT rgb xf86GetWeight(void);
 extern _X_EXPORT Gamma xf86GetGamma(void);
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 92fb74d..045c68f 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -783,7 +783,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 {
     XF86OptionPtr optp, tmp;
     int i;
-    Pix24Flags pix24 = Pix24DontCare;
     Bool value;
     MessageType from;
     const char *s;
@@ -1008,31 +1007,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 			i, MAX_TIME_IN_MIN);
 #endif
 
-    i = -1;
-    xf86GetOptValInteger(FlagOptions, FLAG_PIXMAP, &i);
-    switch (i) {
-    case 24:
-	pix24 = Pix24Use24;
-	break;
-    case 32:
-	pix24 = Pix24Use32;
-	break;
-    case -1:
-	break;
-    default:
-	xf86ConfigError("Pixmap option's value (%d) must be 24 or 32\n", i);
-	return FALSE;
-    }
-    if (xf86Pix24 != Pix24DontCare) {
-	xf86Info.pixmap24 = xf86Pix24;
-	xf86Info.pix24From = X_CMDLINE;
-    } else if (pix24 != Pix24DontCare) {
-	xf86Info.pixmap24 = pix24;
-	xf86Info.pix24From = X_CONFIG;
-    } else {
-	xf86Info.pixmap24 = Pix24DontCare;
-	xf86Info.pix24From = X_DEFAULT;
-    }
 #ifdef SUPPORT_PC98
     if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
 	xf86Info.pc98 = value;
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 781ee49..942b5db 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -118,8 +118,6 @@ xf86InfoRec xf86Info = {
     .vidModeAllowNonLocal       = FALSE,
     .miscModInDevEnabled        = TRUE,
     .miscModInDevAllowNonLocal  = FALSE,
-    .pixmap24                   = Pix24DontCare,
-    .pix24From                  = X_DEFAULT,
 #ifdef SUPPORT_PC98
     .pc98                       = FALSE,
 #endif
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 67be200..b3e1102 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -416,13 +416,9 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
 {
     int i;
     DispPtr disp;
-    Pix24Flags pix24 = xf86Info.pixmap24;
-    Bool nomatch = FALSE;
 
     scrp->bitsPerPixel = -1;
     scrp->depth = -1;
-    scrp->pixmap24 = Pix24DontCare;
-    scrp->bitsPerPixelFrom = X_DEFAULT;
     scrp->depthFrom = X_DEFAULT;
 
     if (xf86FbBpp > 0) {
@@ -504,46 +500,7 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
 		scrp->bitsPerPixel = 8;
 	    else if (scrp->depth <= 16)
 		scrp->bitsPerPixel = 16;
-	    else if (scrp->depth <= 24) {
-		/*
-		 * Figure out if a choice is possible based on the depth24
-		 * and pix24 flags.
-		 */
-		/* Check pix24 first */
-		if (pix24 != Pix24DontCare) {
-		    if (pix24 == Pix24Use32) {
-			if (DO_PIX32(depth24flags)) {
-			    if (CHOOSE24FOR32(depth24flags))
-				scrp->bitsPerPixel = 24;
-			    else
-				scrp->bitsPerPixel = 32;
-			} else {
-			    nomatch = TRUE;
-			}
-		    } else if (pix24 == Pix24Use24) {
-			if (DO_PIX24(depth24flags)) {
-			    if (CHOOSE32FOR24(depth24flags))
-				scrp->bitsPerPixel = 32;
-			    else
-				scrp->bitsPerPixel = 24;
-			} else {
-			    nomatch = TRUE;
-			}
-		    }
-		} else {
-		    if (DO_PIX32(depth24flags)) {
-			if (CHOOSE24FOR32(depth24flags))
-			    scrp->bitsPerPixel = 24;
-			else
-			    scrp->bitsPerPixel = 32;
-		    } else if (DO_PIX24(depth24flags)) {
-			if (CHOOSE32FOR24(depth24flags))
-			    scrp->bitsPerPixel = 32;
-			else
-			    scrp->bitsPerPixel = 24;
-		    }
-		}
-	    } else if (scrp->depth <= 32)
+	    else if (scrp->depth <= 32)
 		scrp->bitsPerPixel = 32;
 	    else {
 		xf86DrvMsg(scrp->scrnIndex, X_ERROR,
@@ -557,20 +514,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
 			" are both not set\n");
 	    return FALSE;
 	}
-	if (scrp->bitsPerPixel < 0) {
-	    if (nomatch)
-		xf86DrvMsg(scrp->scrnIndex, X_ERROR,
-			"Driver can't support depth 24 pixmap format (%d)\n",
-			PIX24TOBPP(pix24));
-	    else if ((depth24flags & (Support24bppFb | Support32bppFb)) ==
-		     NoDepth24Support)
-		xf86DrvMsg(scrp->scrnIndex, X_ERROR,
-			"Driver can't support depth 24\n");
-	    else
-		xf86DrvMsg(scrp->scrnIndex, X_ERROR,
-			"Can't find fbbpp for depth 24\n");
-	    return FALSE;
-	}
 	scrp->bitsPerPixelFrom = X_PROBED;
     }
 
@@ -600,7 +543,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
     case 4:
     case 8:
     case 16:
-    case 24:
     case 32:
 	break;
     default:
@@ -616,14 +558,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
 	return FALSE;
     }
 
-    /* set scrp->pixmap24 if the driver isn't flexible */
-    if (scrp->bitsPerPixel == 24 && !DO_PIX32FOR24(depth24flags)) {
-	scrp->pixmap24 = Pix24Use24;
-    }
-    if (scrp->bitsPerPixel == 32 && !DO_PIX24FOR32(depth24flags)) {
-	scrp->pixmap24 = Pix24Use32;
-    }
-
     /*
      * Find the Display subsection matching the depth/fbbpp and initialise
      * scrp->display with it.
@@ -1600,13 +1534,6 @@ xf86GetVerbosity(void)
     return max(xf86Verbose, xf86LogVerbose);
 }
 
-Pix24Flags
-xf86GetPix24(void)
-{
-    return xf86Info.pixmap24;
-}
-
-
 int
 xf86GetDepth(void)
 {
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 877ebab..df92a33 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -333,9 +333,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
   int                    i, j, k, scr_index;
   char                   **modulelist;
   pointer                *optionlist;
-  Pix24Flags		 screenpix24, pix24;
-  MessageType		 pix24From = X_DEFAULT;
-  Bool			 pix24Fail = FALSE;
   Bool			 autoconfig = FALSE;
   GDevPtr		 configured_device;
 
@@ -560,7 +557,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
      * Collect all pixmap formats and check for conflicts at the display
      * level.  Should we die here?  Or just delete the offending screens?
      */
-    screenpix24 = Pix24DontCare;
     for (i = 0; i < xf86NumScreens; i++) {
 	if (xf86Screens[i]->imageByteOrder !=
 	    xf86Screens[0]->imageByteOrder)
@@ -574,35 +570,12 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 	if (xf86Screens[i]->bitmapBitOrder !=
 	    xf86Screens[0]->bitmapBitOrder)
 	    FatalError("Inconsistent display bitmapBitOrder.  Exiting\n");
-
-	/* Determine the depth 24 pixmap format the screens would like */
-	if (xf86Screens[i]->pixmap24 != Pix24DontCare) {
-	    if (screenpix24 == Pix24DontCare)
-		screenpix24 = xf86Screens[i]->pixmap24;
-	    else if (screenpix24 != xf86Screens[i]->pixmap24)
-		FatalError("Inconsistent depth 24 pixmap format.  Exiting\n");
-	}
     }
-    /* check if screenpix24 is consistent with the config/cmdline */
-    if (xf86Info.pixmap24 != Pix24DontCare) {
-	pix24 = xf86Info.pixmap24;
-	pix24From = xf86Info.pix24From;
-	if (screenpix24 != Pix24DontCare && screenpix24 != xf86Info.pixmap24)
-	    pix24Fail = TRUE;
-    } else if (screenpix24 != Pix24DontCare) {
-	pix24 = screenpix24;
-	pix24From = X_PROBED;
-    } else
-	pix24 = Pix24Use32;
-
-    if (pix24Fail)
-	FatalError("Screen(s) can't use the required depth 24 pixmap format"
-		   " (%d).  Exiting\n", PIX24TOBPP(pix24));
 
     /* Initialise the depth 24 format */
     for (j = 0; j < numFormats && formats[j].depth != 24; j++)
 	;
-    formats[j].bitsPerPixel = PIX24TOBPP(pix24);
+    formats[j].bitsPerPixel = 32;
 
     /* Collect additional formats */
     for (i = 0; i < xf86NumScreens; i++) {
@@ -654,15 +627,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 		     "Failed to register VT property\n");
       }
     }
-
-    /* If a screen uses depth 24, show what the pixmap format is */
-    for (i = 0; i < xf86NumScreens; i++) {
-	if (xf86Screens[i]->depth == 24) {
-	    xf86Msg(pix24From, "Depth 24 pixmap format is %d bpp\n",
-		    PIX24TOBPP(pix24));
-	    break;
-	}
-    }
   } else {
     /*
      * serverGeneration != 1; some OSs have to do things here, too.
@@ -1457,31 +1421,12 @@ PixmapFormatPtr
 xf86GetPixFormat(ScrnInfoPtr pScrn, int depth)
 {
     int i;
-    static PixmapFormatRec format;	/* XXX not reentrant */
 
     /*
      * When the formats[] list initialisation isn't complete, check the
      * depth 24 pixmap config/cmdline options and screen-specified formats.
      */
 
-    if (!formatsDone) {
-	if (depth == 24) {
-	    Pix24Flags pix24 = Pix24DontCare;
-
-	    format.depth = 24;
-	    format.scanlinePad = BITMAP_SCANLINE_PAD;
-	    if (xf86Info.pixmap24 != Pix24DontCare)
-		pix24 = xf86Info.pixmap24;
-	    else if (pScrn->pixmap24 != Pix24DontCare)
-		pix24 = pScrn->pixmap24;
-	    if (pix24 == Pix24Use24)
-		format.bitsPerPixel = 24;
-	    else
-		format.bitsPerPixel = 32;
-	    return &format;
-	}
-    }
-
     for (i = 0; i < numFormats; i++)
 	if (formats[i].depth == depth)
 	   break;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 39cd230..d5ed241 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -89,8 +89,6 @@ typedef struct {
     Bool		miscModInDevAllowNonLocal;
     Bool		useSIGIO;		/* Use SIGIO for handling
 						   input device events */
-    Pix24Flags		pixmap24;
-    MessageType		pix24From;
 #ifdef SUPPORT_PC98
     Bool		pc98;
 #endif
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index b979884..e3cfd7d 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -694,7 +694,6 @@ typedef struct _ScrnInfoRec {
     PixmapFormatRec	fbFormat;
 
     int			bitsPerPixel;		/* fb bpp */
-    Pix24Flags		pixmap24;		/* pixmap pref for depth 24 */
     int			depth;			/* depth of default visual */
     MessageType		depthFrom;		/* set from config? */
     MessageType		bitsPerPixelFrom;	/* set from config? */
diff --git a/hw/xfree86/ramdac/BT.c b/hw/xfree86/ramdac/BT.c
index 5aa27a1..da724c4 100644
--- a/hw/xfree86/ramdac/BT.c
+++ b/hw/xfree86/ramdac/BT.c
@@ -146,9 +146,6 @@ BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
 	case 32:
 	    ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x10;
 	    break;
-	case 24:
-	    ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x10;
-	    break;
 	case 16:
 	    ramdacReg->DacRegs[BT_COMMAND_REG_1] = 0x38;
 	    break;
diff --git a/hw/xfree86/ramdac/IBM.c b/hw/xfree86/ramdac/IBM.c
index 89fb25c..8b83ba2 100644
--- a/hw/xfree86/ramdac/IBM.c
+++ b/hw/xfree86/ramdac/IBM.c
@@ -336,13 +336,6 @@ IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
 		ramdacReg->DacRegs[IBMRGB_key_mask] = 0xFF;
 	    }
 	    break;
-	case 24:
-	    ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_24BPP;
-	    ramdacReg->DacRegs[IBMRGB_32bpp] = 0;
-	    ramdacReg->DacRegs[IBMRGB_24bpp] = B24_DCOL_DIRECT;
-	    ramdacReg->DacRegs[IBMRGB_16bpp] = 0;
-	    ramdacReg->DacRegs[IBMRGB_8bpp] = 0;
-	    break;
 	case 16:
 	    if (pScrn->depth == 16) {
 	        ramdacReg->DacRegs[IBMRGB_pix_fmt] = PIXEL_FORMAT_16BPP;
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
index eee5d45..17f685d 100644
--- a/hw/xfree86/ramdac/TI.c
+++ b/hw/xfree86/ramdac/TI.c
@@ -382,28 +382,6 @@ TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
 	}
 	ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
 	break;
-    case 24:
-	/* order is important */
-	ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-	ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x56;
-	ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x58;
-	ramdacReg->DacRegs[TIDAC_clock_select] = 0x25;
-	ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-	ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-	ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-	/* 0x2A & 0x2B are reserved */
-	ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-	ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-	ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-	ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-	break;
     case 16:
 	/* order is important */
 #if 0
@@ -499,28 +477,6 @@ TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
 	}
 	ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
 	break;
-    case 24:
-	/* order is important */
-	ramdacReg->DacRegs[TIDAC_latch_ctrl] = 0x06;
-	ramdacReg->DacRegs[TIDAC_true_color_ctrl] = 0x56;
-	ramdacReg->DacRegs[TIDAC_multiplex_ctrl] = 0x58;
-	ramdacReg->DacRegs[TIDAC_clock_select] = 0x25;
-	ramdacReg->DacRegs[TIDAC_palette_page] = 0x00;
-	ramdacReg->DacRegs[TIDAC_general_ctrl] = 0x00;
-	ramdacReg->DacRegs[TIDAC_misc_ctrl] = 0x2C;
-	/* 0x2A & 0x2B are reserved */
-	ramdacReg->DacRegs[TIDAC_key_over_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_over_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_red_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_red_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_green_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_green_high] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_blue_low] = 0xFF;
-	ramdacReg->DacRegs[TIDAC_key_blue_high] = 0x00;
-	ramdacReg->DacRegs[TIDAC_key_ctrl] = 0x10;
-	ramdacReg->DacRegs[TIDAC_sense_test] = 0x00;
-	ramdacReg->DacRegs[TIDAC_ind_curs_ctrl] = 0x00;
-	break;
     case 16:
 	/* order is important */
 #if 0
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 4ba1f78..3f21ed2 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -1,11 +1,7 @@
 LSB_FIRST = l-xaaBitmap.c l-xaaStipple.c l-xaaTEGlyph.c
-LSB_3_FIRST = l3-xaaBitmap.c l3-xaaStipple.c
 MSB_FIRST = m-xaaBitmap.c m-xaaStipple.c m-xaaTEGlyph.c
-MSB_3_FIRST = m3-xaaBitmap.c m3-xaaStipple.c
 LSB_FIXED = lf-xaaBitmap.c lf-xaaStipple.c lf-xaaTEGlyph.c
-LSB_3_FIXED = lf3-xaaBitmap.c lf3-xaaStipple.c
 MSB_FIXED = mf-xaaBitmap.c mf-xaaStipple.c mf-xaaTEGlyph.c
-MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
 POLYSEG = s-xaaLine.c s-xaaDashLine.c
 
 libxaa_la_LDFLAGS = -avoid-version
@@ -22,47 +18,28 @@ libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
                    xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
                    xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
                    xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
-                   $(LSB_FIRST) $(MSB_FIRST) $(LSB_FIXED) $(MSB_FIXED) \
-                   $(LSB_3_FIRST) $(MSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIXED)
+                   $(LSB_FIRST) $(MSB_FIRST) $(LSB_FIXED) $(MSB_FIXED)
+
 ${POLYSEG}:
 	echo "#define POLYSEGMENT" > $@
 	echo '#include "$(srcdir)/${@:s-%=%}"' >> $@
 ${LSB_FIRST}:
 	echo "#define LSBFIRST" > $@
 	echo '#include "$(srcdir)/${@:l-%=%}"' >> $@
-${LSB_3_FIRST}:
-	echo "#define LSBFIRST" > $@
-	echo "#define TRIPLE_BITS" >> $@
-	echo '#include "$(srcdir)/${@:l3-%=%}"' >> $@
 ${LSB_FIXED}:
 	echo "#define LSBFIRST" > $@
 	echo "#define FIXEDBASE" >> $@
 	echo '#include "$(srcdir)/${@:lf-%=%}"' >> $@
-${LSB_3_FIXED}:
-	echo "#define LSBFIRST" > $@
-	echo "#define TRIPLE_BITS" >> $@
-	echo "#define FIXEDBASE" >> $@
-	echo '#include "$(srcdir)/${@:lf3-%=%}"' >> $@
 ${MSB_FIRST}:
 	echo "#define MSBFIRST" > $@
 	echo '#include "$(srcdir)/${@:m-%=%}"' >> $@
-${MSB_3_FIRST}:
-	echo "#define MSBFIRST" > $@
-	echo "#define TRIPLE_BITS" >> $@
-	echo '#include "$(srcdir)/${@:m3-%=%}"' >> $@
 ${MSB_FIXED}:
 	echo "#define MSBFIRST" > $@
 	echo "#define FIXEDBASE" >> $@
 	echo '#include "$(srcdir)/${@:mf-%=%}"' >> $@
-${MSB_3_FIXED}:
-	echo "#define MSBFIRST" > $@
-	echo "#define TRIPLE_BITS" >> $@
-	echo "#define FIXEDBASE" >> $@
-	echo '#include "$(srcdir)/${@:mf3-%=%}"' >> $@
 
 DISTCLEANFILES = $(POLYSEG) \
-	$(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
-	$(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
+	$(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED)
 
 sdk_HEADERS = xaa.h xaalocal.h xaarop.h
 EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 2af954f..931e4b5 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -122,7 +122,8 @@
 #define NO_GXCOPY			0x00000002
 #define NO_PLANEMASK			0x00000004
 #define RGB_EQUAL			0x00000008
-#define TRIPLE_BITS_24BPP		0x00000010
+/* not supported anymore */
+#define TRIPLE_BITS_24BPP		0x00000000
 #define ROP_NEEDS_SOURCE		0x00000020
 
 /* transparency restrictions */
diff --git a/hw/xfree86/xaa/xaaBitmap.c b/hw/xfree86/xaa/xaaBitmap.c
index f7ae78d..186b35c 100644
--- a/hw/xfree86/xaa/xaaBitmap.c
+++ b/hw/xfree86/xaa/xaaBitmap.c
@@ -30,108 +30,6 @@
 
 typedef CARD32 *(* BitmapScanlineProcPtr)(CARD32 *, CARD32 *, int, int);
 
-#ifdef TRIPLE_BITS
-static CARD32*
-BitmapScanline(
-   CARD32 *src, CARD32 *base,
-   int count, int skipleft )
-{
-     CARD32 bits;
-
-     while(count >= 3) {
-	bits = *src;
-	WRITE_BITS3(bits);
-	src++;
-	count -= 3;
-     }
-     if (count == 2) {
-	bits = *src;
-	WRITE_BITS2(bits);
-     } else if (count == 1) {
-	bits = *src;
-	WRITE_BITS1(bits);
-     }
-     
-     return base;
-}
-
-static CARD32*
-BitmapScanline_Inverted(
-   CARD32 *src, CARD32 *base,
-   int count, int skipleft )
-{
-     CARD32 bits;
-
-     while(count >= 3) {
-	bits = ~(*src);
-	WRITE_BITS3(bits);
-	src++;
-	count -= 3;
-     }
-     if (count == 2) {
-	bits = ~(*src);
-	WRITE_BITS2(bits);
-     } else if (count == 1) {
-	bits = ~(*src);
-	WRITE_BITS1(bits);
-     }
-     
-     return base;
-}
-
-
-static CARD32*
-BitmapScanline_Shifted(
-   CARD32 *src, CARD32 *base,
-   int count, int skipleft )
-{
-     CARD32 bits;
-
-     while(count >= 3) {
-	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
-	WRITE_BITS3(bits);
-	src++;
-	count -= 3;
-     }
-     if (count == 2) {
-	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
-	WRITE_BITS2(bits);
-     } else if (count == 1) {
-	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
-	WRITE_BITS1(bits);
-     }
-     
-     return base;
-}
-
-static CARD32*
-BitmapScanline_Shifted_Inverted(
-   CARD32 *src, CARD32 *base,
-   int count, int skipleft )
-{
-     CARD32 bits;
-
-     while(count >= 3) {
-	bits = ~(SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft)));
-	WRITE_BITS3(bits);
-	src++;
-	count -= 3;
-     }
-     if (count == 2) {
-	bits = ~(SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft)));
-	WRITE_BITS2(bits);
-     } else if (count == 1) {
-	bits = ~(SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft)));
-	WRITE_BITS1(bits);
-     }
-     
-     return base;
-}
-
-#define BitmapScanline_Shifted_Careful BitmapScanline_Shifted
-#define BitmapScanline_Shifted_Inverted_Careful BitmapScanline_Shifted_Inverted
-
-#else
 static CARD32*
 BitmapScanline(
    CARD32 *src, CARD32 *dest,
@@ -246,7 +144,6 @@ BitmapScanline_Shifted_Inverted_Careful(
      return base;
 }
 
-#endif
 
 /*  
     When the accelerator is TRANSPARENCY_ONLY, WriteBitmap can do
@@ -256,11 +153,7 @@ BitmapScanline_Shifted_Inverted_Careful(
 */ 
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAWriteBitmapColorExpand3)(
-#else
 EXPNAME(XAAWriteBitmapColorExpand)(
-#endif
     ScrnInfoPtr pScrn,
     int x, int y, int w, int H,
     unsigned char *src,
@@ -281,15 +174,8 @@ EXPNAME(XAAWriteBitmapColorExpand)(
     int flag;
     int h = H;
 
-#ifdef TRIPLE_BITS
-    if((bg != -1) && 
-	((infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) ||
-	((infoRec->CPUToScreenColorExpandFillFlags & RGB_EQUAL) && 
-	(!CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg != -1) && 
 	(infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)) {
-#endif
 	if((rop == GXcopy) && infoRec->SetupForSolidFill) {
     	    (*infoRec->SetupForSolidFill)(pScrn, bg, rop, planemask);
             (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, w, h);
@@ -297,14 +183,10 @@ EXPNAME(XAAWriteBitmapColorExpand)(
 	bg = -1;
     }
 
-#ifdef TRIPLE_BITS
-    if(skipleft) {
-#else
     if(skipleft && 
 	(!(infoRec->CPUToScreenColorExpandFillFlags & LEFT_EDGE_CLIPPING) || 
 	(!(infoRec->CPUToScreenColorExpandFillFlags & LEFT_EDGE_CLIPPING_NEGATIVE_X) && 
 		(skipleft > x)))) {
-#endif
 	if((skipleft + ((w + 31) & ~31)) > ((skipleft + w + 31) & ~31)) {
 	    /* don't read past the end */
 	    firstFunc = BitmapScanline_Shifted_Careful;
@@ -322,11 +204,7 @@ EXPNAME(XAAWriteBitmapColorExpand)(
 	x -= skipleft;
     }
 
-#ifdef TRIPLE_BITS
-    dwords = (3 * w + 31) >> 5;
-#else
     dwords = (w + 31) >> 5;
-#endif
 
 SECOND_PASS:
 
@@ -374,11 +252,7 @@ SECOND_PASS:
 #ifndef FIXEDBASE
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAWriteBitmapScanlineColorExpand3)(
-#else
 EXPNAME(XAAWriteBitmapScanlineColorExpand)(
-#endif
     ScrnInfoPtr pScrn,
     int x, int y, int w, int h,
     unsigned char *src,
@@ -397,15 +271,8 @@ EXPNAME(XAAWriteBitmapScanlineColorExpand)(
     BitmapScanlineProcPtr firstFunc;
     BitmapScanlineProcPtr secondFunc;
 
-#ifdef TRIPLE_BITS
-    if((bg != -1) &&
-	((infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) 
-	|| ((infoRec->ScanlineCPUToScreenColorExpandFillFlags & RGB_EQUAL) && 
-	(!CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg != -1) && 
 	(infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)){
-#endif
 	if((rop == GXcopy) && infoRec->SetupForSolidFill) {
     	    (*infoRec->SetupForSolidFill)(pScrn, bg, rop, planemask);
             (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, w, h);
@@ -413,15 +280,11 @@ EXPNAME(XAAWriteBitmapScanlineColorExpand)(
 	bg = -1;
     }
 
-#ifdef TRIPLE_BITS
-    if(skipleft) {
-#else
     if(skipleft && 
 	(!(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
 		LEFT_EDGE_CLIPPING) || 
 	(!(infoRec->ScanlineCPUToScreenColorExpandFillFlags &
 		 LEFT_EDGE_CLIPPING_NEGATIVE_X) && (skipleft > x)))) {
-#endif
 	if((skipleft + ((w + 31) & ~31)) > ((skipleft + w + 31) & ~31)) {
 	    /* don't read past the end */
 	    firstFunc = BitmapScanline_Shifted_Careful;
@@ -439,11 +302,7 @@ EXPNAME(XAAWriteBitmapScanlineColorExpand)(
 	x -= skipleft;
     }
 
-#ifdef TRIPLE_BITS
-    dwords = (3 * w + 31) >> 5;
-#else
     dwords = (w + 31) >> 5;
-#endif
 
 SECOND_PASS:
 
diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c
index bcf81ee..b5801e0 100644
--- a/hw/xfree86/xaa/xaaCpyArea.c
+++ b/hw/xfree86/xaa/xaaCpyArea.c
@@ -44,10 +44,7 @@ XAACopyArea(
 		XAADoBitBlt, 0L));
 	} else {
 	    if(infoRec->WritePixmap &&
-	     ((pDstDrawable->bitsPerPixel == pSrcDrawable->bitsPerPixel) ||
-		((pDstDrawable->bitsPerPixel == 24) &&  
-		(pSrcDrawable->bitsPerPixel == 32) &&
-		(infoRec->WritePixmapFlags & CONVERT_32BPP_TO_24BPP))) &&
+	     (pDstDrawable->bitsPerPixel == pSrcDrawable->bitsPerPixel) &&
 	     CHECK_ROP(pGC,infoRec->WritePixmapFlags) &&
 	     CHECK_ROPSRC(pGC,infoRec->WritePixmapFlags) &&
 	     CHECK_PLANEMASK(pGC,infoRec->WritePixmapFlags) &&
diff --git a/hw/xfree86/xaa/xaaImage.c b/hw/xfree86/xaa/xaaImage.c
index e88f45c..372ba1f 100644
--- a/hw/xfree86/xaa/xaaImage.c
+++ b/hw/xfree86/xaa/xaaImage.c
@@ -81,97 +81,6 @@ void XAAMoveDWORDS_FixedSrc(
      *(dest + 2) = *src;
 }
 
-static void
-XAAWritePixmap32To24(
-   ScrnInfoPtr pScrn,
-   int x, int y, int w, int h,
-   unsigned char *srcInit,	
-   int srcwidth,	/* bytes */
-   int rop,
-   unsigned int planemask,
-   int trans
-){
-    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
-    int count, dwords = bytes_to_int32(w * 3);
-    CARD32 *src, *dst;
-    Bool PlusOne = FALSE;
-
-    if((infoRec->ImageWriteFlags & CPU_TRANSFER_PAD_QWORD) && 
-					((dwords * h) & 0x01)) {
-	PlusOne = TRUE;
-    }
-
-    (*infoRec->SetupForImageWrite)(pScrn, rop, planemask, trans, 24, 24);
-    (*infoRec->SubsequentImageWriteRect)(pScrn, x, y, w, h, 0);
-  
-    if(dwords > infoRec->ImageWriteRange) {
-	dst = (CARD32*)infoRec->ImageWriteBase;
-	while(h--) {
-	    src = (CARD32*)srcInit;
-  	    count = w;
-
-	    while(count >= 4) {
-		*dst = (src[0] & 0x00ffffff) | (src[1] << 24);
-		*dst = ((src[1] >> 8) & 0x0000ffff) | (src[2] << 16);
-		*dst = ((src[2] >> 16) & 0x000000ff) | (src[3] << 8);
-		src += 4;
-		count -= 4;
-	    }
-	    switch(count) {
-	    case 0:	break;
-	    case 1:	*dst = src[0];
-			break;
-	    case 2:	*dst = (src[0] & 0x00ffffff) | (src[1] << 24);
-			*dst = src[1] >> 8;
-			break;
-	    default:	*dst = (src[0] & 0x00ffffff) | (src[1] << 24);
-			*dst = ((src[1] >> 8) & 0x0000ffff) | (src[2] << 16);
-			*dst = src[2] >> 16;
-			break;
-	    }
-	    srcInit += srcwidth;
-	}
-    } else {
-	while(h--) {
-	    dst = (CARD32*)infoRec->ImageWriteBase;
-	    src = (CARD32*)srcInit;
-  	    count = w;
-
-	    while(count >= 4) {
-		dst[0] = (src[0] & 0x00ffffff) | (src[1] << 24);
-		dst[1] = ((src[1] >> 8) & 0x0000ffff) | (src[2] << 16);
-		dst[2] = ((src[2] >> 16) & 0x000000ff) | (src[3] << 8);
-		dst += 3;
-		src += 4;
-		count -= 4;
-	    }
-	    switch(count) {
-	    case 0:	break;
-	    case 1:	dst[0] = src[0];
-			break;
-	    case 2:	dst[0] = (src[0] & 0x00ffffff) | (src[1] << 24);
-			dst[1] = src[1] >> 8;
-			break;
-	    default:	dst[0] = (src[0] & 0x00ffffff) | (src[1] << 24);
-			dst[1] = ((src[1] >> 8) & 0x0000ffff) | (src[2] << 16);
-			dst[2] = src[2] >> 16;
-			break;
-	    }
-	    srcInit += srcwidth;
-	}
-    }
-
-    if(PlusOne) {
-	CARD32* base = (CARD32*)infoRec->ImageWriteBase;
-	*base = 0x00000000;
-    }
-
-    if(infoRec->ImageWriteFlags & SYNC_AFTER_IMAGE_WRITE)
-	(*infoRec->Sync)(pScrn);
-    else SET_SYNC_FLAG(infoRec);
-
-}
-
 void
 XAAWritePixmap (
    ScrnInfoPtr pScrn,
@@ -187,12 +96,6 @@ XAAWritePixmap (
     int dwords, skipleft, Bpp; 
     Bool beCareful, PlusOne;
 
-    if((bpp == 32) && (pScrn->bitsPerPixel == 24)) {
-	XAAWritePixmap32To24(pScrn, x, y, w, h, src, srcwidth, 
-						rop, planemask, trans);	
-	return;
-    }
-
     infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
     beCareful = PlusOne = FALSE;
     Bpp = bpp >> 3;
@@ -412,9 +315,7 @@ XAAPutImage(
     depthBug = XAA_DEPTH_BUG(pGC);
 
     if(((format == ZPixmap) && infoRec->WritePixmap &&
-	     ((pDraw->bitsPerPixel == bpp) ||
-		((pDraw->bitsPerPixel == 24) &&  (bpp == 32) &&
-		(infoRec->WritePixmapFlags & CONVERT_32BPP_TO_24BPP))) &&
+	     (pDraw->bitsPerPixel == bpp) &&
 	     CHECK_ROP(pGC,infoRec->WritePixmapFlags) &&
 	     CHECK_ROPSRC(pGC,infoRec->WritePixmapFlags) &&
 	     CHECK_PLANEMASK(pGC,infoRec->WritePixmapFlags) &&
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 11443a6..22e9410 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -358,7 +358,6 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
         int gran = 0;
 
 	switch(pScrn->bitsPerPixel) {
-        case 24: 
         case 8:  gran = 4;  break;
         case 16: gran = 2;  break;
         case 32: gran = 1;  break;
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 2f40c81..d2f0867 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -282,7 +282,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
 	   switch(pScrn->bitsPerPixel) {
 	   case 32: min_pitch = 2; break;
-	   case 24: min_pitch = 3; break;
 	   case 16: min_pitch = 4; break;
 	   default: min_pitch = 8; break;
 	   }
@@ -666,66 +665,34 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     if(infoRec->FillColorExpandRects) {
 	XAAMSG("\tDriver provided FillColorExpandRects replacement\n");
     } else if(HaveColorExpansion) {
-	if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
-	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRects3MSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRects3MSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRects3LSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRects3LSBFirst;
-	    }
-	} else {
+	if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST) {
 	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRectsMSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandRects = 
-				XAAFillColorExpandRectsMSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRectsLSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandRects = 
-			XAAFillColorExpandRectsLSBFirst;
-	    }
-	}
-	infoRec->FillColorExpandRectsFlags = 
-	    infoRec->CPUToScreenColorExpandFillFlags;
-    } else if(HaveScanlineColorExpansion) {
-	if (infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					TRIPLE_BITS_24BPP) {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->FillColorExpandRects = 
-		    XAAFillScanlineColorExpandRects3MSBFirst;
+		    XAAFillColorExpandRectsMSBFirstFixedBase;
 	    else
 		infoRec->FillColorExpandRects = 
-		    XAAFillScanlineColorExpandRects3LSBFirst;
+			    XAAFillColorExpandRectsMSBFirst;
 	} else {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+	    if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->FillColorExpandRects = 
-		    XAAFillScanlineColorExpandRectsMSBFirst;
+		    XAAFillColorExpandRectsLSBFirstFixedBase;
 	    else
 		infoRec->FillColorExpandRects = 
-		    XAAFillScanlineColorExpandRectsLSBFirst;
+		    XAAFillColorExpandRectsLSBFirst;
 	}
+	infoRec->FillColorExpandRectsFlags = 
+	    infoRec->CPUToScreenColorExpandFillFlags;
+    } else if(HaveScanlineColorExpansion) {
+	if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST)
+	    infoRec->FillColorExpandRects = 
+		XAAFillScanlineColorExpandRectsMSBFirst;
+	else
+	    infoRec->FillColorExpandRects = 
+		XAAFillScanlineColorExpandRectsLSBFirst;
 	infoRec->FillColorExpandRectsFlags =
 	    infoRec->ScanlineCPUToScreenColorExpandFillFlags;
     }
@@ -735,66 +702,34 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
     if(infoRec->FillColorExpandSpans) {
 	XAAMSG("\tDriver provided FillColorExpandSpans replacement\n");
     } else if(HaveColorExpansion) {
-	if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
-	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpans3MSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpans3MSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpans3LSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpans3LSBFirst;
-	    }
-	} else {
+	if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST) {
 	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpansMSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandSpans = 
-				XAAFillColorExpandSpansMSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpansLSBFirstFixedBase;
-		else
-		    infoRec->FillColorExpandSpans = 
-			XAAFillColorExpandSpansLSBFirst;
-	    }
-	}
-	infoRec->FillColorExpandSpansFlags = 
-	    infoRec->CPUToScreenColorExpandFillFlags;
-    } else if(HaveScanlineColorExpansion) {
-	if (infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					TRIPLE_BITS_24BPP) {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->FillColorExpandSpans = 
-		    XAAFillScanlineColorExpandSpans3MSBFirst;
+		    XAAFillColorExpandSpansMSBFirstFixedBase;
 	    else
 		infoRec->FillColorExpandSpans = 
-		    XAAFillScanlineColorExpandSpans3LSBFirst;
+			    XAAFillColorExpandSpansMSBFirst;
 	} else {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+	    if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->FillColorExpandSpans = 
-		    XAAFillScanlineColorExpandSpansMSBFirst;
+		    XAAFillColorExpandSpansLSBFirstFixedBase;
 	    else
 		infoRec->FillColorExpandSpans = 
-		    XAAFillScanlineColorExpandSpansLSBFirst;
+		    XAAFillColorExpandSpansLSBFirst;
 	}
+	infoRec->FillColorExpandSpansFlags = 
+	    infoRec->CPUToScreenColorExpandFillFlags;
+    } else if(HaveScanlineColorExpansion) {
+	if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST)
+	    infoRec->FillColorExpandSpans = 
+		XAAFillScanlineColorExpandSpansMSBFirst;
+	else
+	    infoRec->FillColorExpandSpans = 
+		XAAFillScanlineColorExpandSpansLSBFirst;
 	infoRec->FillColorExpandSpansFlags =
 	    infoRec->ScanlineCPUToScreenColorExpandFillFlags;
     }
@@ -816,61 +751,31 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
       !xf86ReturnOptValBool(options, XAAOPT_WRITE_BITMAP, FALSE)) {
 	XAAMSG("\tDriver provided WriteBitmap replacement\n");
     } else if(HaveColorExpansion) {
-	if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
-	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->WriteBitmap = 
-			XAAWriteBitmapColorExpand3MSBFirstFixedBase;
-		else
-		    infoRec->WriteBitmap = XAAWriteBitmapColorExpand3MSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->WriteBitmap = 
-			XAAWriteBitmapColorExpand3LSBFirstFixedBase;
-		else
-		    infoRec->WriteBitmap = XAAWriteBitmapColorExpand3LSBFirst;
-	    }
-	} else {
+	if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST) {
 	    if(infoRec->CPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->WriteBitmap = 
-			XAAWriteBitmapColorExpandMSBFirstFixedBase;
-		else
-		    infoRec->WriteBitmap = XAAWriteBitmapColorExpandMSBFirst;
-	    } else {
-		if(infoRec->CPUToScreenColorExpandFillFlags & 
-					CPU_TRANSFER_BASE_FIXED)
-		    infoRec->WriteBitmap = 
-			XAAWriteBitmapColorExpandLSBFirstFixedBase;
-		else
-		    infoRec->WriteBitmap = XAAWriteBitmapColorExpandLSBFirst;
-	    }
-	}
-	infoRec->WriteBitmapFlags = infoRec->CPUToScreenColorExpandFillFlags;
-    } else if(HaveScanlineColorExpansion) {
-	if (infoRec->ScanlineCPUToScreenColorExpandFillFlags &
-					TRIPLE_BITS_24BPP) {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->WriteBitmap = 
-		    XAAWriteBitmapScanlineColorExpand3MSBFirst;
+		    XAAWriteBitmapColorExpandMSBFirstFixedBase;
 	    else
-		infoRec->WriteBitmap = 
-		    XAAWriteBitmapScanlineColorExpand3LSBFirst;
+		infoRec->WriteBitmap = XAAWriteBitmapColorExpandMSBFirst;
 	} else {
-	    if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
-					BIT_ORDER_IN_BYTE_MSBFIRST)
+	    if(infoRec->CPUToScreenColorExpandFillFlags & 
+				    CPU_TRANSFER_BASE_FIXED)
 		infoRec->WriteBitmap = 
-		    XAAWriteBitmapScanlineColorExpandMSBFirst;
+		    XAAWriteBitmapColorExpandLSBFirstFixedBase;
 	    else
-		infoRec->WriteBitmap = 
-		    XAAWriteBitmapScanlineColorExpandLSBFirst;
+		infoRec->WriteBitmap = XAAWriteBitmapColorExpandLSBFirst;
 	}
+	infoRec->WriteBitmapFlags = infoRec->CPUToScreenColorExpandFillFlags;
+    } else if(HaveScanlineColorExpansion) {
+	if(infoRec->ScanlineCPUToScreenColorExpandFillFlags & 
+				    BIT_ORDER_IN_BYTE_MSBFIRST)
+	    infoRec->WriteBitmap = 
+		XAAWriteBitmapScanlineColorExpandMSBFirst;
+	else
+	    infoRec->WriteBitmap = 
+		XAAWriteBitmapScanlineColorExpandLSBFirst;
 	infoRec->WriteBitmapFlags =
 		infoRec->ScanlineCPUToScreenColorExpandFillFlags;
     } else
@@ -884,41 +789,18 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 	infoRec->TEGlyphRendererFlags =
 	    infoRec->CPUToScreenColorExpandFillFlags;
 
-	if (infoRec->TEGlyphRendererFlags & TRIPLE_BITS_24BPP) {
-	    if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
-		    infoRec->TEGlyphRenderer =
-			XAATEGlyphRenderer3MSBFirstFixedBase;
-		else
-		    infoRec->TEGlyphRenderer = XAATEGlyphRenderer3MSBFirst;
-	    } else {
-		if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
-		    infoRec->TEGlyphRenderer =
-			XAATEGlyphRenderer3LSBFirstFixedBase;
-		else
-		    infoRec->TEGlyphRenderer = XAATEGlyphRenderer3LSBFirst;
-	    }
-
-	    if (!HaveSolidFillRect &&
-		(infoRec->TEGlyphRendererFlags & RGB_EQUAL)) {
-		infoRec->TEGlyphRendererFlags &= ~RGB_EQUAL;
-		XAAMSG("WARNING:  TEGlyphRenderer cannot support RGB_EQUAL"
-		       " without solid fills\n");
-	    }
+	if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST) {
+	    if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
+		infoRec->TEGlyphRenderer =
+		    XAATEGlyphRendererMSBFirstFixedBase;
+	    else
+		infoRec->TEGlyphRenderer = XAATEGlyphRendererMSBFirst;
 	} else {
-	    if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST) {
-		if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
-		    infoRec->TEGlyphRenderer =
-			XAATEGlyphRendererMSBFirstFixedBase;
-		else
-		    infoRec->TEGlyphRenderer = XAATEGlyphRendererMSBFirst;
-	    } else {
-		if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
-		    infoRec->TEGlyphRenderer =
-			XAATEGlyphRendererLSBFirstFixedBase;
-		else
-		    infoRec->TEGlyphRenderer = XAATEGlyphRendererLSBFirst;
-	    }
+	    if (infoRec->TEGlyphRendererFlags & CPU_TRANSFER_BASE_FIXED)
+		infoRec->TEGlyphRenderer =
+		    XAATEGlyphRendererLSBFirstFixedBase;
+	    else
+		infoRec->TEGlyphRenderer = XAATEGlyphRendererLSBFirst;
 	}
 
 	if (!HaveSolidFillRect &&
@@ -932,24 +814,10 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 	infoRec->TEGlyphRendererFlags =
 	    infoRec->ScanlineCPUToScreenColorExpandFillFlags;
 
-	if (infoRec->TEGlyphRendererFlags & TRIPLE_BITS_24BPP) {
-	    if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST)
-		infoRec->TEGlyphRenderer = XAATEGlyphRendererScanline3MSBFirst;
-	    else
-		infoRec->TEGlyphRenderer = XAATEGlyphRendererScanline3LSBFirst;
-
-	    if (!HaveSolidFillRect &&
-		(infoRec->TEGlyphRendererFlags & RGB_EQUAL)) {
-		infoRec->TEGlyphRendererFlags &= ~RGB_EQUAL;
-		XAAMSG("WARNING:  TEGlyphRenderer cannot support RGB_EQUAL"
-		       " without solid fills\n");
-	    }
-	} else {
-	    if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST)
-		infoRec->TEGlyphRenderer = XAATEGlyphRendererScanlineMSBFirst;
-	    else
-		infoRec->TEGlyphRenderer = XAATEGlyphRendererScanlineLSBFirst;
-	}
+	if (infoRec->TEGlyphRendererFlags & BIT_ORDER_IN_BYTE_MSBFIRST)
+	    infoRec->TEGlyphRenderer = XAATEGlyphRendererScanlineMSBFirst;
+	else
+	    infoRec->TEGlyphRenderer = XAATEGlyphRendererScanlineLSBFirst;
 
 	if (!HaveSolidFillRect &&
 	    (infoRec->TEGlyphRendererFlags & TRANSPARENCY_ONLY)) {
@@ -976,8 +844,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 	XAAMSG("\tDriver provided WritePixmap replacement\n");
     } else if(HaveImageWriteRect) {
 	infoRec->WritePixmap = XAAWritePixmap;
-	infoRec->WritePixmapFlags = 
-		infoRec->ImageWriteFlags | CONVERT_32BPP_TO_24BPP;
     } else if(HaveScanlineImageWriteRect) {
 	infoRec->WritePixmap = XAAWritePixmapScanline;
 	infoRec->WritePixmapFlags = infoRec->ScanlineImageWriteFlags;
@@ -1465,7 +1331,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
 
     if(infoRec->CachePixelGranularity < 0) {
 	switch(pScrn->bitsPerPixel) {
-	case 24:
 	case 8:  infoRec->CachePixelGranularity = 4;  break;
 	case 16: infoRec->CachePixelGranularity = 2;  break;
 	case 32: infoRec->CachePixelGranularity = 1;  break;
diff --git a/hw/xfree86/xaa/xaaNonTEGlyph.c b/hw/xfree86/xaa/xaaNonTEGlyph.c
index 7431ba2..b049d9e 100644
--- a/hw/xfree86/xaa/xaaNonTEGlyph.c
+++ b/hw/xfree86/xaa/xaaNonTEGlyph.c
@@ -12,11 +12,7 @@
 /* Not used anymore because the algorithm isn't correct. It doesn't
    handle overlapping characters properly */
 
-#ifdef TRIPLE_BITS
-#define NonTEGlyphFunc EXPNAME(XAANonTEGlyphScanlineFunc3)
-#else
 #define NonTEGlyphFunc EXPNAME(XAANonTEGlyphScanlineFunc)
-#endif
 
 /********************************************************************
 
@@ -31,18 +27,11 @@
 	do not always coincide, it is possible that wBack or wText
 	may be 0!  The NonTEGlyphRender must always check for this. */
 
-/* This gets built for MSBFIRST or LSBFIRST with FIXEDBASE or not,
-	with TRIPLE_BITS or not. A total of 8 versions */
-
 /* if the backing rectangle and text are of the same dimensions
 	then we can draw in one pass */
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAANonTEGlyphRenderer3)(
-#else
 EXPNAME(XAANonTEGlyphRenderer)(
-#endif
     ScrnInfoPtr pScrn,
     int xText, int wText, 
     int y, int h, int skipleft, int startline, 
@@ -52,11 +41,7 @@ EXPNAME(XAANonTEGlyphRenderer)(
 {
     XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
     CARD32* base = (CARD32*)infoRec->ColorExpandBase;
-#ifdef TRIPLE_BITS
-    int dwords = ((3 * wText + 31) >> 5) * h;
-#else
     int dwords = ((wText + 31) >> 5) * h;
-#endif
 
     (*infoRec->SetupForCPUToScreenColorExpandFill)(
 					pScrn, fg, -1, rop, planemask);
@@ -64,11 +49,7 @@ EXPNAME(XAANonTEGlyphRenderer)(
 					pScrn, xText, y, wText, h, 0);
 
 #ifndef FIXEDBASE
-#ifdef TRIPLE_BITS
-    if((((3 * wText + 31) >> 5) * h) <= infoRec->ColorExpandRange)
-#else
     if((((wText + 31) >> 5) * h) <= infoRec->ColorExpandRange)
-#endif
 	while(h--) 
 	    base = NonTEGlyphFunc(base, glyphp, startline++, wText, skipleft);
     else
@@ -91,11 +72,7 @@ EXPNAME(XAANonTEGlyphRenderer)(
 /*  Scanline version of above gets built for LSBFIRST and MSBFIRST */
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAANonTEGlyphRendererScanline3)(
-#else
 EXPNAME(XAANonTEGlyphRendererScanline)(
-#endif
     ScrnInfoPtr pScrn,
     int xText, int wText, 
     int y, int h, int skipleft, int startline, 
@@ -156,11 +133,7 @@ NonTEGlyphFunc(
 		bits |= SHIFT_L(glyphp->bitsp[line],shift);
 	    shift += glyphp->width;	
 	}
-#ifdef TRIPLE_BITS
-	WRITE_BITS3(bits);
-#else
 	WRITE_BITS(bits);
-#endif
 	shift &= 31;
 	if(shift && 
 	 (line >= glyphp->firstline) && (line <= glyphp->lastline)) 
@@ -178,17 +151,7 @@ NonTEGlyphFunc(
 	     shift += glyphp->width;
 	     TotalWidth -= glyphp->width;
 	}
-#ifdef TRIPLE_BITS
-	if (shift >= 22) {
-	    WRITE_BITS3(bits);
-	} else if (shift >= 11) {
-	    WRITE_BITS2(bits);
-	} else {
-	    WRITE_BITS1(bits);
-	}
-#else
 	WRITE_BITS(bits);
-#endif
     }
 
   
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index 86ac1cd..da4da27 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -1025,8 +1025,6 @@ XAAInitPixmapCache(
     infoRec->MaxCacheableStippleHeight = infoRec->MaxCacheableTileHeight;
     infoRec->MaxCacheableStippleWidth = 
 		infoRec->MaxCacheableTileWidth * pScrn->bitsPerPixel;
-    if(infoRec->ScreenToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) 
-	infoRec->MaxCacheableStippleWidth /= 3;
 
     if(NumMono)  {
         if(!(infoRec->Mono8x8PatternFillFlags & 
@@ -1320,24 +1318,6 @@ XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono)
 		}
 		srcp += pitch;
 	    }
-	} else if(pPixmap->drawable.bitsPerPixel == 24) {
-	    CARD32 val;
-	    unsigned char *srcp = pPixmap->devPrivate.ptr;
-	    fg = *((CARD32*)srcp) & 0x00FFFFFF;
-	    pitch = pPixmap->devKind;
-	    j *= 3;
-	    for(y = 0; y < i; y++) {
-		bits[y] = 0;
-		for(x = 0; x < j; x+=3) {
-		   val = *((CARD32*)(srcp+x)) & 0x00FFFFFF;
-		   if(val != fg) {
-			if(bg == -1) bg = val;
-			else if(bg != val) 
-				return TRUE;
-		   } else bits[y] |= 1 << (x/3);
-		}
-		srcp += pitch;
-	    }
 	} else if(pPixmap->drawable.bitsPerPixel == 32) {
 	    IntPtr = (CARD32*)pPixmap->devPrivate.ptr;
 	    fg = IntPtr[0];
diff --git a/hw/xfree86/xaa/xaaStipple.c b/hw/xfree86/xaa/xaaStipple.c
index c1d6f8a..9fb4388 100644
--- a/hw/xfree86/xaa/xaaStipple.c
+++ b/hw/xfree86/xaa/xaaStipple.c
@@ -15,13 +15,8 @@ static CARD32* StippleUpTo32_Inverted(CARD32*, CARD32*, int, int, int);
 static CARD32* StippleOver32(CARD32*, CARD32*, int, int, int);
 static CARD32* StippleOver32_Inverted(CARD32*, CARD32*, int, int, int);
 
-#ifdef TRIPLE_BITS
-#define stipple_scanline_func EXPNAME(XAAStippleScanlineFunc3)
-#define stipple_get_scanline_func EXPNAME(XAAGetStippleScanlineFunc3)
-#else
 #define stipple_scanline_func EXPNAME(XAAStippleScanlineFunc)
 #define stipple_get_scanline_func EXPNAME(XAAGetStippleScanlineFunc)
-#endif
 
 StippleScanlineProcPtr stipple_scanline_func[6] = {
    StipplePowerOfTwo,
@@ -45,43 +40,7 @@ StippleScanlineProcPtr *stipple_get_scanline_func(void) {
 #endif
 
 
-/* TRIPLE_BITS pattern expansion */
-#ifdef TRIPLE_BITS
-#define EXPAND_PAT \
-	CARD32 pat1 = byte_expand3[pat & 0xFF], \
-	       pat2 = byte_expand3[(pat & 0xFF00) >> 8], \
-	       pat3 = byte_expand3[(pat & 0xFF0000) >> 16], \
-	       pat4 = byte_expand3[(pat & 0xFF000000) >> 24], \
-	       patA = pat1 | (pat2 << 24), \
-	       patB = (pat2 >> 8) | (pat3 << 16), \
-	       patC = (pat3 >> 16) | (pat4 << 8)
-#ifdef FIXED_BASE
-#define WRITE_PAT1 { \
-	*dest = patA; }
-#define WRITE_PAT2 { \
-	*dest = patA; \
-	*dest = patB; }
-#define WRITE_PAT3 { \
-	*dest = patA; \
-	*dest = patB; \
-	*dest = patC; }
-#else
-#define WRITE_PAT1 { \
-	*(dest++) = patA; }
-#define WRITE_PAT2 { \
-	*(dest) = patA; \
-	*(dest + 1) = patB; \
-	dest += 2; }
-#define WRITE_PAT3 { \
-	*(dest) = patA; \
-	*(dest + 1) = patB; \
-	*(dest + 2) = patC; \
-	dest += 3; }
-#endif
-#endif
-
-
-#if !defined(FIXEDBASE) && !defined(MSBFIRST) && !defined(TRIPLE_BITS)
+#if !defined(FIXEDBASE) && !defined(MSBFIRST) 
 
 unsigned int XAAShiftMasks[32] = {
   /* gcc is rather pedantic about SHIFT_R(0xFFFFFFFF,32) */
@@ -106,11 +65,7 @@ unsigned int XAAShiftMasks[32] = {
 #endif
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAFillColorExpandRects3)(
-#else
 EXPNAME(XAAFillColorExpandRects)(
-#endif
    ScrnInfoPtr pScrn,
    int fg, int bg, int rop,
    unsigned int planemask,
@@ -141,15 +96,8 @@ EXPNAME(XAAFillColorExpandRects)(
     SecondFunc = stipple_scanline_func[funcNo];
     FirstFunc = stipple_scanline_func[funcNo + 3];
 
-#ifdef TRIPLE_BITS
-    if((bg == -1) || 
-	(!(infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) &&
-	(!(infoRec->CPUToScreenColorExpandFillFlags & RGB_EQUAL) ||
-	(CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg == -1) || 
 	!(infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)) {
-#endif
 	/* one pass */
     } else if((rop == GXcopy) && infoRec->FillSolidRects) {
 	/* one pass but we fill background rects first */
@@ -165,11 +113,7 @@ EXPNAME(XAAFillColorExpandRects)(
 					pScrn, fg, bg, rop, planemask);
 
     while(nBox--) {
-#ifdef TRIPLE_BITS
-	dwords = (3 * (pBox->x2 - pBox->x1) + 31) >> 5;
-#else
 	dwords = (pBox->x2 - pBox->x1 + 31) >> 5;
-#endif
 
 SECOND_PASS:
 	if(TwoPass) {
@@ -242,11 +186,7 @@ SECOND_PASS:
 
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAFillColorExpandSpans3)(
-#else
 EXPNAME(XAAFillColorExpandSpans)(
-#endif
    ScrnInfoPtr pScrn,
    int fg, int bg, int rop,
    unsigned int planemask,
@@ -276,15 +216,8 @@ EXPNAME(XAAFillColorExpandSpans)(
     SecondFunc = stipple_scanline_func[funcNo];
     FirstFunc = stipple_scanline_func[funcNo + 3];
 
-#ifdef TRIPLE_BITS
-    if((bg == -1) || 
-	(!(infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) &&
-	(!(infoRec->CPUToScreenColorExpandFillFlags & RGB_EQUAL) ||
-	(CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg == -1) || 
 	!(infoRec->CPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)) {
-#endif
 	/* one pass */
     } else if((rop == GXcopy) && infoRec->FillSolidSpans) {
 	/* one pass but we fill background rects first */
@@ -301,11 +234,7 @@ EXPNAME(XAAFillColorExpandSpans)(
 				pScrn, fg, bg, rop, planemask);
 
     while(n--) {
-#ifdef TRIPLE_BITS
-	dwords = (3 * *pwidth + 31) >> 5;
-#else
 	dwords = (*pwidth + 31) >> 5;
-#endif
 
 	srcy = (ppt->y - yorg) % stippleheight;
 	if(srcy < 0) srcy += stippleheight;
@@ -353,11 +282,7 @@ SECOND_PASS:
 #ifndef FIXEDBASE
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAFillScanlineColorExpandRects3)(
-#else
 EXPNAME(XAAFillScanlineColorExpandRects)(
-#endif
    ScrnInfoPtr pScrn,
    int fg, int bg, int rop,
    unsigned int planemask,
@@ -387,15 +312,8 @@ EXPNAME(XAAFillScanlineColorExpandRects)(
     SecondFunc = stipple_scanline_func[funcNo];
     FirstFunc = stipple_scanline_func[funcNo + 3];
 
-#ifdef TRIPLE_BITS
-    if((bg == -1) || 
-      (!(infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) &&
-      (!(infoRec->ScanlineCPUToScreenColorExpandFillFlags & RGB_EQUAL) ||
-      (CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg == -1) || 
       !(infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)) {
-#endif
 	/* one pass */
     } else if((rop == GXcopy) && infoRec->FillSolidRects) {
 	/* one pass but we fill background rects first */
@@ -411,11 +329,7 @@ EXPNAME(XAAFillScanlineColorExpandRects)(
 				pScrn, fg, bg, rop, planemask);
 
     while(nBox--) {
-#ifdef TRIPLE_BITS
-	dwords = (3 * (pBox->x2 - pBox->x1) + 31) >> 5;
-#else
 	dwords = (pBox->x2 - pBox->x1 + 31) >> 5;
-#endif
 
 SECOND_PASS:
 	if(TwoPass) {
@@ -466,11 +380,7 @@ SECOND_PASS:
 }
 
 void
-#ifdef TRIPLE_BITS
-EXPNAME(XAAFillScanlineColorExpandSpans3)(
-#else
 EXPNAME(XAAFillScanlineColorExpandSpans)(
-#endif
    ScrnInfoPtr pScrn,
    int fg, int bg, int rop,
    unsigned int planemask,
@@ -500,15 +410,8 @@ EXPNAME(XAAFillScanlineColorExpandSpans)(
     SecondFunc = stipple_scanline_func[funcNo];
     FirstFunc = stipple_scanline_func[funcNo + 3];
 
-#ifdef TRIPLE_BITS
-    if((bg == -1) || 
-      (!(infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY) &&
-      (!(infoRec->ScanlineCPUToScreenColorExpandFillFlags & RGB_EQUAL) ||
-      (CHECK_RGB_EQUAL(bg))))) {
-#else
     if((bg == -1) || 
       !(infoRec->ScanlineCPUToScreenColorExpandFillFlags & TRANSPARENCY_ONLY)) {
-#endif
 	/* one pass */
     } else if((rop == GXcopy) && infoRec->FillSolidSpans) {
 	/* one pass but we fill background rects first */
@@ -526,11 +429,7 @@ EXPNAME(XAAFillScanlineColorExpandSpans)(
 
 
     while(n--) {
-#ifdef TRIPLE_BITS
-	dwords = (3 * *pwidth + 31) >> 5;
-#else
 	dwords = (*pwidth + 31) >> 5;
-#endif
 
 	srcy = (ppt->y - yorg) % stippleheight;
 	if(srcy < 0) srcy += stippleheight;
@@ -590,23 +489,6 @@ StipplePowerOfTwo(
     pat = SWAP_BITS_IN_BYTES(pat);    
 #endif
 
-#ifdef TRIPLE_BITS
-    {
-	EXPAND_PAT;
-
-	while(dwords >= 3) {
-	    WRITE_PAT3;
-	    dwords -= 3;
-	}
-	if (dwords == 2) {
-	    WRITE_PAT2;
-	} else if (dwords == 1) {
-	    WRITE_PAT1;
-	}
-
-	return dest;
-    }
-#else /* TRIPLE_BITS */
    while(dwords >= 4) {
 	DEST(0) = pat;
 	DEST(1) = pat;
@@ -625,7 +507,6 @@ StipplePowerOfTwo(
    if(dwords == 2) RETURN(2);
    DEST(2) = pat;
    RETURN(3);
-#endif /* TRIPLE_BITS */
 }
 
 static CARD32 *
@@ -651,23 +532,6 @@ StipplePowerOfTwo_Inverted(
 
    pat = ~pat;
 
-#ifdef TRIPLE_BITS
-    {
-	EXPAND_PAT;
-
-	while(dwords >= 3) {
-	    WRITE_PAT3;
-	    dwords -= 3;
-	}
-	if (dwords == 2) {
-	    WRITE_PAT2;
-	} else if (dwords == 1) {
-	    WRITE_PAT1;
-	}
-
-	return dest;
-    }
-#else /* TRIPLE_BITS */
    while(dwords >= 4) {
 	DEST(0) = pat;
 	DEST(1) = pat;
@@ -686,7 +550,6 @@ StipplePowerOfTwo_Inverted(
    if(dwords == 2) RETURN(2);
    DEST(2) = pat;
    RETURN(3);
-#endif /* TRIPLE_BITS */
 }
 
 
@@ -705,19 +568,7 @@ StippleUpTo32(
 
     while(dwords--) {
 	CARD32 bits = SHIFT_R(pat,shift) | SHIFT_L(pat,width-shift);
-#ifdef TRIPLE_BITS
-	if(dwords >= 2) {
-	    WRITE_BITS3(bits);
-	    dwords -= 2;
-	} else if(dwords > 0) {
-	    WRITE_BITS2(bits);
-	    dwords--;
-	} else {
-	    WRITE_BITS1(bits);
-	}
-#else
 	WRITE_BITS(bits);
-#endif
 
 	shift += 32;
 	shift %= width;
@@ -741,19 +592,7 @@ StippleUpTo32_Inverted(
 
     while(dwords--) {
 	CARD32 bits = ~(SHIFT_R(pat,shift) | SHIFT_L(pat,width-shift));
-#ifdef TRIPLE_BITS
-	if(dwords >= 2) {
-	    WRITE_BITS3(bits);
-	    dwords -= 2;
-	} else if(dwords > 0) {
-	    WRITE_BITS2(bits);
-	    dwords--;
-	} else {
-	    WRITE_BITS1(bits);
-	}
-#else
 	WRITE_BITS(bits);
-#endif
 
 	shift += 32;
 	shift %= width;
@@ -792,19 +631,7 @@ StippleOver32(
         else
             bits = *srcp;
 
-#ifdef TRIPLE_BITS
-	if(dwords >= 2) {
-	    WRITE_BITS3(bits);
-	    dwords -= 2;
-	} else if(dwords > 0) {
-	    WRITE_BITS2(bits);
-	    dwords--;
-	} else {
-	    WRITE_BITS1(bits);
-	}
-#else
 	WRITE_BITS(bits);
-#endif
 
 	offset += 32;
 	offset %= width;
@@ -845,19 +672,7 @@ StippleOver32_Inverted(
 
 	bits = ~bits;
 
-#ifdef TRIPLE_BITS
-	if(dwords >= 2) {
-	    WRITE_BITS3(bits);
-	    dwords -= 2;
-	} else if(dwords > 0) {
-	    WRITE_BITS2(bits);
-	    dwords--;
-	} else {
-	    WRITE_BITS1(bits);
-	}
-#else
 	WRITE_BITS(bits);
-#endif
 
 	offset += 32;
 	offset %= width;
diff --git a/hw/xfree86/xaa/xaaTEGlyph.c b/hw/xfree86/xaa/xaaTEGlyph.c
index 510c387..7be44a6 100644
--- a/hw/xfree86/xaa/xaaTEGlyph.c
+++ b/hw/xfree86/xaa/xaaTEGlyph.c
@@ -9,9 +9,6 @@
 #include "xaacexp.h"
 #include "xf86.h"
 
-/* scanline function for TRIPLE_BITS_24BPP */
-static CARD32 *DrawTextScanline3(CARD32 *base, CARD32 *mem, int width);
-
 /* Loop unrolled functions for common font widths */
 static CARD32 *DrawTETextScanlineGeneric(CARD32 *base, unsigned int **glyphp,
 					int line, int width, int glyphwidth);
@@ -231,112 +228,6 @@ THE_END:
     else SET_SYNC_FLAG(infoRec);
 }
 
-/********************************************************************
- 
-   This is the GlyphRenderer for TRIPLE_BITS_24BPP. It renders to a buffer
-   with the non FIXEDBASE LSB_FIRST code before tripling, and possibly
-   reversing the bits and sending them to the screen
-
-********************************************************************/
-
-void
-EXPNAME(XAATEGlyphRenderer3)(
-    ScrnInfoPtr pScrn,
-    int x, int y, int w, int h, int skipleft, int startline, 
-    unsigned int **glyphs, int glyphWidth,
-    int fg, int bg, int rop, unsigned planemask
-)
-{
-    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
-    CARD32 *base, *mem;
-    GlyphScanlineFuncPtr GlyphFunc = XAAGlyphScanlineFuncLSBFirst[glyphWidth - 1];
-    int dwords = 0;
-
-    if((bg != -1) && 
-	((infoRec->TEGlyphRendererFlags & TRANSPARENCY_ONLY) ||
-	((infoRec->TEGlyphRendererFlags & RGB_EQUAL) && 
-	(!CHECK_RGB_EQUAL(bg))))) {
-    	(*infoRec->SetupForSolidFill)(pScrn, bg, rop, planemask);
-        (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, w, h);
-	bg = -1;
-    }
-
-    (*infoRec->SetupForCPUToScreenColorExpandFill)(
-					pScrn, fg, bg, rop, planemask);
-
-    if(skipleft) {
-	    /* draw the first character only */
-
-	    int count = h, line = startline;
-            int width = glyphWidth - skipleft;
-	    CARD32 bits;
-
-	    if(width > w) width = w;
-            (*infoRec->SubsequentCPUToScreenColorExpandFill)(
-					pScrn, x, y, width, h, 0);
-
-	    base = (CARD32*)infoRec->ColorExpandBase;
-
-	    while(count--) {	
-		bits = SHIFT_R(glyphs[0][line++],skipleft);
-	        if (width >= 22) {
-		    WRITE_BITS3(bits);
-	        } else if (width >= 11) {
-		    WRITE_BITS2(bits);
-		} else {
-		    WRITE_BITS1(bits);
-		}
-	    }
-
-	    w -= width;
-	    if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) &&
-			((((3 * width + 31) >> 5) * h) & 1)) {
-		base = (CARD32*)infoRec->ColorExpandBase;
-		base[0] = 0x00000000;
-	    }
-	    if(!w) goto THE_END;
-	    glyphs++;
-            x += width;
-	    skipleft = 0;	/* nicely aligned again */
-    } 
-
-    dwords = ((3 * w + 31) >> 5) * h;
-    mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char));
-    if (!mem) return;
-
-    (*infoRec->SubsequentCPUToScreenColorExpandFill)(pScrn, x, y, w, h, 0);
-
-    base = (CARD32*)infoRec->ColorExpandBase;
-
-# ifndef FIXEDBASE
-    if((((3 * w + 31) >> 5) * h) <= infoRec->ColorExpandRange)
-	while(h--) {
-	    (*GlyphFunc)(mem, glyphs, startline++, w, glyphWidth);
-	    base = DrawTextScanline3(base, mem, w);
-	}
-    else
-# endif
-	while(h--) {
-	    (*GlyphFunc)(mem, glyphs, startline++, w, glyphWidth);
-	    DrawTextScanline3(base, mem, w);
-	}
-
-    free(mem);
-
-    if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) &&
-			(dwords & 1)) {
-	base = (CARD32*)infoRec->ColorExpandBase;
-	base[0] = 0x00000000;
-    }
-
-THE_END:
-
-    if(infoRec->TEGlyphRendererFlags & SYNC_AFTER_COLOR_EXPAND) 
-	(*infoRec->Sync)(pScrn);
-    else SET_SYNC_FLAG(infoRec);
-}
-
-
 #ifndef FIXEDBASE
 /*  Scanline version of above gets built for LSBFIRST and MSBFIRST */
 
@@ -415,133 +306,12 @@ THE_END:
     SET_SYNC_FLAG(infoRec);
 }
 
-void
-EXPNAME(XAATEGlyphRendererScanline3)(
-    ScrnInfoPtr pScrn,
-    int x, int y, int w, int h, int skipleft, int startline, 
-    unsigned int **glyphs, int glyphWidth,
-    int fg, int bg, int rop, unsigned planemask
-)
-{
-    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
-    int bufferNo;
-    CARD32 *base, *mem;
-    GlyphScanlineFuncPtr GlyphFunc = XAAGlyphScanlineFuncLSBFirst[glyphWidth - 1];
-
-    if((bg != -1) && 
-	((infoRec->TEGlyphRendererFlags & TRANSPARENCY_ONLY) ||
-	((infoRec->TEGlyphRendererFlags & RGB_EQUAL) && 
-	(!CHECK_RGB_EQUAL(bg))))) {
-    	(*infoRec->SetupForSolidFill)(pScrn, bg, rop, planemask);
-        (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, w, h);
-	bg = -1;
-    }
-
-    (*infoRec->SetupForScanlineCPUToScreenColorExpandFill)(
-					pScrn, fg, bg, rop, planemask);
-
-    if(skipleft) {
-	/* draw the first character only */
-
-	int count = h, line = startline;
-	int width = glyphWidth - skipleft;
-	CARD32 bits;
-	
-	if(width > w) width = w;
-
-        (*infoRec->SubsequentScanlineCPUToScreenColorExpandFill)(
-					pScrn, x, y, width, h, 0);
-
-	bufferNo = 0;
-
-	while(count--) {	
-	    base = (CARD32*)infoRec->ScanlineColorExpandBuffers[bufferNo];
-	    bits = SHIFT_R(glyphs[0][line++],skipleft);
-	    if (width >= 22) {
-		WRITE_BITS3(bits);
-	    } else if (width >= 11) {
-		WRITE_BITS2(bits);
-	    } else {
-		WRITE_BITS1(bits);
-	    }
-	    (*infoRec->SubsequentColorExpandScanline)(pScrn, bufferNo++);
-	    if(bufferNo >= infoRec->NumScanlineColorExpandBuffers)
-	    	bufferNo = 0;
-	}
-
-	w -= width;
-	if(!w) goto THE_END;
-	glyphs++;
-	x += width;
-	skipleft = 0;	/* nicely aligned again */
-    } 
-
-    w += skipleft;
-    x -= skipleft;
-    mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char));
-    if (!mem) return;
-
-   (*infoRec->SubsequentScanlineCPUToScreenColorExpandFill)(	
-				pScrn, x, y, w, h, skipleft);
-
-    bufferNo = 0;
-
-    while(h--) {
-	base = (CARD32*)infoRec->ScanlineColorExpandBuffers[bufferNo];
-	(*GlyphFunc)(mem, glyphs, startline++, w, glyphWidth);
-	DrawTextScanline3(base, mem, w);
-	(*infoRec->SubsequentColorExpandScanline)(pScrn, bufferNo++);
-	if(bufferNo >= infoRec->NumScanlineColorExpandBuffers)
-	    bufferNo = 0;
-    }
-
-    free(mem);
-    
-THE_END:
-
-    SET_SYNC_FLAG(infoRec);
-}
-
 #endif
 
 
 
 /********************************************************************
 
-   TRIPLE_BITS_24BPP scanline rendering code.
-
-********************************************************************/
-
-
-
-static CARD32*
-DrawTextScanline3(
-    CARD32 *base,
-    CARD32 *mem,
-    int width )
-{
-
-    while(width > 32) {
-	WRITE_BITS3(*mem);
-	mem++;
-	width -= 32;
-    }
-    if(width) {
-	if (width >= 22) {
-	    WRITE_BITS3(*mem);
-	} else if (width >= 11) {
-	    WRITE_BITS2(*mem);
-	} else {
-	    WRITE_BITS1(*mem);
-	}
-    }
-
-    return base;
-}
-
-
-/********************************************************************
-
    Generic TE scanline rendering code.
 
 ********************************************************************/
diff --git a/hw/xfree86/xaa/xaacexp.h b/hw/xfree86/xaa/xaacexp.h
index 56bcda6..124688d 100644
--- a/hw/xfree86/xaa/xaacexp.h
+++ b/hw/xfree86/xaa/xaacexp.h
@@ -45,13 +45,6 @@
 		byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
 	*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
 		byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; }
-#  define WRITE_BITS3(b) { \
-	*base = byte_reversed_expand3[(b) & 0xFF] | \
-		byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
-	*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
-		byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
-	*base = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
-		byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; }
 # else
 #  define WRITE_BITS(b)   *base = (b)
 #  define WRITE_BITS1(b) { \
@@ -62,13 +55,6 @@
 		byte_expand3[((b) & 0xFF00) >> 8] << 24; \
 	*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
 		byte_expand3[((b) & 0xFF0000) >> 16] << 16; }
-#  define WRITE_BITS3(b) { \
-	*base = byte_expand3[(b) & 0xFF] | \
-		byte_expand3[((b) & 0xFF00) >> 8] << 24; \
-	*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
-		byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
-	*base = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
-		byte_expand3[((b) & 0xFF000000) >> 24] << 8; }
 # endif
 #else
 # ifdef MSBFIRST
@@ -82,14 +68,6 @@
 	*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
 		byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
 	base += 2; }
-#  define WRITE_BITS3(b) { \
-	*(base) = byte_reversed_expand3[(b) & 0xFF] | \
-		byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
-	*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
-		byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
-	*(base + 2) = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
-		byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; \
-	base += 3; }
 # else
 #  define WRITE_BITS(b)   *(base++) = (b)
 #  define WRITE_BITS1(b) { \
@@ -101,14 +79,6 @@
 	*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
 		byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
 	base += 2; }
-#  define WRITE_BITS3(b) { \
-	*(base) = byte_expand3[(b) & 0xFF] | \
-		byte_expand3[((b) & 0xFF00) >> 8] << 24; \
-	*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
-		byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
-	*(base + 2) = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
-		byte_expand3[((b) & 0xFF000000) >> 24] << 8; \
-	base += 3; }
 # endif
 #endif
 
diff --git a/hw/xwin/xlaunch/resources/resources.h b/hw/xwin/xlaunch/resources/resources.h
old mode 100755
new mode 100644
diff --git a/hw/xwin/xlaunch/window/dialog.h b/hw/xwin/xlaunch/window/dialog.h
old mode 100755
new mode 100644
diff --git a/hw/xwin/xlaunch/window/window.h b/hw/xwin/xlaunch/window/window.h
old mode 100755
new mode 100644
diff --git a/hw/xwin/xlaunch/window/wizard.h b/hw/xwin/xlaunch/window/wizard.h
old mode 100755
new mode 100644
diff --git a/render/picture.c b/render/picture.c
index 7fda6b9..9afddaf 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -302,15 +302,6 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
 				      PICT_a4b4g4r4, pDepth->depth);
 	    }
 	    break;
-	case 24:
-	    if (pDepth->depth >= 24)
-	    {
-		nformats = addFormat (formats, nformats,
-				      PICT_r8g8b8, pDepth->depth);
-		nformats = addFormat (formats, nformats,
-				      PICT_b8g8r8, pDepth->depth);
-	    }
-	    break;
 	case 32:
 	    if (pDepth->depth >= 24)
 	    {
diff --git a/render/picture.h b/render/picture.h
index e5f0d78..9c5e505 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -80,10 +80,6 @@ typedef enum _PictFormatShort {
     PICT_b8g8r8a8 =	PIXMAN_b8g8r8a8,
     PICT_b8g8r8x8 =	PIXMAN_b8g8r8x8,
 
-/* 24bpp formats */
-    PICT_r8g8b8 =	PIXMAN_r8g8b8,
-    PICT_b8g8r8 =	PIXMAN_b8g8r8,
-
 /* 16bpp formats */
     PICT_r5g6b5 =	PIXMAN_r5g6b5,
     PICT_b5g6r5 =	PIXMAN_b5g6r5,
-- 
1.7.2.3



More information about the xorg-devel mailing list