Forgot your password?
typodupeerror
X

dch24's Journal: Glisse radeon driver 7

Journal by dch24

This is my log as I change my radeon driver to the glisse git head. I have a Radeon HD 3300 IGP (part of the RS780 SouthBridge) on an Asus M4A78T-E.

Scroll down to the bottom for the error I'm getting...

I'm doing it because I have this in /var/log/Xorg.0.log:
(EE) AIGLX error: Calling driver entry point failed(EE) AIGLX: reverting to software rendering

And glxgears gets 1000 FPS in the default 300x300 window/32 bit color - software rasterization is too slow :-/

http://neo-technical.wikispaces.com/kms-glisse

1a.) Obtain the required tools to compile and obtain source code: sudo apt-get install
git-core build-essential dh-make debconf debhelper automake autoconf && sudo apt-get build-dep mesa libdrm

10a.) Install pthread-stubs to make libdrm:

I'm proceeding using gentoo:
- automake pulls in autoconf
- VIDEO_CARDS="radeon" builds xf86-video-ati, which pulls in mesa, libdrm

a64x2 ~ # emerge -pv git automake autoconf xf86-video-ati mesa libdrm libpthread-stubs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-devel/autoconf-2.63 USE="-emacs"
[ebuild R ] dev-util/git-1.6.0.6 USE="iconv -bash-completion -cgi -curl -cvs -doc -emacs -gtk -mozsha1 -perl (-ppcsha1) -subversion -threads -tk -vim-syntax -webdav -xinetd"
[ebuild R ] sys-devel/automake-1.10.2
[ebuild R ] dev-libs/libpthread-stubs-0.1 USE="-debug"
[ebuild R ] x11-libs/libdrm-2.4.5 USE="-debug"
[ebuild R ] x11-drivers/xf86-video-ati-6.12.1-r1 USE="-debug"
[ebuild R ] media-libs/mesa-7.3-r1 USE="nptl -debug -doc -motif -pic -xcb" VIDEO_CARDS="radeon -intel -mach64 -mga -none -r128 -s3virge -savage -sis (-sunffb) -tdfx -trident -via"

2a.) Obtain glisse's drm-next kernel source code:

cd /usr/src && sudo git clone git://anongit.freedesktop.org/~glisse/drm-next && \
sudo git checkout -b radeon origin/drm-next-radeon

3a.) Get into the kernel source:

cd drm-next

a64x2 ~ # cd /usr/src
a64x2 src # git clone git://anongit.freedesktop.org/~glisse/drm-next
Initialized empty Git repository in /usr/src/drm-next/.git/
remote: Counting objects: 1123593, done.
remote: Compressing objects: 100% (187192/187192), done.
remote: Total 1123593 (delta 936097), reused 1117821 (delta 930572)
Receiving objects: 100% (1123593/1123593), 266.90 MiB | 165 KiB/s, done.
Resolving deltas: 100% (936097/936097), done.
Checking out files: 100% (26663/26663), done.
a64x2 src # cd drm-next/
a64x2 drm-next # git checkout -b radeon origin/drm-next-radeon
Checking out files: 100% (6835/6835), done.
Branch radeon set up to track remote branch refs/remotes/origin/drm-next-radeon.
Switched to a new branch "radeon"

4a.) Copy the config file over the default one:

sudo rm -rf .config && sudo wget http://neo-technical.wikispaces.com/file/view/config && sudo cp config .config

For AMD64:

sudo rm -rf .config && sudo wget http://neo-technical.wikispaces.com/file/view/config.x86_64 && sudo cp config.x86_64 .config

OPTIONAL: You may make changes to the config file regarding hard drives, firmware, wireless, bluetooth etc. to your preference but do not touch anything related to direct rendering (DRM) or AGP unless you are certain you know what you are doing

I am on x86_64:
a64x2 drm-next # wget http://neo-technical.wikispaces.com/file/view/config.x86_64 -O .config
--2009-06-02 05:40:19-- http://neo-technical.wikispaces.com/file/view/config.x86_64
Resolving neo-technical.wikispaces.com... 75.126.104.177
Connecting to neo-technical.wikispaces.com|75.126.104.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 94470 (92K) [text/plain]
Saving to: `.config'

100%[======================================>] 94,470 83.7K/s in 1.1s

2009-06-02 05:40:20 (83.7 KB/s) - `.config' saved [94470/94470]

Just running make menuconfig changes the .config a lot.

Chanages I had to make to get it to compile & boot on my machine, after menuconfig was complete:
--- config-2.6.29-autochanged 2009-06-02 06:41:53.000000000 +0000
+++ .config 2009-06-02 06:20:01.000000000 +0000
@@ -389,12 +389,12 @@
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_POWERNOW_K8=m
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_P4_CLOCKMOD=m
+# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
-CONFIG_X86_SPEEDSTEP_LIB=m
+# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
@@ -1177,7 +1177,7 @@
# SCSI device support
#
CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
+CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
CONFIG_SCSI_NETLINK=y
@@ -1186,7 +1186,7 @@
#
# SCSI support type (disk, tape, CD-ROM)
#
-CONFIG_BLK_DEV_SD=m
+CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=m
@@ -1297,7 +1297,7 @@
CONFIG_SCSI_DH_EMC=m
CONFIG_SCSI_DH_ALUA=m
# CONFIG_SCSI_OSD_INITIATOR is not set
-CONFIG_ATA=m
+CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y
@@ -1322,7 +1322,7 @@
CONFIG_PATA_ALI=m
CONFIG_PATA_AMD=m
CONFIG_PATA_ARTOP=m
-CONFIG_PATA_ATIIXP=m
+CONFIG_PATA_ATIIXP=y
CONFIG_PATA_CMD640_PCI=m
CONFIG_PATA_CMD64X=m
CONFIG_PATA_CS5520=m
@@ -3564,19 +3564,17 @@
CONFIG_W35UND=m
CONFIG_PRISM2_USB=m
CONFIG_ECHO=m
-CONFIG_USB_ATMEL=m
+# CONFIG_USB_ATMEL is not set
CONFIG_POCH=m
CONFIG_AGNX=m
-CONFIG_OTUS=m
+# CONFIG_OTUS is not set
CONFIG_RT2860=m
CONFIG_RT2870=m
-CONFIG_COMEDI=m
-CONFIG_COMEDI_PCI_DRIVERS=m
-CONFIG_COMEDI_USB_DRIVERS=m
+# CONFIG_COMEDI is not set
CONFIG_ASUS_OLED=m
# CONFIG_PANEL is not set
# CONFIG_ALTERA_PCIE_CHDMA is not set
-CONFIG_RTL8187SE=m
+# CONFIG_RTL8187SE is not set
# CONFIG_INPUT_MIMIO is not set
# CONFIG_TRANZPORT is not set
# CONFIG_EPL is not set
@@ -3632,7 +3630,7 @@
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
@@ -3641,11 +3639,11 @@
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
-CONFIG_JBD=m
+CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=m
+CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set

Built the kernel:
real 6m32.390s
user 21m3.619s
sys 2m11.061s

Rebooted:
a64x2 ~ # telinit 6;exit

Configured git with --global user.name

git clone git://anongit.freedesktop.org/mesa/drm && \
wget http://neo-technical.wikispaces.com/file/view/patch.patch -O 01-drm-neo.patch && \
cd drm && git am ../01-drm-neo.patch

a64x2 experiment # git clone git://anongit.freedesktop.org/mesa/drm
Initialized empty Git repository in /var/tmp/portage/experiment/drm/.git/
remote: Counting objects: 37519, done.
remote: Compressing objects: 100% (15815/15815), done.
remote: Total 37519 (delta 29331), reused 27567 (delta 21326)
Receiving objects: 100% (37519/37519), 11.85 MiB | 154 KiB/s, done.
Resolving deltas: 100% (29331/29331), done.
a64x2 experiment # wget http://neo-technical.wikispaces.com/file/view/patch.patch -O 01-drm-neo.patch
--2009-06-02 06:46:54-- http://neo-technical.wikispaces.com/file/view/patch.patch
Resolving neo-technical.wikispaces.com... 75.126.104.177
Connecting to neo-technical.wikispaces.com|75.126.104.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 60144 (59K) [text/plain]
Saving to: `01-drm-neo.patch'

100%[======================================>] 60,144 131K/s in 0.4s

2009-06-02 06:46:55 (131 KB/s) - `01-drm-neo.patch' saved [60144/60144]

a64x2 experiment # cd drm
a64x2 drm # git am ../01-drm-neo.patch
Applying: libdrm: add libdrm_radeon
/var/tmp/portage/experiment/drm/.git/rebase-apply/patch:134: trailing whitespace.
/*
/var/tmp/portage/experiment/drm/.git/rebase-apply/patch:137: trailing whitespace.
*
/var/tmp/portage/experiment/drm/.git/rebase-apply/patch:145: trailing whitespace.
*
/var/tmp/portage/experiment/drm/.git/rebase-apply/patch:152: trailing whitespace.
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
/var/tmp/portage/experiment/drm/.git/rebase-apply/patch:211: trailing whitespace.

warning: squelched 42 whitespace errors
warning: 47 lines add whitespace errors.

11a.) Configuring libdrm with patch:

./autogen.sh --prefix=/usr

a64x2 drm # ./autogen.sh --prefix=/radeon-git/xorg

...

config.status: creating libdrm_intel.pc
config.status: creating libdrm/config.h
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --enable-maintainer-mode
a64x2 drm #

12a.) If everything suceeds, install it. (Do not compile it):

sudo make install

a64x2 drm # make install

13a.) Download the correct xf86-video-ati driver:

cd .. && \
git clone git://anongit.freedesktop.org/~glisse/xf86-video-ati && \
git checkout -b cs3 origin/radeon-gem-cs3

a64x2 drm # cd ..
a64x2 experiment # git clone git://anongit.freedesktop.org/~glisse/xf86-video-ati
Initialized empty Git repository in /var/tmp/portage/experiment/xf86-video-ati/.git/
remote: Counting objects: 13186, done.
remote: Compressing objects: 100% (3114/3114), done.
remote: Total 13186 (delta 10522), reused 12661 (delta 10069)
Receiving objects: 100% (13186/13186), 3.84 MiB | 146 KiB/s, done.
Resolving deltas: 100% (10522/10522), done.
a64x2 experiment # cd xf86-video-ati/
a64x2 xf86-video-ati # git checkout -b cs3 origin/radeon-gem-cs3
Branch cs3 set up to track remote branch refs/remotes/origin/radeon-gem-cs3.
Switched to a new branch "cs3"

14a.) Compile the xf86-video-ati-cs3 driver:

./autogen.sh --prefix=/usr

15a.) If everything suceeds, you can now compile:

make

16a.) If you get no compiling errors, now install the driver:

sudo make install

a64x2 xf86-video-ati # ./autogen.sh --prefix=/radeon-git/xorg

...

config.status: executing depfiles commands

prefix: /radeon-git/xorg
exec_prefix: ${prefix}
libdir: ${exec_prefix}/lib
includedir: ${prefix}/include

Kernel modesetting: yes

CFLAGS: -g -O2
CXXFLAGS: -g -O2
Macros:

Run 'make' to build xf86-video-ati

This is abbreviated, but it's the error that stopped me:

a64x2 xf86-video-ati # make
make all-recursive
make[1]: Entering directory `/var/tmp/portage/experiment/xf86-video-ati'
Making all in src
make[2]: Entering directory `/var/tmp/portage/experiment/xf86-video-ati/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I./AtomBios/includes -Wall -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER -g -O2 -MT radeon_accel.lo -MD -MP -MF .deps/radeon_accel.Tpo -c -o radeon_accel.lo radeon_accel.c
gcc -DHAVE_CONFIG_H -I. -I.. -I./AtomBios/includes -Wall -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER -g -O2 -MT radeon_accel.lo -MD -MP -MF .deps/radeon_accel.Tpo -c radeon_accel.c -fPIC -DPIC -o .libs/radeon_accel.o
In file included from radeon.h:80,
from radeon_accel.c:79:
radeon_dri2.h:37:18: error: dri2.h: No such file or directory
In file included from radeon_accel.c:581:
radeon_commonfuncs.c: In function 'drmmode_wait_for_vline':
radeon_commonfuncs.c:652: warning: unused variable 'offset'
make[2]: *** [radeon_accel.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/experiment/xf86-video-ati/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/experiment/xf86-video-ati'
make: *** [all] Error 2
a64x2 xf86-video-ati #

This discussion has been archived. No new comments can be posted.

Glisse radeon driver

Comments Filter:
  • http://jglisse.livejournal.com/1822.html [livejournal.com]

    Possibly not directly relevant but some stuff looks similar and of course this:
    "with intel CPU i would love to know if you got any issues with this code. Early tester are always appreciated and i would like to thanks spstarr, dilex, osiris, ... for their early testing and reporting on this code."

  • I think I know what the missing prerequisite is: reading a different conversation on irc.freenode.net #radeon, they mentioned x11proto dri2-dev and I realized I did not have that installed. (In gentoo, you install it with emerge x11-proto/dri2proto, but I am going to try to get it from a git repository first.)
    • by dch24 (904899)
      So I removed libpthread-stubs as a gentoo package so I can get it from git. I also need to get git://anongit.freedesktop.org/xorg/util/macros and remove the 01-drm-neo.patch, so I will basically be starting over... I'll reply with my results.
      • by dch24 (904899)
        # Makefile: You run it by typing "make," of course. Then, the first time through it downloads everything from git and creates tarballs of the git repositories. It will also do a git pull each time, then rebuild the sources with a make and make install. If you delete the directories and delete the tarballs, it goes back to a git checkout. You might want to change the PREFIX= line if you don't like where it's downloading to.

        PREFIX=/radeon-git/xorg
        XORG_LOG=/var/log/Xorg.0.log
        TARGET_GIT_FILES=

        .phony: all clean
      • by dch24 (904899)
        Copy/paste the above code into a file named Makefile, and run it - it contains a complete set of steps as detailed on http://neo-technical.wikispaces.com/kms-glisse [wikispaces.com]
      • by dch24 (904899)
        # Makefile: You run it by typing "make," of course. Then, the first time through it downloads everything from git and creates tarballs of the git repositories. It will also do a git pull each time, then rebuild the sources with a make and make install. If you delete the directories and delete the tarballs, it goes back to a git checkout. You might want to change the PREFIX= line if you don't like where it's downloading to. This updated version does a better job of git pull updating each time.

        PREFIX=/radeon-
  • Since R600 support has not been added to xf86-video-ati git origin/radeon-gem-cs3, agd5f recommended I stick with origin/master for now.

    Well, I tried it out, but the gentoo xf86-video-ati has a patch that adds support for the Radeon HD 3300, while git head (origin/master) doesn't have that yet. So that's a no-go for now. I'll reply when the patch gets included. (So I'll keep testing it.)

"There is hopeful symbolism in the fact that flags do not wave in a vacuum." --Arthur C. Clarke

Working...