[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dri-users
Subject:    Re: [Dri-users] [PATCH] mach64_0_0_6_branch
From:       Leif Delgass <ldelgass () retinalburn ! net>
Date:       2003-04-25 4:22:29
[Download RAW message or body]

On Fri, 25 Apr 2003, Colin Leroy wrote:

> Hi,
> 
> just finished installing mach64 006 branch and it went really fine. 
> I only had one build issue, fixed by the attached patch.

Thanks, I've committed it.
 
> (this new branch doesn't fix sync and async DMAModes on PPC, sadly enough)
> 
> hth,

Could you try the attached patch?  It's a longshot, but I haven't gotten a
test report on ppc with this yet.  It does some extra reads to make sure
the new ring head pointer is posted and reads back from the ring when
moving the dma end-of-list flag.  It's based on a patch that fixed a pci
posting problem with the Radeon driver, but that wasn't ppc specific.

Anyway, it's worth a try.

-- 
Leif Delgass 
http://www.retinalburn.net

["mach64-dmatest.diff" (TEXT/PLAIN)]

Index: mach64_drv.h
===================================================================
RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/Attic/mach64_drv.h,v
 retrieving revision 1.1.2.7
diff -u -r1.1.2.7 mach64_drv.h
--- mach64_drv.h	8 Apr 2003 04:36:33 -0000	1.1.2.7
+++ mach64_drv.h	25 Apr 2003 04:14:38 -0000
@@ -37,7 +37,7 @@
 
 /* FIXME: remove these when not needed */
 /* Development driver options */
-#define MACH64_EXTRA_CHECKING     0 /* Extra sanity checks for DMA/freelist \
management */ +#define MACH64_EXTRA_CHECKING     1 /* Extra sanity checks for \
DMA/freelist management */  #define MACH64_VERBOSE		  0 /* Verbose debugging output \
*/  
 typedef struct drm_mach64_freelist {
@@ -605,6 +605,7 @@
 	/* reset descriptor table ring head */
 	MACH64_WRITE( MACH64_BM_GUI_TABLE_CMD, 
 		      ring->head_addr | MACH64_CIRCULAR_BUF_SIZE_16KB );
+	MACH64_READ( MACH64_BM_GUI_TABLE_CMD );
 	
 	dev_priv->ring_running = 1;
 }
@@ -630,6 +631,8 @@
 
 		/* kick off the transfer */
 		MACH64_WRITE( MACH64_DST_HEIGHT_WIDTH, 0 );
+		MACH64_READ( MACH64_BM_GUI_TABLE_CMD );
+
 		if ( dev_priv->driver_mode == MACH64_MODE_DMA_SYNC ) {
 			if ( (mach64_do_wait_for_idle( dev_priv )) < 0 ) {
 				DRM_ERROR( "%s: idle failed, resetting engine\n", 
@@ -789,6 +792,7 @@
 
 #define ADVANCE_RING() 							\
 do {									\
+	u32 _tmp;							\
 	if ( MACH64_VERBOSE ) {						\
 		DRM_INFO( "ADVANCE_RING() wr=0x%06x tail=0x%06x\n",	\
 			  _ring_write, _ring_tail );			\
@@ -796,6 +800,7 @@
 	DRM_READMEMORYBARRIER(dev_priv->mmio);				\
 	mach64_clear_dma_eol( &_ring[(_ring_tail - 2) & _ring_mask] );	\
 	DRM_READMEMORYBARRIER(dev_priv->mmio);				\
+	_tmp = _ring[_ring_write];					\
 	dev_priv->ring.tail = _ring_write;				\
 	mach64_ring_tick( dev_priv, &(dev_priv)->ring );		\
 } while (0)


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-users mailing list
Dri-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic