Subject: DRI and XFree86
To: None <tech-x11@netbsd.org>
From: Jukka Salmi <j+nbsd@2007.salmi.ch>
List: tech-x11
Date: 03/31/2007 08:57:24
Hi,

I have a -current NetBSD/i386 system with a Matrox G400 card and thought
I'd give the recently committed DRI code a try:

pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: VIA Technologies VT8377 Apollo KT400 CPU to PCI Bridge (rev. 0x00)
agp0 at pchb0 (v2): aperture at 0xf8000000, size 0x10000000
ppb0 at pci0 dev 1 function 0: VIA Technologies VT8377 CPU-AGP Bridge (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: Matrox MGA G400 AGP (rev. 0x04)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
mgadrm0 at vga0
info: [drm] Matrox G400/G450 (AGP) (unit 0)
info: [drm] AGP at 0xf8000000 64MB
info: [drm] Initialized mga 3.2.2 20060319

According to drm(4), on i386 X is usually compiled with DRI support.
Hmm, this might be true for X.org built from pkgsrc, but my X11R6 built
from NetBSD's xsrc is missing dri and drm modules. I see there's a DRI
compile-time option, but building with X11DRI=yes failed (in
x11/lib/GL), and after fixing the makefile it failed again, and after
some more fixes lib/GL built but then I got undefined references to
some symbols from libOSMesa when building glxgears, and then ran out
of time to fix the build further... BTW, some makefiles in
x11/Xserver/GL would probably also need some fixing.

So, is building XFree86 via src/x11 with X11DRI=yes supposed to work?
Should I file a PR? Or is using X.org from pkgsrc the "recommended"
way to get a DRI capable system?


TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~