Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Titanium PowerBook G4 works with DRI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
gwright
n00b
n00b


Joined: 28 May 2002
Posts: 21
Location: London, UK

PostPosted: Mon Jun 03, 2002 4:17 pm    Post subject: Titanium PowerBook G4 works with DRI Reply with quote

The ATI Radeon cards in the various PowerBook G4s (except for the latest line) can now be used with 3D acceleration, thanks to MrCooper (mdaenzer)! :D

Instructions:

Get the DRI CVS trunk with:

cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login
<Press enter>
cvs -z4 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc

This will download approx. 90MB files onto your hard disk. Then, compile it with:

Code:
cd xc
ln -s xc XFree40
mkdir build
cd build
lndir -silent -ignorelinks ../XFree40


Then, you will need to edit the host.def file, located in xc/config/cf/host.def.

Change it to:
Code:
/*
 * Set this for each DRI branch.  It will be appended to the XFree86 version
 * information.
 */
#define XFree86CustomVersion "DRI trunk"

#define DefaultGcc2AxpOpt -O2 -mcpu=ev6
#define DefaultGcc2PpcOpt -O2 -pipe -mpowerpc-gfxopt -mmultiple -mstring -mnew-mnemonics -ffast-math -fsigned-char
#define DefaultGcc2i386Opt -O2
#if defined(AlphaArchitecture)
#  define LibraryCDebugFlags -O2 -mcpu=ev6
#elif defined(PpcArchitecture)
#  define LibraryCDebugFlags -O2 -pipe -mpowerpc-gfxopt -mmultiple -mstring -mnew-mnemonics -ffast-math -fsigned-char
#else
#  define LibraryCDebugFlags -O2
#endif

#define BuildXFree86ConfigTools YES

#define XF86CardDrivers ati

#define DriDrivers radeon /* sis ffb */

#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
                          -Wmissing-prototypes -Wmissing-declarations \
                          -Wnested-externs
#define DefaultCCOptions -ansi GccWarningOptions -pipe -g

#define NormalLibGlx NO

#define BuildXF86DRI YES

/* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
 * this on.
 * Use 'xc/lib/GL/makeprofile.sh' to make it work.
 */
/* #define GlxSoProf YES */

#ifdef GlxSoProf
#  undef DefaultCCOptions
#  define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
#endif

/* Optionally turn these on for debugging */
/* #define GlxBuiltInTdfx YES */
/* #define GlxBuiltInI810 YES */
/* #define GlxBuiltInMga YES */
/* #define GlxBuiltInR128 YES */
/* #define GlxBuiltInRadeon YES */
/* #define DoLoadableServer NO */

/* Optionally turn this on to change the place where you install the build.
 * Warning: trailing blanks will cause build failures.
 */
/* #define ProjectRoot /usr/X11R6-DRI */

/* Optionally turn this on to force the kernel modules to build */
/* #define BuildXF86DRM YES */

#define XF86AFB NO

#define XnestServer NO
#define XVirtualFramebufferServer NO

/*
 * Don't change anything below or the build will fail.
 */
#define BuildServersOnly YES
#define BuildLibrariesForXServers NO
#define BuildLibrariesForConfigTools NO
#define BuildXIE NO
#define BuildPexExt NO
#define XprtServer NO
#define SharedLibFont NO


Note: The optimizations on that are for G4. I have only tested it with a Titanium PowerBook G4, no L3 cache with an ATI Radeon M6 LY.

When you have edited your host.def, do:

Code:
cd build/xc/
make World >& world.log & tail -f world.log


That will take about 1/2 hour to compile. When that is done, do a:

Code:
make install


Then cd to build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/, and:

Code:
make -f Makefile.linux


That will make the kernel modules required for DRI. After that has done, copy the finished radeon.o to /lib/modules/2.4.x/kernel/drivers/char/drm/ with:

Code:
mv /lib/modules/2.4.x/kernel/drivers/char/drm/radeon.o /lib/modules/2.4.x/kernel/drivers/char/drm/radeon.o.bak
cp radeon.o /lib/modules/2.4.x/kernel/drivers/char/drm/


You then need to edit /etc/X11/XF86Config. Add the following section at the end of the file:

Code:

Section "DRI"
       Mode 0666
EndSection


Restart X.

To make sure that the DRI is working, just type
Code:
glxinfo


And you should see a bit that says:
Code:
OpenGL vendor string: VA Linux Systems, Inc.
OpenGL renderer string: Mesa DRI Radeon 20020221 AGP 1x
OpenGL version string: 1.2 Mesa 4.0.3


Or similar. If it says:
Code:
OpenGL vendor string: VA Linux Systems, Inc.
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 Mesa 4.0.3


Then you're DRI isn't setup properly.

Notes:

The M6 (aka Radeon Mobility) does about 420fps in glxgears. Without DRI it does ~100.
The M7 (aka Radeon 7500 Mobility) apparently works with this code. I can't confirm this as I don't have an ATI Radeon 7500 Mobility to test it on.
The Radeon 9000 Mobility in the 867/1GHz PowerBooks do not work with DRI as far as I know.

Hope this helps,

George
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum