Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2002 16:38:57 -0400 (EDT)
From:      Joe O <joeo@cracktown.com>
To:        David Haworth <dave@fyonn.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ati radeon, dri and unreal tournament
Message-ID:  <20020807162050.I29600-100000@clubfoot.cracktown.com>
In-Reply-To: <20020807205652.7653deca.dave@fyonn.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Couple of things to look into...

Is your radeon.ko compiled with the linux ABI ioctl layer enabled?  I'm
not sure if there is a frob for that in the kernel config file or not.

Is the radeon_dri.so in /compat/linux/usr/X11R6/lib/modules/dri from a
matching version of XFree86.

There were some issues that have crept up in the generic XFree86 code for
opening the /dev/dri/cardx device that currently requires a custom version
of the linux card_dri.so's to work with the linuxulator.  (Has to do with
the device node being stat'ed, and judged to be incorrect, by the linux
binary, as the major number for the cardx device node is different between
freebsd and linux).

http://people.freebsd.org/~anholt/dri/ may have more information
available.


On Wed, 7 Aug 2002, David Haworth wrote:

> hiya folks
>
> well, I've just got an ati radeon 7500 and I want to use it in freebsd
> to perhaps plays a bit of unreal tournament or whatever. I'm not being
> all that successful atm.
>
> afaik I've done all the right things and glxinfo (as root) gives me this
> (with LIBGL_DEBUG=verbose)
>
> root@blink:~# glxinfo
> name of display: :0.0
> libGL: XF86DRIGetClientDriverName: 4.0.1 radeon (screen 0)
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> drmOpenByBusid: busid is PCI:1:0:0
> drmOpenDevice: minor is 0
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is 6, (OK)
> drmOpenByBusid: drmOpenMinor returns 6
> drmOpenByBusid: drmGetBusid reports PCI:1:0:0
> display: :0  screen: 0
> direct rendering: Yes
> server glx vendor string: SGI
> server glx version string: 1.2
> server glx extensions:
>     GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
> client glx vendor string: SGI
> client glx version string: 1.2
> client glx extensions:
>     GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
> GLX extensions:
>     GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
> OpenGL vendor string: VA Linux Systems, Inc.
> OpenGL renderer string: Mesa DRI Radeon 20010402 AGP 1x x86/MMX
> OpenGL version string: 1.2 Mesa 3.4.2
> OpenGL extensions:
>     GL_ARB_multitexture, GL_ARB_transpose_matrix, GL_EXT_abgr,
>     GL_EXT_blend_func_separate, GL_EXT_clip_volume_hint,
>     GL_EXT_compiled_vertex_array, GL_EXT_histogram, GL_EXT_packed_pixels,
>     GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_stencil_wrap,
>     GL_EXT_texture3D, GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
>     GL_EXT_texture_env_dot3, GL_EXT_texture_object, GL_EXT_texture_lod_bias,
>     GL_EXT_vertex_array, GL_MESA_window_pos, GL_MESA_resize_buffers,
>     GL_NV_texgen_reflection, GL_PGI_misc_hints, GL_SGIS_pixel_texture,
>     GL_SGIS_texture_edge_clamp
> glu version: 1.3
> glu extensions:
>     GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess
>
>    visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
>  id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
> ----------------------------------------------------------------------
> 0x23 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
> 0x24 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 Slow
> 0x25 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
> 0x26 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
> 0x27 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
> 0x28 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 Slow
> 0x29 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
> 0x2a 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
> root@blink:~#
>
>
> which tells me that dri is active.
>
> glx gears:
> root@blink:~# glxgears
> libGL: XF86DRIGetClientDriverName: 4.0.1 radeon (screen 0)
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> drmOpenByBusid: busid is PCI:1:0:0
> drmOpenDevice: minor is 0
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is 6, (OK)
> drmOpenByBusid: drmOpenMinor returns 6
> drmOpenByBusid: drmGetBusid reports PCI:1:0:0
> 2427 frames in 5.0 seconds = 485.400 FPS
>
>
> afaik that looks okay too. it seems to be telling me that everything is
> working and alright. however, when I run unreal tournament I get this:
>
> libGL: XF86DRIGetClientDriverName: 4.0.1 radeon (screen 0)
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/radeon_dri.so
> drmOpenByBusid: busid is PCI:1:0:0
> drmOpenDevice: minor is 0
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 1
> drmOpenDevice: node name is /dev/dri/card1
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 2
> drmOpenDevice: node name is /dev/dri/card2
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 3
> drmOpenDevice: node name is /dev/dri/card3
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 4
> drmOpenDevice: node name is /dev/dri/card4
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 5
> drmOpenDevice: node name is /dev/dri/card5
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 6
> drmOpenDevice: node name is /dev/dri/card6
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 7
> drmOpenDevice: node name is /dev/dri/card7
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 8
> drmOpenDevice: node name is /dev/dri/card8
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 9
> drmOpenDevice: node name is /dev/dri/card9
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 10
> drmOpenDevice: node name is /dev/dri/card10
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 11
> drmOpenDevice: node name is /dev/dri/card11
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 12
> drmOpenDevice: node name is /dev/dri/card12
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 13
> drmOpenDevice: node name is /dev/dri/card13
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> drmOpenDevice: minor is 14
> drmOpenDevice: node name is /dev/dri/card14
> drmOpenDevice: open result is -1, (No such device or address)
> drmOpenDevice: Open failed
> drmOpenByBusid: drmOpenMinor returns -6
> libGL error: failed to open DRM: Operation not permitted
> libGL error: reverting to (slow) indirect rendering
>
> and then the game goes into mesa rendering, which kinda sucks in comparison :)
>
> am I missing something obvious here?
>
> root@blink:~# ll /dev |grep dri
> drwxrwxrwx   2 root  wheel          512 Aug  7 20:23 dri
>
> root@blink:~# ll /dev/dri
> total 0
> crw-r-----  1 root  wheel  145,   0 Aug  7 20:23 card0
>
> those are the permissions of the dri entries in dev (that I am aware of) and those look okay
>
> root@blink:~# kldstat
> Id Refs Address    Size     Name
>  1    4 0xc0100000 2c75bc   kernel
>  2    1 0xc03c8000 18554    linux.ko
>  3    1 0xc03e1000 a458     agp.ko
>  4    1 0xc23e2000 13000    radeon.ko
>
> that looks okay to me.
>
> <quick config change and reboot>
>
> hmm.. I remembered that I had COMPAT_LINUX compiled into my kernel so I
> removed the entry in /boot/loader.conf for "linux_load" but that made no
> difference.
>
> does anyone have any idea's for me?
>
> cheers
> dave
>
> PS: dmesg follows
>
> Copyright (c) 1992-2002 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>         The Regents of the University of California. All rights reserved.
> FreeBSD 4.6-STABLE #6: Sun Jul 28 15:12:28 BST 2002
>     dave@blink.**.**:/usr/obj/usr/src/sys/BLINK
> Timecounter "i8254"  frequency 1193182 Hz
> CPU: AMD Athlon(TM) XP 2000+ (1666.20-MHz 686-class CPU)
>   Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
>   Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
>   AMD Features=0xc0400000<AMIE,DSP,3DNow!>
> real memory  = 536854528 (524272K bytes)
> avail memory = 518455296 (506304K bytes)
> Preloaded elf kernel "kernel" at 0xc03d4000.
> Preloaded elf module "agp.ko" at 0xc03d409c.
> Pentium Pro MTRR support enabled
> md0: Malloc disk
> Using $PIR table, 11 entries at 0xc00f2050
> npx0: <math processor> on motherboard
> npx0: INT 16 interface
> pcib0: <Host to PCI bridge> on motherboard
> pci0: <PCI bus> on pcib0
> agp0: <VIA Generic host to PCI bridge> mem 0xe0000000-0xe3ffffff at device 0.0 on pci0
> pcib1: <PCI to PCI bridge (vendor=1106 device=b099)> at device 1.0 on pci0
> pci1: <PCI bus> on pcib1
> pci1: <ATI model 5157 graphics accelerator> at 0.0 irq 11
> pcm0: <CMedia CMI8738> port 0xb800-0xb8ff irq 10 at device 5.0 on pci0
> pci0: <unknown card> (vendor=0x104c, dev=0x8026) at 7.0 irq 10
> uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 9 at device 9.0 on pci0
> usb0: <VIA 83C572 USB controller> on uhci0
> usb0: USB revision 1.0
> uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> umass0: Hagiwara Sys-Com SmartMedia R/W, rev 1.10/2.00, addr 2
> umass0: Get Max Lun not supported (STALLED)
> uhci1: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 11 at device 9.1 on pci0
> usb1: <VIA 83C572 USB controller> on uhci1
> usb1: USB revision 1.0
> uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub1: 2 ports with 2 removable, self powered
> pci0: <USB controller> at 9.2 irq 10
> wi0: <Intersil Prism2.5> mem 0xcf000000-0xcf000fff irq 9 at device 12.0 on pci0
> wi0: 802.11 address: 00:05:5d:5c:39:c2
> wi0: using RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)
> wi0: Intersil Firmware: Primary 1.00.05, Station 1.03.04
> xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xa800-0xa87f mem 0xcc000000-0xcc00007f irq 11 at device 13.0 on pci0
> xl0: Ethernet address: 00:50:da:2e:5f:e6
> miibus0: <MII bus> on xl0
> xlphy0: <3c905C 10/100 internal PHY> on miibus0
> xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> aac0: <Dell PERC 2/QC> port 0xa400-0xa4ff mem 0xcb800000-0xcb801fff irq 5 at device 15.0 on pci0
> aac0: StrongARM SA110 233MHz, 64MB cache memory, required battery present
> aac0: Kernel 2.7-0, Build 3153, S/N 5c7a99
> adv0: <AdvanSys ASC3030/50 SCSI controller> port 0xa000-0xa0ff mem 0xcb000000-0xcb0000ff irq 9 at device 16.0 on pci0
> adv0: AdvanSys Ultra SCSI Host Adapter, SCSI ID 7, queue depth 16
> isab0: <PCI to ISA bridge (vendor=1106 device=3147)> at device 17.0 on pci0
> isa0: <ISA bus> on isab0
> atapci0: <VIA 8233 ATA133 controller> port 0x9800-0x980f irq 0 at device 17.1 on pci0
> ata0: at 0x1f0 irq 14 on atapci0
> ata1: at 0x170 irq 15 on atapci0
> uhci2: <VIA 83C572 USB controller> port 0x9400-0x941f irq 9 at device 17.2 on pci0
> usb2: <VIA 83C572 USB controller> on uhci2
> usb2: USB revision 1.0
> uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub2: 2 ports with 2 removable, self powered
> uhci3: <VIA 83C572 USB controller> port 0x9000-0x901f irq 9 at device 17.3 on pci0
> usb3: <VIA 83C572 USB controller> on uhci3
> usb3: USB revision 1.0
> uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub3: 2 ports with 2 removable, self powered
> orm0: <Option ROMs> at iomem 0xc0000-0xcbfff,0xcc000-0xcffff,0xd0000-0xd3fff on isa0
> fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
> fdc0: FIFO enabled, 8 bytes threshold
> atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
> atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
> kbd0 at atkbd0
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: model IntelliMouse Explorer, device ID 4
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
> sio0: type 16550A
> sio1 at port 0x2f8-0x2ff irq 3 on isa0
> sio1: type 16550A
> ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
> ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
> ppc0: FIFO with 16/16/9 bytes threshold
> lpt0: <Printer> on ppbus0
> lpt0: Interrupt-driven port
> ppi0: <Parallel I/O> on ppbus0
> plip0: <PLIP network interface> on ppbus0
> ad1: 13029MB <Maxtor 91366U4> [26473/16/63] at ata0-slave UDMA66
> Waiting 2 seconds for SCSI devices to settle
> aacd0: <Volume> on aac0
> aacd0: 34808MB (71286784 sectors)
> Mounting root from ufs:/dev/aacd0s1a
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <HAGIWARA SmartMedia R/W 2.00> Removable Direct Access SCSI-2 device
> da0: 650KB/s transfers
> da0: Attempt to query device size failed: NOT READY, Medium not present
> drm0: <ATI Radeon QW 7500 (AGP)> port 0xd800-0xd8ff mem 0xce000000-0xce00ffff,0xd0000000-0xdfffffff irq 11 at device 0.0 on pci1
> info: [drm] AGP at 0xe0000000 64MB
> info: [drm] Initialized radeon 1.1.1 20010405 on minor 0
> cd0 at adv0 bus 0 target 3 lun 0
> cd0: <PLEXTOR CD-R   PX-R820T 1.08> Removable CD-ROM SCSI-2 device
> cd0: 10.000MB/s transfers (10.000MHz, offset 8)
> cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
> (END)
>
>
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


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?20020807162050.I29600-100000>