[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Matrox and XFree86 4.0.2 update



I recently ran into an issue with the matroxfb driver and XFree86 4.0.2's
matrox driver.  Sometime in the past someone decided to use BE
register access in matroxfb for BE machines, while this is probably The
Right Way, it produces problems in X.  I can use BE register access
macro's in X but it was causing problems with the engine, perhaps some DMA
issue although the dma BE bits are on.

Anyhow, the small attatched patch is necessary along with my XFree86 4.0.2
rsync tree located at linuxppc.org::xfree86-pmac.

The patch removes the turning on of the BE PCI option register, and lets
matroxfb use LE register access for powerpc.


ani
--- matroxfb.c.orig	Wed Jan 24 11:50:41 2001
+++ matroxfb.c	Wed Jan 24 11:55:34 2001
@@ -181,7 +181,7 @@
 #endif 
 #endif
 
-#if defined(__alpha__) || defined(__m68k__)
+#if defined(__alpha__) || defined(__m68k__) || defined(__powerpc__)
 #define READx_WORKS
 #define MEMCPYTOIO_WORKS
 #else
@@ -1042,7 +1042,11 @@
 #define M_OPMODE_32BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)
 #else
 #ifdef __BIG_ENDIAN
+#if defined (__powerpc__)
+#define MX_OPTION_BSWAP		0x00000000
+#else
 #define MX_OPTION_BSWAP		0x80000000
+#endif
 
 #define M_OPMODE_4BPP	(M_OPMODE_DMA_LE | M_OPMODE_DIR_LE | M_OPMODE_DMA_BLIT)	/* TODO */
 #define M_OPMODE_8BPP	(M_OPMODE_DMA_BE_8BPP  | M_OPMODE_DIR_BE_8BPP  | M_OPMODE_DMA_BLIT)

Reply to: