I just added the AGP setup ioctl to my previous attempt and it works!
Here's an incremental patch.
--- DirectFB/src/core/agp.c~ Tue Jun 18 07:05:13 2002
+++ DirectFB/src/core/agp.c Wed Jun 19 02:19:00 2002
@@ -158,6 +158,21 @@
return DFB_OK;
}
+static DFBResult dfb_agp_setup(unsigned long mode)
+{
+ agp_setup setup;
+
+ setup.agp_mode = mode;
+
+ if (ioctl(agp->fd, AGPIOC_SETUP, &setup) != 0) {
+ PERRORMSG( "DirectFB/core/agp: "
+ "AGP setup failed!\n");
+ return errno2dfb(errno);
+ }
+
+ return DFB_OK;
+}
+
DFBResult dfb_agp_initialize()
{
@@ -194,6 +209,7 @@
return DFB_INIT;
}
+ dfb_agp_setup(Sagp->info.agp_mode);
/* Map the AGP aperture */
agp->agp_base = mmap( NULL, Sagp->info.aper_size * 0x100000,
Bencmark results:
Benchmarking with 256x256 in 16bit mode... (16bit)
AGP:
Blit 3.02 secs ( 189.05 MPixel/sec)
Blit colorkeyed 3.02 secs ( 189.05 MPixel/sec)
Blit with format conversion 3.01 secs ( 98.11 MPixel/sec)
Blit from 32bit (alphachannel blend) 3.01 secs ( 98.08 MPixel/sec)
Stretch Blit 3.12 secs ( 125.05 MPixel/sec)
Stretch Blit colorkeyed 3.12 secs ( 125.05 MPixel/sec)
Card memory:
Blit 3.02 secs ( 308.15 MPixel/sec)
Blit colorkeyed 3.01 secs ( 308.87 MPixel/sec)
Blit with format conversion 3.02 secs ( 141.15 MPixel/sec)
Blit from 32bit (alphachannel blend) 3.04 secs ( 129.26 MPixel/sec)
Stretch Blit 3.06 secs ( 147.43 MPixel/sec)
Stretch Blit colorkeyed 3.05 secs ( 147.57 MPixel/sec)
"Blit with format conversion" seems to be limited from AGP. I think I'm
running at AGP 2x but I'm not sure. I'll have to make it print some useful
messages on the mode, sba, fw etc.
--
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.