Date: Tue, 29 Aug 2000 21:46:53 +0200 From: Khamba Staring <purrcat@edoropolis.org> To: Marc van Woerkom <marc.vanwoerkom@science-factory.com> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 4.1-RELEASE, XFree 4.0.1, AGP and Matrox G400 --> NEED FBSD 5.x?! Message-ID: <200008291946.e7TJkss27835@francine.edoropolis.org> In-Reply-To: Your message of "Tue, 29 Aug 2000 17:00:24 %2B0200." <20000829150024.DD7291E69@nil.science-factory.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Anyway; thanks for all your time patiently answering my posts and getting > > things working! > > Can anyone of you send me a short list with the steps necessary? > Ascii is ok. > I would cast it into HTML and put on the FreeBSD web site for the > sake of the other G400 users. > > Regards, > Marc This is what I recall (I think it's a (fairly) complete list): (note that the RCS DRI sources are not completely nessecary, as it is just more-recent code) ** compile & install instructions for G400 dri ** * You need: FreeBSD 4.1 & XFree4.0.1 sources (I guess 4.0.0 will do just fine, but haven't had experience with that) * When having compiled & installed XFree, move to xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel, where `Makefile.bsd' can be found. The SUBDIR line in this file specifies in which subdirectories sources should be built. XFree's standard is: SUBDIR = drm tdfx gamma Now, we want G400 accel, not whatever tdfx might be! So change it to: SUBDIR = drm mga gamma 'Kay. Not quite ready yet. Upon compilation, some files in the mga subdir (i.e. mga/mga_dma.c ) will not compile. This is due to some version checks in drmP.h which are not properly set (haven't submitted a bug to the dri team yet though). The following patch will correct it (just search through the drmP.h file and erase any version number checks for versions bigger than 500005): -- patch drmP.h 52c52,54 < #if __FreeBSD_version >= 500005 --- > /* #if __FreeBSD_version >= 500005 > #include <sys/taskqueue.h> > #endif */ 54d55 < #endif 56c57,59 < #if __FreeBSD_version >= 500006 --- > /* #if __FreeBSD_version >= 500006 > #define DRM_AGP > #endif */ 58d60 < #endif 520c522,524 < #if __FreeBSD_version >= 500005 --- > /* #if __FreeBSD_version >= 500005 > struct task task; > #endif */ 522d525 < #endif -- end patch Now everything should compile nicely. * Copy the kernel modules to /modules (these are: mga/mga.ko ; drm/drm.ko and gamma/gamma.ko although I don't know if gamma.ko is needed) * Edit /boot/loader.rc and add the lines: load agp load mga So that upon reboot, the new kernel modules are automatically loaded * Edit your /etc/X11/XF86Config: In the section "Module" add (if not already): Load "glx" Load "dri" And create a new section outside the "Module" section: Section "DRI" Mode 0666 EndSection But be advised that this will allow all users on the system to use dri. See the XFree docs for more info on changing the XF86Config file. * reboot, and you'll find some extra lines in your dmesg: Preloaded elf module "agp.ko" at 0xc03390ec. Preloaded elf module "mga.ko" at 0xc0339188. Preloaded elf module "drm.ko" at 0xc0339224. (drm is automatically loaded) drm0: <Matrox MGA G400 AGP graphics accelerator> mem 0xe2000000-0xe27fffff,0xe2800000-0xe2803fff,0xe6000000-0xe7ffffff irq 11 at device 0.0 on pci1 info: [drm] AGP at 0xe3000000 16MB info: [drm] Initialized mga 1.0.0 19991213 on minor 0 Note that the `pciX: <Matrox MGA G400 blablalballa>' should have changed to `drmX: blalblblablalb'.. When starting X, `/var/log/XFree86.0.log' should display some lines about drm: ("grep drm /var/log/XFree.0.log") (II) Loading sub module "drm" (II) LoadModule: "drm" (II) Loading /usr/X11R6/lib/modules/freebsd/libdrm.a (II) Module drm: vendor="The XFree86 Project" (II) MGA(0): [drm] bpp: 16 depth: 16 (II) MGA(0): [drm] Sarea 2176+624: 2800 (0): [drm] created "mga" driver at busid "PCI:1:0:0" (0): [drm] added 4096 byte SAREA at 0xc71fd000 (0): [drm] mapped SAREA 0xc71fd000 to 0x28251000 (0): [drm] framebuffer handle = 0xe6000000 (0): [drm] added 1 reserved context for kernel (II) MGA(0): [drm] Registers = 0xe2800000 [drm] drmAgpEnabled succeeded (II) MGA(0): [drm] calced backoffset: 0x3c1000 (II) MGA(0): [drm] added 31 65536 byte DMA buffers (II) MGA(0): [drm] Mga Dma Initialization start (II) MGA(0): [drm] Mga Dma Initialization done (II) MGA(0): [drm] Initialized Dma Engine (II) MGA(0): [drm] dma control initialized, using IRQ 11 (0): [drm] installed DRM signal handler * READY! * Debugging: haven't had that much trouble actually, but I forgot to check that some board in my PC had the same IRQ as my G400.. My NCR SCSI card also used irq11 and caused things to refuse working. Hope this is any help. Quite some credit should go to joeo@cracktown.com for this info.. Kind regards, -- Khamba Staring To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008291946.e7TJkss27835>