Claudio Ciccani wrote:
Michel Dänzer wrote:

On Wed, 2006-01-25 at 01:56 +0200, Ivan Daniluk wrote:

It works if 'radeon' driver from xorg is not loaded. Otherwise it shows black screen and freeze.



Based on this little information, my first guess would be that this is
because the X driver changes the MC_FB_LOCATION register.


I have attached a patch to solve this problem; it also attempts to fix the "diagonal stripes" bug.
Apply with -p0.



Sorry, there was an error in the previous patch.

--
Regards,
     Claudio Ciccani

[EMAIL PROTECTED]
http://directfb.org
http://sf.net/projects/php-directfb
--- r100.c	2006-01-22 15:31:27.000000000 +0100
+++ r100.1.c	2006-01-25 15:18:41.533382184 +0100
@@ -195,9 +195,11 @@
      r100_out32( mmio, SURFACE_CNTL, rdev->surface_cntl );
      
      /* set framebuffer offset */
-     r100_waitfifo( rdrv, rdev, 3 );
-     r100_out32( mmio, DEFAULT_OFFSET, (rdev->fb_offset >> 10) |
-                                       (pitch64 << 22) );
+     r100_waitfifo( rdrv, rdev, 4 );
+     r100_out32( mmio, MC_FB_LOCATION,
+                       (r100_in32( mmio, CONFIG_MEMSIZE ) - 1) & 0xffff0000 );
+     r100_out32( mmio, DEFAULT_OFFSET, 
+                       (rdev->fb_offset >> 10) | (pitch64 << 22) );
      r100_out32( mmio, DISPLAY_BASE_ADDR, rdev->fb_offset );
      r100_out32( mmio, OV0_BASE_ADDR, rdev->fb_offset );
        
@@ -207,10 +209,6 @@
 #else
      r100_out32( mmio, DP_DATATYPE, dp_datatype );
 #endif
-
-     /* Disable byte swapping */
-     r100_waitfifo( rdrv, rdev, 1 );
-     r100_out32( mmio, SURFACE_CNTL, SURF_TRANSLATION_DIS );
      
      /* restore 2d engine */
      r100_waitfifo( rdrv, rdev, 5 );
@@ -344,8 +342,8 @@
               state->blittingflags & ~supported_blittingflags)
                return;
           
-          if (source->width  < 8 || source->width  > 2047 ||
-              source->height < 8 || source->height > 2047)
+          if (source->width  < 8 || source->width  > 2048 ||
+              source->height < 8 || source->height > 2048)
                return;
 
           if (state->blittingflags & DSBLIT_MODULATE_ALPHA &&
@@ -491,7 +489,8 @@
 
 #define r100_enter2d( rdrv, rdev ) {                                       \
      if ((rdev)->write_3d) {                                               \
-          r100_waitfifo( rdrv, rdev, 1 );                                  \
+          r100_waitfifo( rdrv, rdev, 2 );                                  \
+          r100_out32( (rdrv)->mmio_base, RB3D_DSTCACHE_CTLSTAT, DC_FLUSH );\
           r100_out32( (rdrv)->mmio_base, WAIT_UNTIL, WAIT_3D_IDLECLEAN );  \
           (rdev)->write_3d = false;                                        \
      }                                                                     \
@@ -500,7 +499,8 @@
 
 #define r100_enter3d( rdrv, rdev ) {                                       \
      if ((rdev)->write_2d) {                                               \
-          r100_waitfifo( rdrv, rdev, 1 );                                  \
+          r100_waitfifo( rdrv, rdev, 2 );                                  \
+          r100_out32( (rdrv)->mmio_base, RB2D_DSTCACHE_CTLSTAT, DC_FLUSH );\
           r100_out32( (rdrv)->mmio_base, WAIT_UNTIL, WAIT_2D_IDLECLEAN );  \
           (rdev)->write_2d = false;                                        \
      }                                                                     \
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to