Subject: Re: X behaving badly
To: Jaap Boender <jaapb@kerguelen.org>
From: Andrey Petrov <petrov@netbsd.org>
List: port-sparc64
Date: 12/02/2003 13:57:11
On Tue, Dec 02, 2003 at 08:59:28PM +0100, Jaap Boender wrote:
> Hi,
>
> Hm, the patches compiled all right, but the problem still persists,
> unfortunately...it looks like rendering of some types of bitmap is just
> broken; some types of images come out all right, and others (not only icons,
> but also some images on web sites, for example) look totally garbled.
> Strange...
>
Can you try Xserver (if you havn't yet) from this location:
ftp://ftp.netbsd.org/pub/NetBSD/misc/petrov/X/XFree86
I'm attaching more complete patch, just in case, and I'd suggest
to rebuild X entirely, and to check if XFree86 had been rebuilt
successfully.
Andrey
Index: config/cf/NetBSD.cf
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/config/cf/NetBSD.cf,v
retrieving revision 1.54
diff -u -p -r1.54 NetBSD.cf
--- config/cf/NetBSD.cf 18 Oct 2003 19:41:41 -0000 1.54
+++ config/cf/NetBSD.cf 2 Dec 2003 20:38:13 -0000
@@ -657,7 +657,7 @@ InstallManPageAliasesBase(file,destdir,a
# define OptimizedCDebugFlags -O2
# ifndef XF86Server
-/* # define XF86Server YES */
+# define XF86Server YES
# endif
/* # define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT */
@@ -666,7 +666,7 @@ InstallManPageAliasesBase(file,destdir,a
# ifndef DoLoadableServer
# define DoLoadableServer NO
# endif
-# define XF86CardDrivers wsfb sunffb
+# define XF86CardDrivers wsfb /* sunffb */
# define AsOutputArchSize 64
# define AsVISOption -Av9a
# define XFree86ConsoleDefines -DWSCONS_SUPPORT
Index: extras/Xpm/lib/create.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/extras/Xpm/lib/create.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 create.c
--- extras/Xpm/lib/create.c 19 Jan 2002 15:25:16 -0000 1.1.1.2
+++ extras/Xpm/lib/create.c 2 Dec 2003 20:38:48 -0000
@@ -44,6 +44,7 @@
* Lorens Younes (d93-hyo@nada.kth.se) 4/96
*/
+#include "X11/Xmd.h"
#include "XpmI.h"
#include <ctype.h>
Index: programs/Xserver/cfb/cfbglblt8.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/cfb/cfbglblt8.c,v
retrieving revision 1.3
diff -u -p -r1.3 cfbglblt8.c
--- programs/Xserver/cfb/cfbglblt8.c 19 Jan 2002 23:19:32 -0000 1.3
+++ programs/Xserver/cfb/cfbglblt8.c 2 Dec 2003 20:39:32 -0000
@@ -60,8 +60,6 @@ in this Software without prior written a
#if GLYPHPADBYTES != 4
#define USE_LEFTBITS
-#elif (BITMAP_BIT_ORDER == MSBFirst) && (PGSZ == 64)
-#define USE_LEFTBITS
#endif
#ifdef USE_LEFTBITS
Index: programs/Xserver/hw/xfree86/etc/Imakefile
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/etc/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- programs/Xserver/hw/xfree86/etc/Imakefile 2 Mar 2003 07:33:22 -0000 1.4
+++ programs/Xserver/hw/xfree86/etc/Imakefile 2 Dec 2003 20:39:36 -0000
@@ -103,12 +103,14 @@ NormalProgramTarget(joycal,joycal.o,Null
InstallProgram(joycal,$(BINDIR))
#endif
+#if !defined(Sparc64Architecture)
SRCS4 = pcitweak.c
AllTarget(ProgramTargetName(pcitweak))
NormalProgramTarget(pcitweak,pcitweak.o,$(XF86OSSRC)/libxf86_os.a ../dummylib/libdummy.a,-L../os-support -lxf86_os -L../dummylib -ldummy $(SERVEREXTRASYSLIBS),NullParameter)
InstallProgram(pcitweak,$(BINDIR))
InstallManPage(pcitweak,$(MANDIR))
+#endif
#if 0 /*BuildMatchagp*/
SRCS5 = matchagp.c
Index: programs/Xserver/include/servermd.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/include/servermd.h,v
retrieving revision 1.5
diff -u -p -r1.5 servermd.h
--- programs/Xserver/include/servermd.h 28 Feb 2003 21:49:45 -0000 1.5
+++ programs/Xserver/include/servermd.h 2 Dec 2003 20:39:38 -0000
@@ -230,33 +230,11 @@ SOFTWARE.
# define BITMAP_BIT_ORDER MSBFirst
#endif
-#if defined(sparc) || defined(__sparc__) || defined(__sparc_v9__)
+#ifdef sparc
# define AVOID_MEMORY_READ
# define LARGE_INSTRUCTION_CACHE
# define FAST_CONSTANT_OFFSET_MODE
-# if !defined(__sparc_v9__) && !defined(__arch64__)
-# define SHARED_IDCACHE
-# else
-# define LARGE_INSTRUCTION_CACHE
-# define PLENTIFUL_REGISTERS
-# endif
-#endif
-
-#if defined(__sparc_v9__) || ((defined(__sparc__) || defined(sparc)) && defined(__arch64__))
-/* pad scanline to a longword */
-#define BITMAP_SCANLINE_UNIT 64
-
-#define BITMAP_SCANLINE_PAD 64
-#define LOG2_BITMAP_PAD 6
-#define LOG2_BYTES_PER_SCANLINE_PAD 3
-
-/* Add for handling protocol XPutImage and XGetImage; see comment below */
-#define INTERNAL_VS_EXTERNAL_PADDING
-#define BITMAP_SCANLINE_UNIT_PROTO 32
-
-#define BITMAP_SCANLINE_PAD_PROTO 32
-#define LOG2_BITMAP_PAD_PROTO 5
-#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2
+# define SHARED_IDCACHE
#endif
#ifdef mc68020
Index: programs/Xserver/mfb/maskbits.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/mfb/maskbits.h,v
retrieving revision 1.3
diff -u -p -r1.3 maskbits.h
--- programs/Xserver/mfb/maskbits.h 28 Feb 2003 21:49:45 -0000 1.3
+++ programs/Xserver/mfb/maskbits.h 2 Dec 2003 20:39:38 -0000
@@ -523,30 +523,26 @@ extern PixelType mask[];
#endif
#if GETLEFTBITS_ALIGNMENT == 1
-#if (BITMAP_BIT_ORDER == MSBFirst && PPW == 64)
-#define getleftbits(psrc, w, dst) dst = SCRLEFT(*((CARD32 *) psrc), PPW - 32)
-#else
-#define getleftbits(psrc, w, dst) dst = *((CARD32 *) psrc)
-#endif
+#define getleftbits(psrc, w, dst) dst = *((CARD32 *)(pointer) psrc)
#endif /* GETLEFTBITS_ALIGNMENT == 1 */
#if GETLEFTBITS_ALIGNMENT == 2
#define getleftbits(psrc, w, dst) \
{ \
- if ( ((long)(psrc)) & 0x01 ) \
- getbits( ((PixelType *)(((char *)(psrc))-1)), 8, (w), (dst) ); \
+ if ( ((int)(psrc)) & 0x01 ) \
+ getbits( ((CARD32 *)(((char *)(psrc))-1)), 8, (w), (dst) ); \
else \
- getbits((PixelType *)psrc, 0, w, dst); \
+ getbits(psrc, 0, w, dst); \
}
#endif /* GETLEFTBITS_ALIGNMENT == 2 */
#if GETLEFTBITS_ALIGNMENT == 4
#define getleftbits(psrc, w, dst) \
{ \
- long off, off_b; \
- off_b = (off = ( ((long)(psrc)) & 0x03)) << 3; \
+ int off, off_b; \
+ off_b = (off = ( ((int)(psrc)) & 0x03)) << 3; \
getbits( \
- (PixelType *)( ((char *)(psrc)) - off), \
+ (CARD32 *)( ((char *)(psrc)) - off), \
(off_b), (w), (dst) \
); \
}
Index: programs/Xserver/mfb/mfbtegblt.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/mfb/mfbtegblt.c,v
retrieving revision 1.3
diff -u -p -r1.3 mfbtegblt.c
--- programs/Xserver/mfb/mfbtegblt.c 19 Jan 2002 23:19:37 -0000 1.3
+++ programs/Xserver/mfb/mfbtegblt.c 2 Dec 2003 20:39:38 -0000
@@ -156,9 +156,6 @@ typedef unsigned short *glyphPointer;
#if GLYPHPADBYTES == 4
typedef unsigned int *glyphPointer;
-#if (BITMAP_BIT_ORDER == MSBFirst) && (PGSZ == 64)
-#define USE_LEFTBITS
-#endif
#endif
#ifdef USE_LEFTBITS