Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOW-TO: ProSavage, SuperSavage DDR and dri-drm 3d drivers
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sabrex
n00b
n00b


Joined: 28 Nov 2003
Posts: 45

PostPosted: Thu Oct 14, 2004 1:05 am    Post subject: Re: great Reply with quote

alwayzamd wrote:
Great. I'm glad to see it's working. I am having the same trouble building mesa though... could you be a little more thourogh on what you appended to that file? I am not sure how the trees are built, so I would be digging for hours - just easier to ask ;-) Thanks. Also, does anyone have any idea if the driver developer will ever add acceleration for the xrender extension so we can have some nice high speed eye candy?

T.J.


Well, I didn't append anything ... in the section I mentioned, it says to set the savage directory, etc so that only specific parts are built. Instead of just putting 'savage' you would want to put the full path to the savage directory... eg. /root/downloads/this/way/to/savage

I hope that helps. Not sure how else to say it I'm afraid :?
Back to top
View user's profile Send private message
IamBorg
Tux's lil' helper
Tux's lil' helper


Joined: 05 Nov 2003
Posts: 86

PostPosted: Sat Oct 16, 2004 11:13 pm    Post subject: Reply with quote

I have had partial success. I haven't been able to get Xorg to say that it's using savage's DRI. glxinfo has Direct Rendering: No. However, dmesg says
Quote:
[drm] Initialized savage 1.0.0 20011023 on minor 0: S3 Inc. VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)
[drm] Used old pci detect: framebuffer loaded


The steps I took
Code:
Add line VIDEO_CARDS=savage to make.conf
echo x11-base/x11-drm  ~x86  >> /etc/portage/package.keywords
emerge x11-drm
Add line savage to /etc/modules.autoload.d/kernel-2.6
modprobe savage and/or reboot

BTW The version of x11-drm = 20040827.

As far as I can tell, my xorg.conf is set up appropriately.
Quote:
cat /var/log/Xorg.0.log | grep dri
(II) LoadModule: "dri"
(II) Loading /usr/X11R6/lib/modules/extensions/libdri.a
(II) Module dri: vendor="X.Org Foundation"
ABI class: XFree86 XInput driver, version 0.3
(II) Loading /usr/X11R6/lib/modules/drivers/savage_drv.o
ABI class: X.Org XInput driver, version 0.4
ABI class: X.Org XInput driver, version 0.4
(II) SAVAGE: driver (version 1.1.27) for S3 Savage chipsets: Savage4,


I do not have a device /dev/dri. I am running linux-2.6.8-gentoo-r10, udev, Xorg 6.8.0-r1. I am curious if there is something that I'm missing...
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Sun Oct 17, 2004 9:21 am    Post subject: Reply with quote

you need (Xorg + DRI) CVS, 6.8.0 release has NO savage dri support.

Please follow the link from last page that I posted for building instructions.

you do NOT need to add savage to autoload, if Xorg DRI is working, X will request for the device then kernel should autoload it properly.
Back to top
View user's profile Send private message
IamBorg
Tux's lil' helper
Tux's lil' helper


Joined: 05 Nov 2003
Posts: 86

PostPosted: Wed Oct 27, 2004 5:41 am    Post subject: Reply with quote

Well, I compiled xorg-x11-6.8.0-r2 with the flags dri, glx, and insecure-drivers. I have /usr/lib/modules/dri/savage_dri.so. Also, when I modprobe savage, the /dev/dri/card0 comes into existence. I can do dristat and it gives me info. Unfortunately, I still do not have direct rendering. Also, right now, my X server crashes when trying to do a glxgears or xscreensaver. I did have to put the symlink in to /usr/lib/modules/extensions/libglx.a -> /usr/lib/opengl/xorg-x11/extensions/libglx.a. Does anybody have any suggestions for me to look into?
Back to top
View user's profile Send private message
z_sfeng
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 154
Location: Finland

PostPosted: Tue Nov 02, 2004 5:34 pm    Post subject: DRI back to work Reply with quote

the latest savage dri works again for my savage IX or xorg 6.8.0-r2.
I just use the binary snapshot 20041101. I got 370fps on glxgear :) not bad.

Try binary snapshot is a good idea. It only takes minutes to test...
Back to top
View user's profile Send private message
kpoman
Apprentice
Apprentice


Joined: 15 May 2003
Posts: 209
Location: Buenos Aires, Argentina

PostPosted: Tue Nov 02, 2004 8:07 pm    Post subject: Reply with quote

could you please explain a bit more what you did ?
i tried compiling the drm package ==> no luck, not compatible with 2.6.9
i tried compiling xorg 6.8.0r2 ==> had many problems

what would be the steps to get it working ? what are the tests to diagnose problems ?
_________________
please, help me, pity on me :'(
Back to top
View user's profile Send private message
z_sfeng
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 154
Location: Finland

PostPosted: Tue Nov 02, 2004 8:55 pm    Post subject: Reply with quote

I already have nitro-2.6.9-r2 and xorg-6.8.0-r2 runing. Then I just visited the dri binary snapshothttp://dri.sourceforge.net/cgi-bin/moin.cgi/Download#head-55420c59a1c2e9a70f07a6fa02f0d228ffb87b76, and downloaded the latest snapshot
http://www.freedesktop.org/~dri/snapshots/
Download both the common and savage tarball. Decompress first common, then savage to same folder, and run
Code:
./install

The 20041028 tarball doesn't work for me, 20041101 works. The 20041102 just comes out today, maybe you can also try that--anyway, using binary installation is very fast.
I didn't try to compile CVS sources, since the binary just works for me without problem. Don't compile, just try to install from binary.
Back to top
View user's profile Send private message
dom_
n00b
n00b


Joined: 30 Apr 2004
Posts: 50

PostPosted: Tue Nov 23, 2004 7:36 pm    Post subject: Reply with quote

I just switched from mdk 9.2 to gentoo on my laptop after months using gentoo on my workstation. After a try of quasi-all xorg/x11-drm xorg/cvs-drm in there without success, i just use this tuto with the cvs and it worked fine http://dri.sourceforge.net/cgi-bin/moin.cgi/Building .

Output of glxinfo:
Code:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
    GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
    GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIS_multisample,
    GLX_SGIX_visual_select_group
OpenGL vendor string: S3 Graphics Inc.
OpenGL renderer string: Mesa DRI SAVAGE Linux_1.1.18
OpenGL version string: 1.2 Mesa 6.3
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_env_add,
    GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra,
    GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
    GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array, GL_EXT_convolution,
    GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_histogram,
    GL_EXT_packed_pixels, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
    GL_EXT_separate_specular_color, GL_EXT_subtexture, GL_EXT_texture,
    GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
    GL_APPLE_packed_pixels, GL_IBM_rasterpos_clip, GL_MESA_window_pos,
    GL_NV_light_max_exponent, GL_NV_texgen_reflection, GL_OES_read_format,
    GL_SGI_color_matrix, GL_SGI_color_table, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod

   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
----------------------------------------------------------------------
0x22 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x23 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x24 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x25 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x26 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x27 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x28 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x29 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow


And after an eternity of 100-120fps with glxgears, here is the new frame rate from glxgears is :
Code:

1777 frames in 5.0 seconds = 355.295 FPS
1762 frames in 5.0 seconds = 351.984 FPS
1773 frames in 5.0 seconds = 354.534 FPS
1755 frames in 5.0 seconds = 350.972 FPS
1755 frames in 5.0 seconds = 350.848 FPS
1766 frames in 5.0 seconds = 353.073 FPS
1762 frames in 5.0 seconds = 352.353 FPS
1762 frames in 5.0 seconds = 352.269 FPS


@+
dom

PS:
Before i was using:
x11-base/opengl-update-1.8.1-r1
x11-base/xorg-x11-6.8.0-r3
x11-base/x11-drm-4.3.0-r7 and x11-base/x11-drm-20040827 and drm-2004-08-05 ....

Now i'm using:
No opengl-update
xorg cvs 23 november 2004 (latest Changelog 2004-11-23 Alex Deucher)
Mesa cvs 23 november 2004
drm cvs 23 november 2004
Back to top
View user's profile Send private message
matthias as
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2004
Posts: 145
Location: Altenstadt / Iller

PostPosted: Sun Dec 05, 2004 11:49 am    Post subject: Reply with quote

Hello

i did

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login
on passwd hit enter
cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co -r savage-2-0-0-branch xc
in the directory where u downloaded the cvs version of x go in xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel

and

make -f Makefile.linux

then it appears an error ....

Code:

bash-2.05b# make -f Makefile.linux
+ ln -s ../../../shared/drm/kernel/drm_sarea.h drm_sarea.h
+ ln -s ../../../shared/drm/kernel/mga.h mga.h
+ ln -s ../../../shared/drm/kernel/mga_dma.c mga_dma.c
+ ln -s ../../../shared/drm/kernel/mga_drm.h mga_drm.h
+ ln -s ../../../shared/drm/kernel/mga_drv.h mga_drv.h
+ ln -s ../../../shared/drm/kernel/mga_irq.c mga_irq.c
+ ln -s ../../../shared/drm/kernel/mga_state.c mga_state.c
+ ln -s ../../../shared/drm/kernel/mga_ucode.h mga_ucode.h
+ ln -s ../../../shared/drm/kernel/mga_warp.c mga_warp.c
+ ln -s ../../../shared/drm/kernel/r128.h r128.h
+ ln -s ../../../shared/drm/kernel/r128_drv.h r128_drv.h
+ ln -s ../../../shared/drm/kernel/r128_drm.h r128_drm.h
+ ln -s ../../../shared/drm/kernel/r128_cce.c r128_cce.c
+ ln -s ../../../shared/drm/kernel/r128_state.c r128_state.c
+ ln -s ../../../shared/drm/kernel/r128_irq.c r128_irq.c
+ ln -s ../../../shared/drm/kernel/radeon.h radeon.h
+ ln -s ../../../shared/drm/kernel/radeon_drv.h radeon_drv.h
+ ln -s ../../../shared/drm/kernel/radeon_drm.h radeon_drm.h
+ ln -s ../../../shared/drm/kernel/radeon_cp.c radeon_cp.c
+ ln -s ../../../shared/drm/kernel/radeon_irq.c radeon_irq.c
+ ln -s ../../../shared/drm/kernel/radeon_mem.c radeon_mem.c
+ ln -s ../../../shared/drm/kernel/radeon_state.c radeon_state.c
+ ln -s ../../../shared/drm/kernel/sis.h sis.h
+ ln -s ../../../shared/drm/kernel/sis_drv.h sis_drv.h
+ ln -s ../../../shared/drm/kernel/sis_drm.h sis_drm.h
+ ln -s ../../../shared/drm/kernel/sis_ds.c sis_ds.c
+ ln -s ../../../shared/drm/kernel/sis_ds.h sis_ds.h
+ ln -s ../../../shared/drm/kernel/sis_mm.c sis_mm.c
+ ln -s ../../../shared/drm/kernel/tdfx.h tdfx.h
rm -f linux
ln -s . linux
+ ln -s Makefile.linux Makefile
make -C /lib/modules/2.6.8.1/build  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.8.1'
  CC [M]  /cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o
In file included from /cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c:57:
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:41:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:48:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:55:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:62:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h: Infunction `gamma_vm_nopage':
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:133: error: structure has no member named `count'
make[2]: *** [/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o] Error 1
make[1]: *** [_module_/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8.1'
make: *** [modules] Error 2
bash-2.05b#
bash-2.05b# make -f Makefile.linux
make -C /lib/modules/2.6.8.1/build  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.8.1'
  CC [M]  /cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o
In file included from /cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c:57:
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:41:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:48:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:55:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:62:warning: initialization from incompatible pointer type
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h: Infunction `gamma_vm_nopage':
/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:133: error: structure has no member named `count'
make[2]: *** [/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o] Error 1
make[1]: *** [_module_/cvs/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8.1'
make: *** [modules] Error 2
bash-2.05b#

Back to top
View user's profile Send private message
headgap
n00b
n00b


Joined: 19 Nov 2004
Posts: 39
Location: between the ears

PostPosted: Fri Dec 17, 2004 12:09 am    Post subject: Reply with quote

i have here a Savage4 #9 card w/ 8Meg, 2.6.9-r9 kernel, 2.6
headers, xorg 6.8.0-r3, udev, and no direct rendering.

for the longest time i wasn't getting anything to work. then i built
cvs drm onto the system; now xorg logs show the 1.0.0 DRM
2001xxxx message.

dumb question: do i *need* 'insecure-drivers' enabled in xorg, to
support DRI? i can't seem to find an answer anywhere in either
forums nor google.

modprobe of savage *doesn't* create /dev/dri directory.
agpgart & via_agp are loaded by coldplug, no errors
no (EE) in xorg log (except one about xkb config)

cheers

(yes, i had to go futz with it: i had direct rendering under nvidia, 2
days ago; but i *had* to know which card was better...)
_________________
If at any time you find yourself on the side of the majority, it is time to reconsider your position - Mark Twain
Back to top
View user's profile Send private message
headgap
n00b
n00b


Joined: 19 Nov 2004
Posts: 39
Location: between the ears

PostPosted: Fri Dec 17, 2004 4:19 am    Post subject: Reply with quote

ok, i answered that one:

with 'insecure-drivers' compiled into xorg, now modprobe savage creates
/dev/dri. but no direct rendering yet. onwards...
_________________
If at any time you find yourself on the side of the majority, it is time to reconsider your position - Mark Twain
Back to top
View user's profile Send private message
headgap
n00b
n00b


Joined: 19 Nov 2004
Posts: 39
Location: between the ears

PostPosted: Fri Dec 17, 2004 5:03 am    Post subject: Reply with quote

found a page saying as per 11-23-04, eric anholt had 'turned over all the stable dri stuff to x.org', and that it was now in their cvs build. exceptions being savage, trident and a few others.
_________________
If at any time you find yourself on the side of the majority, it is time to reconsider your position - Mark Twain
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Tue Dec 28, 2004 9:13 pm    Post subject: Reply with quote

As xorg-6.8.1.901 is in portage now, I tried building it with "insecure-drivers" in USE (this should build savage and other drivers). I get a savage_dri.so, but no savage.ko as kernel module. How can I use savage-dri now?
Back to top
View user's profile Send private message
headgap
n00b
n00b


Joined: 19 Nov 2004
Posts: 39
Location: between the ears

PostPosted: Thu Dec 30, 2004 9:43 pm    Post subject: Reply with quote

c.f. my previous post:

'except savage, trident and a few others'

those drivers are still not part of the xorg 'stable' release; you'll need to fetch them out of the cvs snapshots.
_________________
If at any time you find yourself on the side of the majority, it is time to reconsider your position - Mark Twain
Back to top
View user's profile Send private message
philippeqc
n00b
n00b


Joined: 29 May 2004
Posts: 3

PostPosted: Fri Dec 31, 2004 12:24 pm    Post subject: Reply with quote

Hi,

First, the link http://dri.sourceforge.net/cgi-bin/moin.cgi/Building is no longer valid. Use http://dri.freedesktop.org/wiki/Building. Note that many of the instructions have changes, so be carefull not to mix old and new instructions.

Second, being extremely lazy, I've spend over 2 days coming up with a script to automate the procedure. I post it here for your convenience. I'd like to point out that it is my first real script, so constructive criticism is welcome.

You will probably have to configure the following variables: WRKFOLDER, DRIVER, {XF,DRI}DRIVERS, BUILDALLDRIVERS.

Also, the following are assumed:
-GNU/Linux (not BSD. Probably not a problem for the users of this forum),
-x86,
-32 bits architecture,
-xorg from the cvs (will overwrite your X libraries), NOT XFree
-linux kernel version 2.6
-assume that you are compiling for the current kernel,
-assume the kernel is in /usr/src/linux,
-assume at least make dep has been run on the kernel source (NOTA: I know make dep is a 2.4 command. I do not know what is the equivalent for 2.6, so do "make; make modules_install" to be on the safe side)
-need to be run as root/superuser who can install (I know its a big security risk, so do not trust my good intentions and read the script before executing),
-Does not change your X configuration file
-Does not register the modules to be loaded automatically
Please excuse my assuptions.

Also, the fetch operation for the host.def AND the patching to support some utils after the fetch are commented out as they didn't work for me.

Code:
#!/bin/bash

##########################################################
# A little script to compile and install the DRI from cvs
##########################################################

# The values that an user might want to change are
# WRKFOLDER,
# DRIVER,       most important, to define your card. Has to be defined
#         even if {XF,DRI}DRIVERS are set with different values
# {XF,DRI}DRIVERS, if the driver name differ for XF and DRI.
# BUILDALLDRIVERS 


# The driver to build
DRIVER="savage"

# Setting BUILDALLDRIVERS to non null will force compilation of all
# the other cards drivers, not just your own
#BUILDALLDRIVERS="YES"

# The name of the folder to be created for all the work procedure
WRKFOLDER="dri"

# Generating the full path with '\/' as delimiters for sed to accept
WRKPATH=`pwd`"/"$WRKFOLDER
WRKPATH_sedified=`pwd | sed -e "s:/:\\\\\/:g" `"\/"$WRKFOLDER

# Location of the Mesa directory
PATHMESA=${WRKPATH_sedified}'\/Mesa'
DEFMESA='#define MesaSrcDir'

# Location of the DRM directory
PATHDRM=${WRKPATH_sedified}'\/drm'
DEFDRM='#define DRMSrcDir'

# 2D drivers: XF86CardDrivers
DEFXFDRIVERS='#define XF86CardDrivers'
#XFDRIVERS="810 mga ati glint vga sis savage"
#XFDRIVERS="savage"
XFDRIVERS=$DRIVER

# DriDrivers
DEFDRIDRIVERS='#define DriDrivers'
#DRIDRIVERS="r200 mga i810 r128 radeon gamma i830 sis tdfx ffb savage"
#DRIDRIVERS="savage"
DRIDRIVERS=$DRIVER

# The configuration file to process so it support our configuration
HOSTFILE=${WRKPATH}'/xc/config/cf/host.def'
HOSTFILEORIG=${HOSTFILE}'.orig'

if [ ! -d $WRKFOLDER ]; then
    mkdir -p $WRKFOLDER
fi
cd $WRKPATH

# Before cvs, we need to overwrite a host.def modified by this script
# by a backup from previous cvs, in hope of getting all the proper
# update from cvs
if [ -e "${HOSTFILEORIG}" ] ; then
    echo "Restoring original host.def for update"
    cp $HOSTFILEORIG $HOSTFILE
fi

# Delete the configuration file to avoid confict during cvs operation
if [ -e "${HOSTFILE}" ] ; then
    rm $HOSTFILE
fi

# cvs operations
# Should have additional test for the CVS_PASSFILE environment variable
# You should know that this whole script spun from me dreading having to
# wait and press enter for the password as I thougt I had to re-run the login
# command at every pass.

if [ `cat ~/.cvspass | sed -e "/cvs\.freedesktop\.org/!d" -e "/\/cvs\/xorg/!d" | wc -l` = 0 ] ; then
    echo "You need to press Enter to allow for anonymous login"
    cvs -d:pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login
fi
if [ `cat ~/.cvspass | sed -e "/cvs\.freedesktop\.org/!d" -e "/\/cvs\/dri/!d" | wc -l` = 0 ] ; then
    echo "You need to press Enter to allow for anonymous login"
    cvs -d:pserver:anonymous@cvs.freedesktop.org:/cvs/dri login
fi
if [ `cat ~/.cvspass | sed -e "/dri\.freedesktop\.org/!d" -e "/\/cvs\/mesa/!d" | wc -l` = 0 ] ; then
    echo "You need to press Enter to allow for anonymous login"
    cvs -d:pserver:anonymous@cvs.freedesktop.org:/cvs/mesa login
fi

echo "Retreiving X.org"
if [ -d "xc" ] ; then
#cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri update -r savage-2-0-0-branch xc >& xc.log
    echo "=== Updating X.org ==="
    cvs -z3 -d:pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg update xc >& cvs.xc.log
else
    echo "=== Checking out X.org ==="
    cvs -z3 -d:pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co xc >& cvs.xc.log
fi

echo "Retreiving DRM"
if [ -d "drm" ] ; then
    echo "=== Updating DRM ==="
    cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/cvs/dri update drm >& cvs.drm.log
else
    echo "=== Checking out DRM ==="
    cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/cvs/dri co drm >& cvs.drm.log
fi

echo "Retreiving Mesa"
if [ -d "Mesa" ] ; then
    echo "=== Update Mesa ==="
    cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/cvs/mesa update Mesa >& cvs.mesa.log
else   
    echo "=== Checking out Mesa ==="
    cvs -z3 -d:pserver:anonymous@cvs.freedesktop.org:/cvs/mesa co Mesa >& cvs.mesa.log
fi

#************************************************************
# Get a config file that set up a trimed down build of Xserver
#************************************************************
#
# HACK: removed, didn't work for me. YMMV
#
#cd ${WRKPATH}'/xc/config/cf'
#echo "Retreiving trimed down config"
#rm host.def
#wget http://freedesktop.org/~fxkuehl/host.def


cd ${WRKPATH}'/xc'

#************************************************************
# configuring host.def
#************************************************************

# Preserve a copy of the original host file
cp $HOSTFILE $HOSTFILEORIG

echo "Processing host.def"
if [ "$BUILDALLDRIVERS" = "" ] ; then
#Massage host.def so only our card is build
   sed -e "
   /$DEFMESA/s/\($DEFMESA\).*/\1 $PATHMESA/
   /$DEFDRM/s/\($DEFDRM\).*/\1 $PATHDRM/
   /$DEFXFDRIVERS/s/\($DEFXFDRIVERS\).*/\1 $XFDRIVERS/
   /$DEFDRIDRIVERS/s/\($DEFDRIDRIVERS\).*/\1 $DRIDRIVERS/
   " $HOSTFILEORIG > $HOSTFILE
else
#Massage host.def so our and all other cards are build
   sed -e "
   /$DEFMESA/s/\($DEFMESA\).*/\1 $PATHMESA/
   /$DEFDRM/s/\($DEFDRM\).*/\1 $PATHDRM/
   /$DEFXFDRIVERS/ {
      /$XFDRIVERS/!s/\(.*\)/\1 $XFDRIVERS/
   }
   /$DEFDRIDRIVERS/ {
      /$DRIDRIVERS/!s/\(.*\)/\1 $DRIDRIVERS/
   }
   " $HOSTFILEORIG > $HOSTFILE
fi

#************************************************************
# end configuring host.def
#************************************************************

#************************************************************
# Patch to build xdriinfo, glxgears, glxinfo
#************************************************************
#
# HACK: removed, didn't work for me. YMMV
#
#cd ${WRKPATH}'/xc'
#rm buildtools.patch
#wget http://freedesktop.org/~fxkuehl/buildtools.patch
#patch -p0 < buildtools.patch

#************************************************************
# end utils patch
#************************************************************



#************************************************************
# Build and install xc
#************************************************************

#
# HACK: Assume the user wants support for the current kernel
# Need also to change the "depmod -a" later
#
MODULE='/lib/modules/'`uname -r`'/kernel/drivers/char/drm'
OLDMODULES=/tmp/old-modules.tar
OLDMESA=/tmp/old-mesa.tar

echo "make World, this will take some time..."
nice make World >& world.log

nice make install >& install.log

## There should be a test to figure if we are dealing with XFree86 or Xorg
## if XFree86
##    make install
## if Xorg:
########
#if [ ! -f $OLDMODULES ]; then
#   tar cfP $OLDMODULES /usr/X11R6/lib/modules
#fi
#
#echo "Copying X modules"
#cp exports/lib/modules/dri/*.so /usr/X11R6/lib/modules/dri
#cp exports/lib/modules/extensions/lib{glx,GLcore,dri}.a /usr/X11R6/lib/modules/extensions
#
##### The following line is a HACK! this is because I dont know how to do OS
##### detection properly. Must be fixed. ATM, assume Linux
#cp exports/lib/modules/linux/libdrm.a /usr/X11R6/lib/modules/linux
### Should have a test to remove case info
##case  `uname -s` in
##   "Linux" ) echo "Linux was here";cp exports/lib/modules/linux/libdrm.a /usr/X11R6/lib/modules/linux ;;
### I'm clueless how FreeBSD gets reported from uname -s.
##   "BSD" ) cp exports/lib/modules/freebsd/libdrm.a /usr/X11R6/lib/modules/freebsd ;;
##esac
#
#echo "Copying kernel modules"
#cp exports/lib/modules/drivers/*_drv.o /usr/X11R6/lib/modules/drivers
#if [ ! -f $OLDMESA ]; then
#   tar cfP $OLDMESA /usr/X11R6/lib/*{GL,Mesa}*
#fi
#cp exports/lib/*{GL,Mesa}* /usr/X11R6/lib

echo "ldconfig"
ldconfig

#************************************************************
# end xc
#************************************************************
#************************************************************
# Mesa
#************************************************************

# This need a re-work. HACK. Hardcoded for linux-x86 32 bit arch
cd ${WRKPATH}'/Mesa'
MESACONFIG='configs/linux-dri-x86'

#
# HACK: Just hard coded the lines that I require.
# Should use the information floating in this script
#
#echo "DRM_SOURCE_PAT = /root/dri/drm" >> ${MESACONFIG}
echo "SRC_DIRS = mesa" >> ${MESACONFIG}
echo "DRI_DIRS = dri_client savage" >> ${MESACONFIG}

#echo "DRM_SOURCE_PATH = " >> ${MESACONFIG}
#echo "SRC_DIRS = " >> ${MESACONFIG}
#echo "DRI_DIRS = dri_client " >> ${MESACONFIG}

echo "Building Mesa"
nice make linux-dri-x86 >& makeMesa.log

echo "Installing the modules"
cp lib/*_dri.so /usr/X11R6/lib/modules/dri

#************************************************************
# end Mesa
#************************************************************
#************************************************************
# DRM
#************************************************************
cd ${WRKPATH}'/drm/linux'

#
# HACK: Hard-coded to linux ATM.
#
#if `uname` = "Linux" ; then cd ${WRKPATH}'drm/linux' fi
# What of FreeBSD?
# if `uname` = "BSD" ; then cd ${WRKPATH}'drm/freebsd' fi

#
# HACK:
# I've taken some liberties with $DRIVER here. I dont know how
# nice it will behave in a non savage context
if [ "$BUILDALLDRIVERS" = "" ] ; then
   MAKE_DRM_MODULES='DRM_MODULES='$DRIVER
fi

echo "make drm"
#
# HACK: Hard coded kernel source location
#
nice make LINUXDIR=/usr/src/linux $MAKE_DRM_MODULES >& makedrm.log

if [ ! -d $MODULE ]; then
   mkdir --parents $MODULE
fi
cp *.ko $MODULE
#
# HACK: (I think) Need to support kernel other than the one in use
#
depmod -a

#************************************************************
# end
#************************************************************

#
# HACK:
# Still need to process the X{Free86,org} config file
# Still need to register the order of module loading


Hopefully it will be of some use for you.

I also welcome any contibution.

-ph

Oooo and in this age of legal responsability:
I dont pretend this script does anything good.
If it does anything, whatever it is, including nothing at all, I'm not responsible about it.[/code]
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Wed Jan 12, 2005 11:35 pm    Post subject: Reply with quote

Apparently the current 2D driver is problematic. I keep getting a screen init error ....

Try checking out CVS of xc around Nov/Dec 2004.
Back to top
View user's profile Send private message
cami
n00b
n00b


Joined: 15 Jan 2005
Posts: 36

PostPosted: Sat Jan 15, 2005 2:01 pm    Post subject: DRM Kernel modules are in x11-drm Reply with quote

b0fh wrote:
As xorg-6.8.1.901 is in portage now, I tried building it with "insecure-drivers" in USE (this should build savage and other drivers). I get a savage_dri.so, but no savage.ko as kernel module. How can I use savage-dri now?


The DRM kernel modules are kept in the x11-drm package.
Back to top
View user's profile Send private message
cami
n00b
n00b


Joined: 15 Jan 2005
Posts: 36

PostPosted: Sat Jan 15, 2005 4:24 pm    Post subject: Version mismatch between savage DRI and DRM modules Reply with quote

Code:
(EE) SAVAGE(0): [dri] SAVAGEDRIScreenInit failed because of a version mismatch.
[dri] savage.o kernel module version is 1.0.0 but version 2.0.x is needed.


Does anyone know how to get this fixed? I could not find a 2.0.x version of the DRM module anywhere. There is a savage-2-0-0-branch of DRM, but it only contains version 1.0.0 (!) of savage.ko:

Code:
[drm] Initialized savage 1.0.0 20011023 on minor 0: ProSavage KN1338


I made sure that the savage-2-0-0-branch module was compiled and loaded. The DRI driver (savage_dri.so) is CVS head, the DRM driver (savage.ko) is CVS savage-2-0-0-branch (same thing with head as well).

Thank you for any help,
Carsten

P.S. Please ask if additional info is needed.
    Back to top
    View user's profile Send private message
    salivian
    Tux's lil' helper
    Tux's lil' helper


    Joined: 15 Sep 2002
    Posts: 91

    PostPosted: Sat Jan 22, 2005 6:43 pm    Post subject: Reply with quote

    The 2D driver in insecure-driver in the lastest stable gentoo tree is NOT dri aware. even the _dri.so is bulit, DRI will not be enabled.
    Back to top
    View user's profile Send private message
    salivian
    Tux's lil' helper
    Tux's lil' helper


    Joined: 15 Sep 2002
    Posts: 91

    PostPosted: Sun Jan 23, 2005 6:37 am    Post subject: Reply with quote

    The latest DRI cvs change all .o and .a's to .so, it seems that the installation procedure might have changed from the building Wiki.

    I have not managed to figure that out. I got some noXFreeDRI... error when loading libdri.so

    Does anybody have an idea ?
    Back to top
    View user's profile Send private message
    salivian
    Tux's lil' helper
    Tux's lil' helper


    Joined: 15 Sep 2002
    Posts: 91

    PostPosted: Mon Jan 24, 2005 3:42 am    Post subject: Reply with quote

    Ok ok ... looks like the new CVS has changed a lot of stuffs. but it doesn't work with 6.8.0-r4 at all.

    my noXFreeDRI... error can be fixed by copying the Xorg executable over.

    savage module > 2.x can be found in the linux-core directory. just make savage.o copy over savage.ko and drm.ko.

    at this point you should get an X that is DRI enable, but ... glxgears crashes on me ...

    I feel I'd better wait for the new release.
    Back to top
    View user's profile Send private message
    dark.elixir
    n00b
    n00b


    Joined: 03 Jan 2005
    Posts: 13

    PostPosted: Mon Jan 24, 2005 6:57 am    Post subject: Reply with quote

    I just installed Xorg, DRM, and Mesa following the "DRI Building" instructions.
    I had to remove every *.a file from /usr/X11R6/lib/ and its subfolders to get Xorg running (it were complaining about a lot of "undefined symbols").

    But now I got a bigger problem... every OpenGL application crashes!!!!!.

    Please, help.
    Back to top
    View user's profile Send private message
    bodymind
    n00b
    n00b


    Joined: 25 Jan 2005
    Posts: 22

    PostPosted: Tue Jan 25, 2005 9:07 pm    Post subject: Reply with quote

    Code:
    $ dmesg | grep drm
    [drm] Initialized drm 1.0.0 20040925
    Error registering drm major number.
    [drm] Used old pci detect: framebuffer loaded


    this is the only error that i can found.. that i think influences DRI: NO! =(

    i'm so tired of searching around.. and nothing works.. bah.. =|
    my S3 Inc. VT8375 [ProSavage8 KM266/KL266] don't want to dri! :( can anyone help? please!
    :cry:
    Back to top
    View user's profile Send private message
    salivian
    Tux's lil' helper
    Tux's lil' helper


    Joined: 15 Sep 2002
    Posts: 91

    PostPosted: Sat Feb 05, 2005 8:04 pm    Post subject: Reply with quote

    Ok ... here is the answer to the new savage driver from the mailing list.
    http://marc.theaimsgroup.com/?l=dri-users

    1. Use the latest xorg-x11 test release ~x86 in portage with USE="dlloader" (else there might be symbol errors)
    2. follow http://dri.freedesktop.org/wiki/Building for getting CVS dri
    3. after make install and copying relevant dri files (ATTN: defaults are now *.so NO MORE *.a (this is why you need dlloader))
    4. "make savage.o" in drm/linux-core NOT linux-2.6, copy *.ko to the kernel modules dir. (drm.ko, savage.ko)
    5. Add Option "ShadowStatus" "true" to the driver options in xorg.conf like this
    Code:

    Section "Device"
            Identifier "SuperSavage"
            Driver "savage"
            Option "ForceInit" "yes"
            Option "AGPMode" "4"
            Option "ShadowStatus" "true"
    EndSection


    if using SuperSavage (like myself, IBM T23)
    use driconf to disable "enable_vdma"
    http://dri.freedesktop.org/wiki/DriConf
    or
    hand hack /etc/drirc

    Code:

    <driconf>
        <device screen="0" driver="savage">
            <application name="all">
                <option name="enable_vdma" value="false" />
            </application>
        </device>
    </driconf>
    Back to top
    View user's profile Send private message
    AIgor
    n00b
    n00b


    Joined: 27 Apr 2004
    Posts: 60
    Location: Perugia - Italy

    PostPosted: Mon Feb 07, 2005 1:57 pm    Post subject: Reply with quote

    I recommend to compile cvs tree to obtain direct rendering, as reported in the previus post... BTW if you want to use binaries:

    1- In any case you should compile the latest ~86 release of xorg-x11 (without dlloader use option) if you want to install last binaries.
    2- Download last "common" and "savage" packages (same release) from:
    http://dri.freedesktop.org/snapshots/
    in the same directory.
    3- Unpacked the packages and change in dripkg directory
    4- Launch install.sh script and confirm all the questions
    5- After reboot look if you have the right version (2.0.0) of the savage driver with the command "LIBGL_DEBUG=verbose glxinfo | grep savage"

    @salivian: is opengl-update still bother for the install script of cvs, or you can leave out the manual installation? Can you compile cvs with -fPIC option?

    @all: this thread is becaming difficult to read. Perhaps someone has time for rewrite and maintain a new howto.... :wink:
    Back to top
    View user's profile Send private message
    Display posts from previous:   
    Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
    Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
    Page 4 of 10

     
    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