Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xorg-server and cvs drm and mesa
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
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Dec 20, 2005 7:51 pm    Post subject: xorg-server and cvs drm and mesa Reply with quote

I have managed to get xorg-server running on my G4 with a ati 9600. I could use some help with drm.

My Xorg.log

Code:

(WW) RADEON(0): Enabling DRM support

        *** Direct rendering support is highly experimental for Radeon 9500
        *** and newer cards. The 3d mesa driver is not provided in this tree.
        *** A very experimental (and incomplete) version is available from Mesa CVS.
        *** Additional information can be found on http://r300.sourceforge.net
        *** This message has been last modified on 2005-08-07.

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci:0000:00:10.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: drmOpenMinor returns 6
drmOpenByBusid: drmGetBusid reports pci:0000:00:10.0
(II) RADEON(0): [drm] loaded kernel module for "radeon" driver
(II) RADEON(0): [drm] DRM interface version 1.2
(II) RADEON(0): [drm] created "radeon" driver at busid "pci:0000:00:10.0"
(II) RADEON(0): [drm] added 8192 byte SAREA at 0xf251d000
(II) RADEON(0): [drm] mapped SAREA 0xf251d000 to 0x3001c000
(II) RADEON(0): [drm] framebuffer handle = 0xb8000000
(II) RADEON(0): [drm] added 1 reserved context for kernel
(II) RADEON(0): [agp] Mode 0x07000201 [AGP 0x106b/0x0034; Card 0x1002/0x4e50]
(II) RADEON(0): [agp] 8192 kB allocated with handle 0x00000001
(II) RADEON(0): [agp] ring handle = 0x00000000
(II) RADEON(0): [agp] Ring mapped at 0x340c8000
(II) RADEON(0): [agp] ring read ptr handle = 0x00101000
(II) RADEON(0): [agp] Ring read ptr mapped at 0x3001e000
(II) RADEON(0): [agp] vertex/indirect buffers handle = 0x00102000
(II) RADEON(0): [agp] Vertex/indirect buffers mapped at 0x341c9000
(II) RADEON(0): [agp] GART texture map handle = 0x00302000
(II) RADEON(0): [agp] GART Texture map mapped at 0x343c9000
(II) RADEON(0): [drm] register handle = 0xb0000000
(II) RADEON(0): [dri] Visual configs initialized
(II) RADEON(0): Depth moves disabled by default
(II) RADEON(0): CP in BM mode
(II) RADEON(0): Using 8 MB GART aperture
(II) RADEON(0): Using 1 MB for the ring buffer
(II) RADEON(0): Using 2 MB for vertex/indirect buffers
(II) RADEON(0): Using 5 MB for GART textures
(II) RADEON(0): Memory manager initialized to (0,0) (1280,8191)
(II) RADEON(0): Reserved area from (0,854) to (1280,856)
(II) RADEON(0): Largest offscreen area available: 1280 x 7335
(II) RADEON(0): Will use back buffer at offset 0x8ce000
(II) RADEON(0): Will use depth buffer at offset 0xae4000
(II) RADEON(0): Will use 52224 kb for textures at offset 0xd00000
(II) RADEON(0): Render acceleration unsupported on Radeon 9500/9700 and newer.
(II) RADEON(0): Render acceleration disabled
(II) RADEON(0): Using XFree86 Acceleration Architecture (XAA)
        Screen to screen bit blits
        Solid filled rectangles
        8x8 mono pattern filled rectangles
        Indirect CPU to Screen color expansion
        Solid Lines
        Scanline Image Writes
        Offscreen Pixmaps
        Setting up tile and stipple cache:
                32 128x128 slots
                32 256x256 slots
                16 512x512 slots
(II) RADEON(0): Acceleration enabled
(**) RADEON(0): Option "BackingStore" "true"
(**) RADEON(0): Backing store enabled
(==) RADEON(0): Silken mouse enabled
(II) RADEON(0): Using hardware cursor (scanline 856)
(II) RADEON(0): Largest offscreen area available: 1280 x 7328
(**) Option "dpms"
(**) RADEON(0): DPMS enabled
(II) RADEON(0): No video input capabilities detected and no information is provided - disabling multimedia i2c
(II) Loading sub module "theatre_detect"
(II) LoadModule: "theatre_detect"
(II) Loading /usr/lib/xorg/modules/multimedia/theatre_detect_drv.so
(II) Module theatre_detect: vendor="X.Org Foundation"
        compiled for 4.3.99.902, module version = 1.0.0
        ABI class: X.Org Video Driver, version 0.8
(II) RADEON(0): no multimedia table present, disabling Rage Theatre.
(II) RADEON(0): X context handle = 0x1
(II) RADEON(0): [drm] installed DRM signal handler
(II) RADEON(0): [DRI] installation complete
(II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers
(II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers
(II) RADEON(0): [drm] dma control initialized, using IRQ 48
(II) RADEON(0): [drm] Initialized kernel GART heap manager, 5111808
(II) RADEON(0): Direct rendering enabled
(==) RandR enabled
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension LBX
(II) Initializing built-in extension XC-APPGROUP
(II) Initializing built-in extension SECURITY
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension XFree86-Bigfont
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing built-in extension XEVIE


and my dmesg

Code:
[drm] Initialized drm 1.0.1 20051102
[drm] Initialized radeon 1.20.0 20050911 on minor 0:
[drm] Used old pci detect: framebuffer loaded
agpgart: Putting AGP V2 device at 0000:00:0b.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:00:10.0 into 1x mode
[drm] Loading R300 Microcode


It *looks* like I should have support by these logs. Does anyone see anything that may be preventing me from running glxinfo ?
Code:
Lappy dashnu # glxinfo
glxinfo: symbol lookup error: /usr/lib/opengl/mesa-cvs/lib/libGL.so.1: undefined symbol: gl_dispatch_functions_start


I update the cvs code today and rebuilt after I built the latest xorg

I used this guide to build the cvs code. The only thing I changed was 'make linux-dri-x86' to 'make linux-dri-ppc' This code seems to build however the warnings were high.

Has anyone else had any luck with this in ppc land.. Am I wasting my time trying to get this experimental code working? Any ideas why this may not be working?

Any other needed info from me let me know.. I would love to get this working.
_________________
write quit bang
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Sat Dec 31, 2005 5:24 pm    Post subject: Reply with quote

Why are you using CVS? Just use the mesa package in portage, and whatever the latest x11-drm is (probably also hard-masked).
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Mon Jan 02, 2006 1:02 pm    Post subject: Reply with quote

I thought the mesa in portage did not support the r300 cards. The Xorg.log says so when starting X.

Code:
*** Direct rendering support is highly experimental for Radeon 9500
        *** and newer cards. The 3d mesa driver is not provided in this tree.
        *** A very experimental (and incomplete) version is available from Mesa CVS.
        *** Additional information can be found on http://r300.sourceforge.net
        *** This message has been last modified on 2005-08-07.


I will update today and see what I end up with.

Thanks
_________________
write quit bang
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Mon Jan 02, 2006 6:58 pm    Post subject: Reply with quote

I'm using it on my 9600. That message is incorrect if it's coming from modular X.

Code:
donnie@supernova ~ $ equery files mesa | grep r300
/usr/lib/xorg/modules/dri/r300_dri.so
Back to top
View user's profile Send private message
tomasino
Apprentice
Apprentice


Joined: 11 Feb 2004
Posts: 154
Location: Italy, Bologna

PostPosted: Tue Jan 03, 2006 6:23 pm    Post subject: Reply with quote

Spyderous, since I moved to xorg-7 ebuild I'm no more able to use r300 driver from cvs. I've always used them with previous version. How to do it?
Does eselect opengl still matter with new ebuilds?

Thanks in advance
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Tue Jan 03, 2006 7:33 pm    Post subject: Reply with quote

tomasino wrote:
Spyderous, since I moved to xorg-7 ebuild I'm no more able to use r300 driver from cvs. I've always used them with previous version. How to do it?
Does eselect opengl still matter with new ebuilds?

Thanks in advance

Why do you want to use r300 from CVS? Mesa 6.4.1 is pretty solid.

You may be putting it in the wrong place -- /usr/lib/xorg/modules/dri is where it should be, not in /usr/lib/modules/dri.

Yes eselect opengl matters, but it should be on xorg-x11 by default anyway.
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Jan 03, 2006 8:00 pm    Post subject: Reply with quote

yup, portage mesa and x11-drm works for me. I still get the above comment in the log.

Glxgears throws up some strange messages though.

Code:
dashnu@Lappy ~ $ glxgears
*********************************WARN_ONCE*********************************
File r300_state.c function r300Enable line 456
TODO - double side stencil !
***************************************************************************
No ctx->FragmentProgram._Current!!
*********************************WARN_ONCE*********************************
File r300_render.c function r300_get_num_verts line 188
user error: Need more than 2 vertices to draw primitive QS !
***************************************************************************
9498 frames in 5.0 seconds = 1899.529 FPS
9225 frames in 5.0 seconds = 1844.859 FPS
9142 frames in 5.0 seconds = 1828.345 FPS


Having some issues with fonts also. OpenOffice does not want to use my system fonts. Same goes for Firefox. The firefox fonts in the menus are so small i can not read them however the web pages are viewed properly. If I change my Display resolution to 72dpi from 96dpi the menu fonts are fine but webpages are Huge.
_________________
write quit bang
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Wed Jan 04, 2006 2:24 am    Post subject: Reply with quote

dashnu wrote:
yup, portage mesa and x11-drm works for me. I still get the above comment in the log.

Glxgears throws up some strange messages though.

Code:
dashnu@Lappy ~ $ glxgears
*********************************WARN_ONCE*********************************
File r300_state.c function r300Enable line 456
TODO - double side stencil !
***************************************************************************
No ctx->FragmentProgram._Current!!
*********************************WARN_ONCE*********************************
File r300_render.c function r300_get_num_verts line 188
user error: Need more than 2 vertices to draw primitive QS !
***************************************************************************
9498 frames in 5.0 seconds = 1899.529 FPS
9225 frames in 5.0 seconds = 1844.859 FPS
9142 frames in 5.0 seconds = 1828.345 FPS

Yeah, don't worry about those.

dashnu wrote:
Having some issues with fonts also. OpenOffice does not want to use my system fonts. Same goes for Firefox. The firefox fonts in the menus are so small i can not read them however the web pages are viewed properly. If I change my Display resolution to 72dpi from 96dpi the menu fonts are fine but webpages are Huge.

A lot of apps can't deal properly with non-default dpi settings.
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 449
Location: Paris, France

PostPosted: Sat Jan 14, 2006 9:47 pm    Post subject: Reply with quote

dashnu, it seems I am on your track, so maybe you could help me by telling me more about your experience.
Are you still using the modular x11 ? What did you compile from the cvs and what package did you add ?

This would be very helpful for me.... :)
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Jan 17, 2006 2:59 pm    Post subject: Reply with quote

xavier10 wrote:
dashnu, it seems I am on your track, so maybe you could help me by telling me more about your experience.
Are you still using the modular x11 ? What did you compile from the cvs and what package did you add ?

This would be very helpful for me.... :)


I use nothiing from cvs now. Yes, I am still using modular xorg.

[ebuild R ] sys-kernel/gentoo-sources-2.6.15-r1 (with out DRM compiled in. the next pkg handles it)
[ebuild R ] x11-base/x11-drm-20051223

Try out that let me know if you have any troubles, I will try to help.
_________________
write quit bang
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 449
Location: Paris, France

PostPosted: Tue Jan 17, 2006 3:21 pm    Post subject: Reply with quote

Thanks for the help dashnu.
Basically, I have a slightly older kernel and I have DRM compiled as a module:
Code:

linux $ egrep DRM .config
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set


I will emerge and compile the newer kernel. Shall I remove DRM module ?
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Jan 17, 2006 3:38 pm    Post subject: Reply with quote

yea remove kernel DRM build the kernel then emerge x11-drm that will install the working kernel modules.
_________________
write quit bang
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 449
Location: Paris, France

PostPosted: Tue Jan 17, 2006 5:36 pm    Post subject: Reply with quote

Thanks for your help
Ok, I have just done this. I am running sys-kernel/gentoo-sources-2.6.15-r1 now, with the same version of x11-drm.
I have disabled the DRM module in the kernel and emerged x11-drm over it. I have experimented around the DRM, AGP kernel options with no success.

However, I still have the same problems:
- xorg reports some error (below) and the disabling of dri
- glxinfo fails with the error "undefined symbol: glFinish", if I use the "mesa-cvs" implementation of opengl
- glxinfo reports no DRI with xorg-x11 implementation of opengl (I was expecting this).

Here is some portion of my xorg.log related to the error
Code:

((II) Module radeon: vendor="X.Org Foundation"
        compiled for 7.0.0, module version = 4.0.3
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 0.8
(WW) ****INVALID IO ALLOCATION**** b: 0xf0000400 e: 0xf00004ff correcting^G
(EE) end of block range 0xefffffff < begin 0xf0000000
(II) window:
        [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
...
(EE) RADEON(0): [agp] AGP failed to initialize. Disabling the DRI.
...


Here are my questions now:
- shall I also disable AGP in the kernel ? I guess I need to keep it (no module replaces it) but I will test (if someone can give me a firm answer, I would still be happier)
- am I right to select the mesa-cvs implementation of opengl ? (the one I did check out from the CVS)
- is the following section of my xorg.conf alright ?
Code:

Section "Module"
        Load  "extmod"
        Load        "glx"   # libglx.a
        Load        "dri"   # libdri.a
        Load        "drm"   # libdrm.a
        Load  "dbe"
        Load  "record"
        Load  "xtrap"
        Load  "type1"
EndSection

- is my lsmod alright ?
Code:

 $ lsmod
Module                  Size  Used by
ppp_synctty            10112  0
ppp_async              11360  1
crc_ccitt               1792  1 ppp_async
ppp_generic            30100  6 ppp_synctty,ppp_async
slhc                    6016  1 ppp_generic
radeon                118152  0
drm                    77084  1 radeon
agpgart                31100  1 drm
snd_pcm_oss            57728  0
snd_mixer_oss          18880  1 snd_pcm_oss
snd_seq_dummy           2948  0
snd_seq_oss            37396  0
snd_seq_midi_event      6560  1 snd_seq_oss
snd_seq                56888  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          8076  3 snd_seq_dummy,snd_seq_oss,snd_seq
i2c_keywest             9568  0
snd_powermac           44000  0
snd_pcm                89924  2 snd_pcm_oss,snd_powermac
snd_timer              22852  2 snd_seq,snd_pcm
snd                    57012  8 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_powermac,snd_pcm,snd_timer
soundcore               8420  1 snd
snd_page_alloc          9064  1 snd_pcm
hfsplus                81892  0
usb_storage            36964  0
scsi_mod               98916  1 usb_storage
sungem                 32164  0
sungem_phy              9504  1 sungem
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Jan 17, 2006 5:53 pm    Post subject: Reply with quote

You want to use the mesa in portage..

Code:
*  media-libs/mesa
      Latest version available: 6.4.1-r1
      Latest version installed: 6.4.1-r1
      Size of downloaded files: 2,845 kB
      Homepage:    http://mesa3d.sourceforge.net/
      Description: OpenGL-like graphic library for Linux
      License:     LGPL-2

*  x11-apps/mesa-progs
      Latest version available: 6.4.1
      Latest version installed: 6.4.1
      Size of downloaded files: 3,645 kB
      Homepage:    http://mesa3d.sourceforge.net/
      Description: Mesa's OpenGL utility and demo programs
      License:     LGPL-2


I have a 15 inch powerbook and for agp I use the following in the .config

Code:
Lappy bin # cat /usr/src/linux/.config | grep AGP
CONFIG_AGP=y
CONFIG_AGP_UNINORTH=y


some part of my xorg.conf

Modules
Code:
Section "Module"
        Load    "extmod"
        Load    "dri"
        Load    "dbe"
        Load    "record"
        Load    "glx"
        Load    "drm"
        Load    "type1"
        Load    "freetype"
        Load    "fbdevhw"
EndSection


Device
Code:
Section "Device"
        Identifier      "Card0"
        ### Available Driver options:
        Option "ColorTiling" "false"  # True has trouble with latest xorg
        Option "BackingStore" "true"  # Increases performance
        Option "EnablePageFlip" "true" # Increases performance
        #Option "SWcursor"      "false" # Use Software Cursor
        #Option "NoAccel"       "false" # Disable Hardware Acceleration
        #Option "AGPMode"       "1"     # Set AGP data transfer rate, DRI only
        #Option "AGPFastWrite" "false" # Use AGP Fast Write, DRI only
        #Option "RenderAccel" "true"  # Hardware acceleration
        #Option "DCCMode"       "false" # Use querried modes from monitor
        #Option "MonitorLayout" "TMDS" # Enable this for Apple DVI LCDs
        ### See "man radeon" for additional options
        Option  "UseFBDev"      "False"
        Driver  "radeon"
        BusID   "PCI:0:16:0"
EndSection


This next snip I am not sure if it is needed ..

Code:
Section "dri"
      Mode 0666
EndSection


my lsmod
Code:
Module                  Size  Used by
radeon                121768  1
drm                    86684  2 radeon


maybe make sure you remove all mesa-cvs from you kernels lib/moduals dir.. if you re-built it.

Sounds like your agp is not correct. Once you get by this I bet it will work for you.
_________________
write quit bang
Back to top
View user's profile Send private message
xavier10
Guru
Guru


Joined: 19 Jan 2004
Posts: 449
Location: Paris, France

PostPosted: Tue Jan 17, 2006 7:41 pm    Post subject: Reply with quote

Ok, so after quite a few kernel recompilations and emerges (and mistakes of my part causing kernel recompilations or re-emerges), I got it working!!! :D :D :D
Thanks dashnu, you were most helpful in this track!!! Only problem, my powerbook is mewing while I run glxgears, gut at least I get the right fps:
Code:

$ glxgears
*********************************WARN_ONCE*********************************
File r300_state.c function r300Enable line 456
TODO - double side stencil !
***************************************************************************
No ctx->FragmentProgram._Current!!
*********************************WARN_ONCE*********************************
File r300_render.c function r300_get_num_verts line 188
user error: Need more than 2 vertices to draw primitive QS !
***************************************************************************
5640 frames in 5.0 seconds = 1127.866 FPS
6082 frames in 5.0 seconds = 1216.386 FPS

Happy! (except for the mewing)
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