Announcement

Collapse
No announcement yet.

ATI HD3400 /// artifacts with kernels 2.6.32-rc5 and upwards

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    today 2.6.32-rc7 was released. Seems that the neccessary updates are in there. Playing around for few hours already. looks very stable.

    PS forgot to mention in previous posts. For those who want to try this out and uses initrd. The driver should be blacklisted. Otherwise it will try to load firmware before root filesystem mounted. And will fail. I load it at later stage from /etc/rc.d/rc.modules (this is valid for Slackware).

    Comment


    • #12
      Originally posted by agd5f View Post
      There are quite a few fixes in drm-next that haven't been pushed to Linus yet. See this link for more information:
      http://wiki.x.org/wiki/radeonBuildHowTo
      Yes, I switched back to drm-next and it is noticably smoother. Still a bit jerky in OpenArena, but much better than before.

      Comment


      • #13
        updated info and scripts

        ) KERNEL PART:

        In order to make this work, we will need a kernel 2.6.32-rc7 (or later).
        It should be compiled with this options in .config:
        Code:
        CONFIG_DRM_RADEON=m
        CONFIG_DRM_RADEON_KMS=y
        If you make menuconfig, this should be found here:
        Code:
        Device Drivers ---> Graphics support ---> <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support ---> <M>   ATI Radeon
        
        Device Drivers --->[*] Staging drivers  --->[*]     Enable modesetting on radeon by default
        next step is to blacklist radeon frame buffer and radeon modules. We need to do this to avoid firmware initialisation problem, if it is not accessable before rrot FS is mounted. This should be added to /etc/modprobe.d/blacklist.conf:
        Code:
        blacklist radeonfb
        blacklist radeon
        And then we will load module from /etc/rc.d/rc.modules:
        Code:
        /sbin/modprobe radeon
        2) Libdrm, Mesa and xf86-video-ati from git.

        In order to get as much as we can from our ATIs with opensource drivers, it is reasonable to play with GIT version of this packages.

        I will suppose that you have /Soft/dri folder (doesn't really matter, could be different place).
        Code:
        # cd /Soft/dri
        # git clone git://cgit.freedesktop.org/mesa/drm
        # mv drm libdrm
        # git clone git://cgit.freedesktop.org/git/mesa/mesa
        # git clone git://cgit.freedesktop.org/git/xorg/driver/xf86-video-ati
        After this you could use this scripts, which will update git repositories, and build packages with -date_git version.
        libdrm.SlackBuild
        Code:
        #!/bin/sh
        
        PKGNAM=libdrm
        VERSION=$(date +%Y%m%d)_git
        ARCH=${ARCH:-x86_64}
        NUMJOBS=${NUMJOBS:-" -j7 "}
        BUILD=${BUILD:-1}
        
        CWD=$(pwd)
        TMP=${TMP:-/tmp}
        PKG=$TMP/package-${PKGNAM}
        
        if [ "$ARCH" = "i486" ]; then
          SLKCFLAGS="-O2 -march=i486 -mtune=i686"
          LIBDIRSUFFIX=""
        elif [ "$ARCH" = "s390" ]; then
          SLKCFLAGS="-O2"
          LIBDIRSUFFIX=""
        elif [ "$ARCH" = "x86_64" ]; then
          SLKCFLAGS="-O2 -fPIC"
          LIBDIRSUFFIX="64"
        fi
        
        rm -rf $PKG
        mkdir -p $TMP $PKG
        cd libdrm
        git pull
        git checkout
        
        # Make sure ownerships and permissions are sane:
        chown -R root:root .
        find . \
          \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
          -exec chmod 755 {} \; -o \
          \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
          -exec chmod 644 {} \;
        
        make clean
        # Configure:
        ./autogen.sh
        
        CFLAGS="$SLKCFLAGS" \
        ./configure \
          --prefix=/usr \
          --enable-radeon-experimental-api \
          --libdir=/usr/lib${LIBDIRSUFFIX} \
          --build=$ARCH-slackware-linux
        
        # Build and install:
        make $NUMJOBS || make || exit 1
        make install DESTDIR=$PKG || exit 1
        
        # Strip binaries:
        find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
          | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
        
        mkdir -p $PKG/install
        
        cd $TMP/package-${PKGNAM}
        /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
        
        mv $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz  $CWD
        mesa.SlackBuild (the script is building for r600. Change this variable for your graphics chip):
        Code:
        #!/bin/sh
        
        PKGNAM=mesa
        VERSION=$(date +%Y%m%d)_git
        ARCH=${ARCH:-x86_64}
        BUILD=${BUILD:-1}
        
        # Be sure this list is up-to-date:
        DRI_DRIVERS="r600,swrast"
        
        NUMJOBS=${NUMJOBS:--j8}
        
        CWD=$(pwd)
        TMP=${TMP:-/tmp}
        PKG=$TMP/package-mesa
        
        if [ "$ARCH" = "i486" ]; then
          SLKCFLAGS="-O2 -march=i486 -mtune=i686"
          LIBDIRSUFFIX=""
        elif [ "$ARCH" = "x86_64" ]; then
          SLKCFLAGS="-O2 -fPIC"
          LIBDIRSUFFIX="64"
        else
          SLKCFLAGS="-O2"
          LIBDIRSUFFIX=""
        fi
        
        rm -rf $PKG
        mkdir -p $TMP $PKG
        cd mesa
        git pull
        git checkout
        
        # Make sure ownerships and permissions are sane:
        chown -R root:root .
        find . \
          \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
          -exec chmod 755 {} \; -o \
          \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
          -exec chmod 644 {} \;
        make clean
        ./autogen.sh
        
        CFLAGS="$SLKCFLAGS" \
        ./configure \
          --prefix=/usr \
          --sysconfdir=/etc \
          --libdir=/usr/lib${LIBDIRSUFFIX} \
          --mandir=/usr/man \
          --docdir=/usr/doc/mesa-$VERSION \
          --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
          --with-dri-drivers="$DRI_DRIVERS" \
          --disable-gallium \
          --enable-debug \
          --build=$ARCH-slackware-linux
        
        make $NUMJOBS || make || exit 1
        make install DESTDIR=$PKG || exit 1
        
        # Install gears and glinfo manually, and make symlinks from the names
        # of the deprecated similar programs to reduce confusion:
        mkdir -p $PKG/usr/bin
        cp -a progs/demos/gears $PKG/usr/bin/gears
        cp -a progs/demos/glinfo $PKG/usr/bin/glinfo
        ( cd $PKG/usr/bin
          ln -sf glinfo glxinfo
          ln -sf gears glxgears
        )
        
        # Strip binaries:
        find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
          | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
        
        mkdir -p $PKG/install
        
        cd $PKG
        /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
        mv $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz  $CWD
        xf86-video-ati.SlackBuild
        Code:
        #!/bin/sh
        
        PKGNAM=xf86-video-ati
        VERSION=$(date +%Y%m%d)_git
        ARCH=${ARCH:-x86_64}
        BUILD=${BUILD:-1}
        
        NUMJOBS=${NUMJOBS:--j8}
        CWD=$(pwd)
        TMP=${TMP:-/tmp}
        PKG=$TMP/package-xf86-video-ati
        
        if [ "$ARCH" = "i486" ]; then
          SLKCFLAGS="-O2 -march=i486 -mtune=i686"
          LIBDIRSUFFIX=""
        elif [ "$ARCH" = "x86_64" ]; then
          SLKCFLAGS="-O2 -fPIC"
          LIBDIRSUFFIX="64"
        else
          SLKCFLAGS="-O2"
          LIBDIRSUFFIX=""
        fi
        
        rm -rf $PKG
        mkdir -p $TMP $PKG
        cd $PKGNAM
        git pull
        git checkout
        
        # Make sure ownerships and permissions are sane:
        chown -R root:root .
        find . \
          \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
          -exec chmod 755 {} \; -o \
          \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
          -exec chmod 644 {} \;
        make clean
        ./autogen.sh
        CFLAGS="$SLKCFLAGS" \
        ./configure \
          --prefix=/usr \
          --libdir=/usr/lib${LIBDIRSUFFIX} \
          --sysconfdir=/etc \
          --build=$ARCH-slackware-linux
        
        make $NUMJOBS 
        make install DESTDIR=$PKG 
        
        mkdir -p $PKG/install
        
        cd $PKG
        /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
        mv $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz  $CWD
        Something like this should do it all together (lets call this build_all.sh):
        Code:
        ./libdrm.SlackBuild && upgradepkg --reinstall libdrm-`date +%Y%m%d`_git-x86_64-1.t?z
        ./mesa.SlackBuild && upgradepkg --reinstall mesa-`date +%Y%m%d`_git-x86_64-1.t?z
        ./xf86-video-ati.SlackBuild && upgradepkg --reinstall xf86-video-ati-`date +%Y%m%d`_git-x86_64-1.t?z
        Last edited by dolphin77; 17 November 2009, 08:03 AM.

        Comment

        Working...
        X