Subject: Radeon DRI
To: None <tech-x11@netbsd.org>
From: Jonathan Perkin <jonathan@perkin.org.uk>
List: tech-x11
Date: 07/26/2004 17:20:10
--g4MvFqI7wmANiPDo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Ok, so it's incredibly hacky and probably really broken, but I've
managed to get my Radeon Mobility 9000 working with DRI on NetBSD.

Patch is available at:

	ftp://ftp.netbsd.org/pub/NetBSD/misc/sketch/dri.diff

Logs:

	info: [drm] ATI Radeon Lf R250 Mobility 9000 M9
	info: [drm] AGP at 0xe0000000 128MB
	info: [drm] Initialized radeon 1.10.0 20020828 on minor 0
	info: [drm] Loading R200 Microcode

	ftp://ftp.netbsd.org/pub/NetBSD/misc/sketch/XFree86.dri.log
	ftp://ftp.netbsd.org/pub/NetBSD/misc/sketch/glxinfo

	Cube (cube.sf.net) runs at a very nice speed indeed.  I've not
	tried anything else yet (glxgears is around 700fps).

Caveats:

 o No x86 optimisation yet, need to figure out unresolved symbols in libGL
   when enabled.

 o You'll need to manually link xxx_dri.so -> libxxx_dri.so.1, see the
   comment in src/x11/Xserver/GL/dri/Makefile
=20
 o modload /usr/lkm/radeon.o before starting X (we don't have
   modload(4)?).  Add this to /etc/lkm.conf and LKM=3Dyes if you want this
   each time.

 o Check that /dev/dri/card0 after loading the kernel module has major
   number of 34; once it was created with the wrong major/minor which
   took a while to track down.

 o It only works for the first start of X; any subsequent attempts will
   try to find /dev/dri/cardx and fail.  Unloading/reloading the kernel
   module results in complete video loss on my laptop (although I can
   still change to ttyE0 and blindly type reboot).

 o Probably lots more; I have no real experience in this area and have
   no doubt done some really dumb things, but I can now play Cube on
   NetBSD and go "aha!" at my work colleagues who are all Linux users
   and constantly chided me for rebooting into Linux when we play.

Hopefully this is useful for someone.  I will probably look further into
cleaning this patch up when I get some time.

Cheers,

--=20
Jonathan Perkin                                       The NetBSD Project
http://www.perkin.org.uk/                         http://www.netbsd.org/

--g4MvFqI7wmANiPDo
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUBQQUvOiFee6/VMqV4AQJR5wf+Ot8YLyZVh7JEDP8lrjscU+Yx94jRjQ5W
XrlLZ1NBQgxdcVC9P9ubdr+/5Q3rpGE7/9CEsRI8OM+eTvlyBNoy5bOFpQZ17zOP
Sy4P40w+gFadzGKq0Iibp3UwjzLDGtSjNpayKd9zUSCcYmiVTsMdLxzk+r0rwFei
HmdmnxCpjozt7vPHvQYoizA2MCrV4nOimCS6i2z+gfCt2GXPqgWCmDSON/yuM57F
VV5xgmeDrr0bJS3SrXymMs/uv+YcD0b04kTQD4VGQKVkfwbQXT9kOJVSSm1MeFqg
pErrhcQYRKbxqRCZ5pvu5Y3u2nOEtjUMs1iojf7oixGAFhl3Vk8cdw==
=J/Vy
-----END PGP SIGNATURE-----

--g4MvFqI7wmANiPDo--