Xati failure on PPC

Michel Dänzer michel@daenzer.net
Mon, 26 Jan 2004 02:42:30 +0100


--=-jb2zQXuV5OVz1gTfpkMu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On Sat, 2004-01-24 at 01:52, Benjamin Herrenschmidt wrote:
> On Sat, 2004-01-24 at 04:04, Matthew Garrett wrote:
> > If I run Xati with drm support on a PPC system with a Radeon 9000, the 
> > screen is switched to the correct mode but I'm left with a console. Xati 
> > then continues to consume 100% of cpu time and can't be killed. I'm 
> > using PCIGART since I don't have AGP support for my northbridge, if that 
> > makes any difference. radeonfb is being used. Any hints?
> 
> Known problem. I didn't have time to dive into it yet (busy merging
> stuffs with Andrew at the moment), but if nobody gets to it's I'll
> give a try a fixing it among with other fbdev improvements in
> xserver

I've found some endianness handling differences to the XFree86 server,
see attachment. Unfortunately, it still doesn't work right here.


-- 
Earthling Michel Dänzer      |     Debian (powerpc), X and DRI developer
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=daenzer

--=-jb2zQXuV5OVz1gTfpkMu
Content-Description: 
Content-Disposition: inline; filename=local.diff
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: hw/kdrive/ati/ati_draw.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_draw.h,v
retrieving revision 1.5
diff -p -u -r1.5 ati_draw.h
--- hw/kdrive/ati/ati_draw.h	25 Jan 2004 01:16:19 -0000	1.5
+++ hw/kdrive/ati/ati_draw.h	26 Jan 2004 01:28:58 -0000
@@ -52,7 +52,7 @@ do {									\
 } while (0)
 
 #define OUT_RING(x) do {						\
-	MMIO_OUT32(&__head[__count++], 0, (x));				\
+	__head[__count++] = (x);					\
 } while (0)
 
 #define OUT_RING_REG(reg, val)						\
Index: hw/kdrive/ati/ati_drawtmp.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_drawtmp.h,v
retrieving revision 1.4
diff -p -u -r1.4 ati_drawtmp.h
--- hw/kdrive/ati/ati_drawtmp.h	30 Dec 2003 08:45:53 -0000	1.4
+++ hw/kdrive/ati/ati_drawtmp.h	26 Jan 2004 01:28:58 -0000
@@ -25,7 +25,8 @@
 
 #ifdef USE_DMA
 #define TAG(x)		x##DMA
-#define LOCALS		RING_LOCALS; \
+#define LOCALS		char *mmio = atic->reg_base; \
+			RING_LOCALS;		     \
 			(void)atic
 #define BEGIN(x)	BEGIN_RING(x * 2)
 #define OUT_REG(reg, val) OUT_RING_REG(reg, val)
@@ -51,6 +52,16 @@ TAG(ATISetup)(PixmapPtr pDst, PixmapPtr 
 
 	accel_atis = atis;
 
+	ATIWaitAvailMMIO(1);
+	MMIO_OUT32(mmio, RADEON_DP_DATATYPE,
+		   MMIO_IN32(mmio, RADEON_DP_DATATYPE)
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+		   | RADEON_HOST_BIG_ENDIAN_EN
+#else
+		   & ~RADEON_HOST_BIG_ENDIAN_EN
+#endif
+		   );
+
 	dst_pitch = pDst->devKind;
 	dst_offset = ((CARD8 *)pDst->devPrivate.ptr -
 	    pScreenPriv->screen->memory_base);
Index: hw/kdrive/ati/ati_reg.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_reg.h,v
retrieving revision 1.4
diff -p -u -r1.4 ati_reg.h
--- hw/kdrive/ati/ati_reg.h	30 Dec 2003 08:23:56 -0000	1.4
+++ hw/kdrive/ati/ati_reg.h	26 Jan 2004 01:28:59 -0000
@@ -74,6 +74,8 @@
 # define RADEON_DST_X_LEFT_TO_RIGHT		(1 <<  0)
 # define RADEON_DST_Y_TOP_TO_BOTTOM		(1 <<  1)
 
+#define RADEON_DP_DATATYPE			0x16c4
+# define RADEON_HOST_BIG_ENDIAN_EN		(1 << 29)
 #define RADEON_REG_DP_MIX			0x16c8
 #define RADEON_REG_DP_WRITE_MASK		0x16cc
 #define RADEON_REG_DEFAULT_OFFSET		0x16e0

--=-jb2zQXuV5OVz1gTfpkMu--