You are not logged in.

#1 2009-05-03 12:32:57

csslayer
Member
Registered: 2009-03-05
Posts: 85

Experimental 3d support on ati r6xx r7xx and failed

I am using hd 3450 on my computer, and catalyst driver really sucks on linux.
There is a new for experimental 3d driver on r6xx and r7xx series.
http://lists.x.org/archives/xorg-driver … 09362.html

and i follow the instruction form here http://wiki.x.org/wiki/radeonhd%3Aexperimental_3D

So I just want to have a try.
Actually I make 5 pkgbuild for mesa libgl ati-dri libdrm and drm, and got failed.
For xf86-video-ati, It seems doesn't work while test with glxgears. glxgears only use software accel
For xf86-video-radeonhd, it stucks with glxgears, and can not recover.

If someone can correct the question, It's a great help.

following are pkgbuild and a patch for drm and a install script, its quite long

PKGBUILD doesn't has all correct depends, but I think it doesn't matter

pkgname=ati-dri-git-r6xx-r7xx-support
pkgver=20090502
pkgrel=1
pkgdesc="Mesa DRI OpenGL library and drivers from GIT repository R6xx/R7xx Expr ver"
arch=(i686 x86_64)
license=('custom')
url="http://mesa3d.sourceforge.net"
license=('MIT')
depends=('libdrm-git-r6xx-r7xx-3d' 'libgl-git-r6xx-r7xx-support' 'expat>=2.0.1')
makedepends=('glproto>=1.4.9' 'pkgconfig' 'libxfixes' 'libxdamage' 'libxxf86vm' 'libxext' 'dri2proto>=1.99.3' 'mesa-git-r6xx-r7xx-support')
conflicts=('xf86-video-ati<6.9.0-6' 'ati-dri')
provides=('ati-dri=7.4')
options=('!libtool')
source=()
md5sums=()
_gitroot="git://anongit.freedesktop.org/git/mesa/mesa"
_gitname="mesa"
_branch="r6xx-r7xx-support origin/r6xx-r7xx-support"

build() {
  cd ${startdir}/src/
  msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  cd ${srcdir}/${_gitname}
  git checkout -b $_branch

  cd ${srcdir}
  rm -rf ${_gitname}-build
  git clone $_gitname $_gitname-build
  cd ${srcdir}/$_gitname-build

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  CONFIG="linux-dri-x86"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-dri-x86-64"
    sed -i -e "s/lib64/lib/g" ${startdir}/src/$_gitname-build/configs/${CONFIG}
  fi
  ./autogen.sh --prefix=/usr \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-dri-drivers=radeon,r600 \
    --enable-glx-tls \
    --with-driver=dri \
    --enable-xcb \
    --disable-glu \
    --disable-glut \
    --disable-glw \
    --enable-debug || return 1
  make || return 1
  cd src/mesa/drivers/dri || return 1
  make DESTDIR=${pkgdir} install || return 1  
  rm -f "${pkgdir}/usr/lib/xorg/modules/dri/libdricore.so"
  rm -rf "${pkgdir}/usr/include"
  rm -rf "${pkgdir}/usr/lib/pkgconfig"
}
pkgname=libgl-git-r6xx-r7xx-support
pkgver=20090502
pkgrel=1
pkgdesc="Mesa DRI OpenGL library and drivers from GIT repository R6xx/R7xx Expr ver"
arch=(i686 x86_64)
license=('custom')
url="http://mesa3d.sourceforge.net"
depends=('libxxf86vm' 'libdrm>=2.3' 'libx11>=1.1')
makedepends=('imake' 'glproto' 'git')
provides=('libgl=7.1.0')
conflicts=('libgl')
source=()
md5sums=()
_gitroot="git://anongit.freedesktop.org/git/mesa/mesa"
_gitname="mesa"
_branch="r6xx-r7xx-support origin/r6xx-r7xx-support"

build() {
  cd ${startdir}/src/
  msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  cd ${srcdir}/${_gitname}
  git checkout -b $_branch

  cd ${srcdir}
  rm -rf ${_gitname}-build
  git clone $_gitname $_gitname-build
  cd ${srcdir}/$_gitname-build

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  CONFIG="linux-dri-x86"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-dri-x86-64"
    sed -i -e "s/lib64/lib/g" ${startdir}/src/$_gitname-build/configs/${CONFIG}
  fi
  ./autogen.sh --prefix=/usr \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-dri-drivers=swrast \
    --enable-glx-tls \
    --disable-ttm-api \
    --with-driver=dri \
    --enable-xcb \
    --disable-glu \
    --disable-glut \
    --disable-glw \
    --enable-debug || return 1
  make || return 1
  make DESTDIR=${pkgdir} install || return 1
  rm -rf ${pkgdir}/usr/include
  rm -rf ${pkgdir}/usr/lib/pkgconfig
  install -m755 -d ${pkgdir}/usr/lib/xorg/modules/extensions
  rm -r $startdir/src/$_gitname-build
}
pkgname=mesa-git-r6xx-r7xx-support
pkgver=20090502
pkgrel=1
pkgdesc="Mesa OpenGL Library from GIT repository with r6xx/r7xx support"
url="http://www.mesa3d.org"
license=""
arch=(x86_64 i686)
depends=('libgl' 'gcc' 'libxt' 'dri2proto')
makedepends=('imake' 'git')
conflicts=('mesa-apps' 'mesa')
replaces=('mesa-apps' 'mesa')
provides=('mesa' 'mesa-git')
backup=()
install=
source=(ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2)
md5sums=()

_gitroot="git://anongit.freedesktop.org/git/mesa/mesa"
_gitname="mesa"
_branch="r6xx-r7xx-support origin/r6xx-r7xx-support"

build() {

 msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  cd ${srcdir}/${_gitname}
  msg "Switch"
  git checkout -b $_branch
  
  cd ${srcdir}
  rm -rf ${_gitname}-build
  git clone $_gitname $_gitname-build
  cd ${srcdir}/$_gitname-build


  msg "GIT checkout done or server timeout"
  msg "Starting make..."

# Any patches you may want to add go here
  ./autogen.sh --with-dri-drivers=swrast \
    --prefix=/usr \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --enable-glx-tls \
    --with-driver=dri \
    --enable-xcb \
    --disable-glut \
    --enable-debug || return 1

  make || return 1
  make DESTDIR=${pkgdir} install

  install -m755 -d "${pkgdir}/usr/bin"
  install -m755 progs/xdemos/glx{gears,info} "${pkgdir}/usr/bin" || return 1

  rm -f "${pkgdir}/usr/lib/libGL.so"*
#  rm -f "${pkgdir}/usr/lib/libGLU.so"*
  rm -rf "${pkgdir}/usr/lib/xorg"
  rm -f "${pkgdir}/usr/include/GL/glut"*

  cd ${startdir}/src/gl-manpages-1.0.1
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=${startdir}/pkg install

}
pkgname=libdrm-git-r6xx-r7xx-3d
pkgver=20090502
pkgrel=1
pkgdesc="DRM Module"
url="http://git.freedesktop.org/drm"
license=""
arch=(x86_64 i686)
depends=()
makedepends=('imake' 'git')
conflicts=('libdrm')
provides=('libdrm=2.4.99')
backup=()
install=
source=()

_gitroot="git://anongit.freedesktop.org/~agd5f/drm"
_gitname="drm"
_branch="r6xx-r7xx-3d origin/r6xx-r7xx-3d"

build() {

 msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  cd $startdir/src

  cp -r $startdir/src/$_gitname $startdir/src/$_gitname-build
  cd $startdir/src/$_gitname-build

# Any patches you may want to add go here

 cd $startdir/src/$_gitname
 msg "Switch branch to r6xx-r7xx-3d"
 git checkout -b $_branch

 cd ${srcdir}
 rm -r ${_gitname}-build
 git clone $_gitname $_gitname-build
 cd ${srcdir}/$_gitname-build

 msg "Starting make.."

 ./autogen.sh --prefix=/usr || return 1
 
 make || return 1
 make DESTDIR="${pkgdir}" install || return 1
 
}
pkgname=drm-git-r6xx-r7xx-3d
pkgver=20090502
pkgrel=1
pkgdesc="DRM Module"
url="http://git.freedesktop.org/drm"
license=""
arch=(x86_64 i686)
depends=()
conflicts=('drm-radeon-module-git-r6xx-r7xx')
makedepends=('imake' 'git')
backup=()
install=(drm.install)
source=(2.6.29.patch)

_gitroot="git://anongit.freedesktop.org/~agd5f/drm"
_gitname="drm"
_branch="r6xx-r7xx-3d origin/r6xx-r7xx-3d"

build() {

 msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

cd $startdir/src

  cp -r $startdir/src/$_gitname $startdir/src/$_gitname-build
  cd $startdir/src/$_gitname-build

# Any patches you may want to add go here

 cd $startdir/src/$_gitname
 msg "Switch branch to r6xx-r7xx-3d"
 git checkout -b $_branch

 cd ${srcdir}
 rm -r ${_gitname}-build
 git clone $_gitname $_gitname-build
 cd ${srcdir}/$_gitname-build

 patch -p1 < $srcdir/2.6.29.patch

 msg "Starting make.."
 
 cd linux-core
 make radeon.o drm.o
    for _kernver in `ls /lib/modules`
    do
        install -m644 -D drm.ko $startdir/pkg/lib/modules/${_kernver}/updates/drm.ko
        install -m644 -D radeon.ko $startdir/pkg/lib/modules/${_kernver}/updates/radeon.ko
    done

}

patch for drm

--- drm/linux-core/drm_compat.c    2009-05-01 20:34:15.438866351 +0800
+++ drm-build/linux-core/drm_compat.c    2009-05-02 01:01:34.686943628 +0800
@@ -730,35 +730,6 @@
 EXPORT_SYMBOL(idr_replace);
 #endif
 
-#if defined(DRM_KMAP_ATOMIC_PROT_PFN)
-#define drm_kmap_get_fixmap_pte(vaddr)                    \
-    pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), vaddr), (vaddr)), (vaddr))
-
-void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
-               pgprot_t protection)
-{
-    enum fixed_addresses idx;
-    unsigned long vaddr;
-    static pte_t *km_pte;
-    static int initialized = 0;
-
-    if (unlikely(!initialized)) {
-        km_pte = drm_kmap_get_fixmap_pte(__fix_to_virt(FIX_KMAP_BEGIN));
-        initialized = 1;
-    }
-
-    pagefault_disable();
-    idx = type + KM_TYPE_NR*smp_processor_id();
-    vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-    set_pte(km_pte-idx, pfn_pte(pfn, protection));
-
-    return (void*) vaddr;
-}
-
-EXPORT_SYMBOL(kmap_atomic_prot_pfn);
-
-#endif
-
 #ifdef DRM_FULL_MM_COMPAT
 #ifdef DRM_NO_FAULT
 unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
--- drm/linux-core/drm_compat.h    2009-05-01 20:34:15.442199681 +0800
+++ drm-build/linux-core/drm_compat.h    2009-05-02 01:01:49.199320030 +0800
@@ -337,28 +337,6 @@
 typedef _Bool                   bool;
 #endif
 
-
-#if (defined(CONFIG_X86) && defined(CONFIG_X86_32) && defined(CONFIG_HIGHMEM))
-/*
- * pgd_offset_k() is a macro that uses the symbol init_mm,
- * check that it is available.
- */
-#  if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) || \
-    defined(CONFIG_UNUSED_SYMBOLS))
-#define DRM_KMAP_ATOMIC_PROT_PFN
-extern void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
-                  pgprot_t protection);
-#  else
-#warning "init_mm is not available on this kernel!"
-static inline void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
-                     pgprot_t protection)
-{
-    /* stub */
-    return NULL;
-}
-#  endif /* no init_mm */
-#endif
-
 #if !defined(flush_agp_mappings)
 #define flush_agp_mappings() do {} while(0)
 #endif
post_install() {
    echo "<<< Running depmod >>>"
    depmod
    echo "If you are using more than one kernel put these lines in your /etc/rc.local:"
    echo "insmod /lib/modules/\`uname -r\`/updates/drm.ko"
    echo "insmod /lib/modules/\`uname -r\`/updates/radeon.ko"
}

post_upgrade() {
    post_install
}
post_remove() {
    echo "<<< Running depmod >>>"
    depmod
}

Offline

#2 2009-05-03 19:20:19

csslayer
Member
Registered: 2009-03-05
Posts: 85

Re: Experimental 3d support on ati r6xx r7xx and failed

a little update

forget a symbolic link

pkgname=libgl-git-r6xx-r7xx-support
pkgver=20090504
pkgrel=1
pkgdesc="Mesa DRI OpenGL library and drivers from GIT repository R6xx/R7xx Expr ver"
arch=(i686 x86_64)
license=('custom')
url="http://mesa3d.sourceforge.net"
depends=('libxxf86vm' 'libdrm>=2.3' 'libx11>=1.1')
makedepends=('imake' 'glproto' 'git')
provides=('libgl=7.1.0')
conflicts=('libgl')
source=()
md5sums=()
_gitroot="git://anongit.freedesktop.org/git/mesa/mesa"
_gitname="mesa"
_branch="r6xx-r7xx-support origin/r6xx-r7xx-support"

build() {
  cd ${startdir}/src/
  msg "Connecting to git.freedesktop.org GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
  cd $_gitname && git pull origin
  msg "The local files are updated."
  else
  git clone $_gitroot
  fi

  cd ${srcdir}/${_gitname}
  git checkout -b $_branch

  cd ${srcdir}
  rm -rf ${_gitname}-build
  git clone $_gitname $_gitname-build
  cd ${srcdir}/$_gitname-build

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  CONFIG="linux-dri-x86"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-dri-x86-64"
    sed -i -e "s/lib64/lib/g" ${startdir}/src/$_gitname-build/configs/${CONFIG}
  fi
  ./autogen.sh --prefix=/usr \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-dri-drivers=swrast \
    --enable-glx-tls \
    --disable-ttm-api \
    --with-driver=dri \
    --enable-xcb \
    --disable-glu \
    --disable-glut \
    --disable-glw \
    --enable-debug || return 1
  make || return 1
  make DESTDIR=${pkgdir} install || return 1
  rm -rf ${pkgdir}/usr/include
  rm -rf ${pkgdir}/usr/lib/pkgconfig
  install -m755 -d ${pkgdir}/usr/lib/xorg/modules/extensions
  ln -sf libglx.xorg ${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so || return 1
}

Offline

#3 2009-06-25 16:53:00

Perry3D
Member
Registered: 2008-03-20
Posts: 553

Re: Experimental 3d support on ati r6xx r7xx and failed

Hi ccslayer,

why do you not put these PKGBUILDs in the AUR?

Offline

#4 2009-06-26 14:14:18

csslayer
Member
Registered: 2009-03-05
Posts: 85

Re: Experimental 3d support on ati r6xx r7xx and failed

Because I think this does not make everything right, ati open driver still can not be used..

Offline

#5 2009-07-16 21:51:58

dan.boff
Member
Registered: 2009-04-07
Posts: 42

Re: Experimental 3d support on ati r6xx r7xx and failed

did you make any progress yet? i'm really interested in this package...

Offline

#6 2009-07-17 05:56:49

csslayer
Member
Registered: 2009-03-05
Posts: 85

Re: Experimental 3d support on ati r6xx r7xx and failed

Actually I'm waiting for the driver release.
I will come out soon.
http://www.phoronix.com/scan.php?page=n … &px=NzM2Mw

Offline

Board footer

Powered by FluxBB