You are not logged in.

#2426 2013-04-04 08:10:36

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Discussion: the ati/radeon open source drivers & radeon repository

If you want to avoid the "flash" you can add the radeon module to your mkinitcpio.conf and regenerate then mkinitcpio -p linux to create a new kernel. I had to do this myself because my system would hang at boot around 30-40% of the time without the radeon module compiled in the kernel.

Offline

#2427 2013-04-06 08:40:08

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

Cdh wrote:

Would it be possible for you to build clang with it? If you want to compile mesa with --enable-opencl you need libclc and building libclc requires clang...

Today they commited "radeonsi: Add compute support v3" to mesa so I thought, why not try if it does anything yet and had a look how to build clang with llvm. Not that hard:

pkgname=llvm-amdgpu-svn
pkgver=178337
pkgrel=1
pkgdesc='Low Level Virtual Machine with AMDGPU enabled, build from upstream svn trunk version'
arch=('i686' 'x86_64')
url="http://llvm.org"
license=('custom:University of Illinois/NCSA')
depends=('python2' 'ocaml')
makedepends=('subversion' 'python-sphinx')
source=(llvm-Config-config.h
        llvm-Config-llvm-config.h)
conflicts=('llvm')
provides=('llvm')
md5sums=('e4f9c0c37d6858baf2a1099a73db0f6e'
         '295c343dcd457dc534662f011d7cff1a')
_svntrunk='http://llvm.org/svn/llvm-project/llvm/trunk'
_svnmod='llvm'
_clang_svntrunk='http://llvm.org/svn/llvm-project/cfe/trunk'
_clang_svnmod='clang'


build() {
  cd "$srcdir"
  msg "Connecting to llvm SVN server...."

  if [[ -d "$_svnmod/.svn" ]]; then
    (cd "$_svnmod" && svn up -r "$pkgver")
  else
    svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
  fi

#clang
  if [[ -d "$_clang_svnmod/.svn" ]]; then
    (cd "$_clang_svnmod" && svn up -r "$pkgver")
  else
    svn co "$_clang_svntrunk" --config-dir ./ -r "$pkgver" "$_clang_svnmod"
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_svnmod-build"
  svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  svn export "$srcdir/$_clang_svnmod" "$srcdir/$_svnmod-build/tools/clang"
  cd "$srcdir/$_svnmod-build"

  # Fix symbolic links from OCaml bindings to LLVM libraries
  sed -i 's:\$(PROJ_libdir):/usr/lib/llvm:' bindings/ocaml/Makefile.ocaml

  # Fix installation directories, ./configure doesn't seem to set them right
  sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \
         -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \
         -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
    Makefile.config.in
  sed -i '/ActiveLibDir = ActivePrefix/s:lib:lib/llvm:' \
    tools/llvm-config/llvm-config.cpp
  sed -i 's:LLVM_LIBDIR="${prefix}/lib":LLVM_LIBDIR="${prefix}/lib/llvm":' \
    autoconf/configure.ac \
    configure

  # Fix insecure rpath (http://bugs.archlinux.org/task/14017)
  sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules

  # Apply strip option to configure
  _optimized_switch="enable"
  [[ $(check_option strip) == n ]] && _optimized_switch="disable"
  msg "optimized: $_optimized_switch"

  # Include location of libffi headers in CPPFLAGS
  export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)"

  # Force the use of GCC instead of clang
  CC=gcc CXX=g++ \
  ./configure \
    --with-python=/usr/bin/python2 \
    --prefix=/usr \
    --libdir=/usr/lib/llvm \
    --sysconfdir=/etc \
    --enable-shared \
    --enable-libffi \
    --enable-targets=all \
    --enable-experimental-targets=R600 \
    --disable-expensive-checks \
    --with-binutils-include=/usr/include \
    --$_optimized_switch-optimized

  make REQUIRES_RTTI=1
  make -C docs -f Makefile.sphinx man
  make -C docs -f Makefile.sphinx html
}

package() {
  cd "$srcdir/$_svnmod-build"

  make DESTDIR="$pkgdir" install
  # OCaml bindings go to a separate package
  rm -rf "$srcdir"/{ocaml,ocamldoc}
  mv "$pkgdir"/usr/{lib/ocaml,share/doc/llvm/ocamldoc} "$srcdir"

  # Remove duplicate files installed by the OCaml bindings
  rm "$pkgdir"/usr/{lib/llvm/libllvm*,share/doc/llvm/ocamldoc.tar.gz}

  # Fix permissions of static libs
  chmod -x "$pkgdir"/usr/lib/llvm/*.a

  # Get rid of example Hello transformation
  rm "$pkgdir"/usr/lib/llvm/*LLVMHello.*

  # Add ld.so.conf.d entry
  install -d "$pkgdir/etc/ld.so.conf.d"
  echo /usr/lib/llvm >"$pkgdir/etc/ld.so.conf.d/llvm.conf"

  # Symlink LLVMgold.so into /usr/lib/bfd-plugins
  # (https://bugs.archlinux.org/task/28479)
  install -d "$pkgdir/usr/lib/bfd-plugins"
  ln -s ../llvm/LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"

  if [[ $CARCH == x86_64 ]]; then
    # Needed for multilib (https://bugs.archlinux.org/task/29951)
    # Header stubs are taken from Fedora
    for _header in config llvm-config; do
      mv "$pkgdir/usr/include/llvm/Config/$_header"{,-64}.h
      cp "$srcdir/llvm-Config-$_header.h" \
        "$pkgdir/usr/include/llvm/Config/$_header.h"
    done
  fi

  # Install man pages
  install -d "$pkgdir/usr/share/man/man1"
  cp docs/_build/man/*.1 "$pkgdir/usr/share/man/man1/"

  # Install html docs
  cp -r docs/_build/html/* "$pkgdir/usr/share/doc/llvm/html/"
  rm -r "$pkgdir/usr/share/doc/llvm/html/_sources"

  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_clang() {
  pkgdesc="C language family frontend for LLVM"
  url="http://clang.llvm.org/"
  depends=("llvm=$pkgver-$pkgrel" 'gcc')

  # Fix installation path for clang docs
  sed -i 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \
    "$srcdir/$_svnmod-build/Makefile.config"

  cd "$srcdir/$_svnmod-build/tools/clang"
  make DESTDIR="$pkgdir" install

  # Fix permissions of static libs
  chmod -x "$pkgdir"/usr/lib/llvm/*.a

#  # Revert the path change in case we want to do a repackage later
#  sed -i 's:$(PROJ_prefix)/share/doc/clang:$(PROJ_prefix)/share/doc/llvm:' \
#    "$srcdir/$_svnmod-build/Makefile.config"

#  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/clang/LICENSE"
}

Edit: Damn, that sucks.

pkgname=libclc
pkgver=20130307
pkgrel=1
pkgdesc="Library requirements of the OpenCL C programming language"
arch=('i686' 'x86_64')
url="http://libclc.llvm.org/"
license=('MIT')
depends=('llvm-amdgpu-svn')
makedepends=('git' 'python2')

_gitname=libclc
#_gitroot=git://people.freedesktop.org/~tstellar/${_gitname}
_svntrunk='http://llvm.org/svn/llvm-project/libclc/trunk'
_svnmod='libclc'

build() {
  cd "$srcdir"
  msg "Connecting to llvm SVN server...."

  if [[ -d "$_svnmod/.svn" ]]; then
    echo #(cd "$_svnmod" && svn up)
  else
    svn co "$_svntrunk" --config-dir ./ "$_svnmod"
  fi

  rm -rf "$srcdir/$_svnmod-build"
  svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  cd "$srcdir/$_svnmod-build"


  #some fixes because llvm 3.3 changed some header file locations
  sed -i "s;llvm/Function.h;llvm/IR/Function.h;g" utils/prepare-builtins.cpp
  sed -i "s;llvm/GlobalVariable.h;llvm/IR/GlobalVariable.h;g" utils/prepare-builtins.cpp
  sed -i "s;llvm/LLVMContext.h;llvm/IR/LLVMContext.h;g" utils/prepare-builtins.cpp
  sed -i "s;llvm/Module.h;llvm/IR/Module.h;g" utils/prepare-builtins.cpp

  # http://marc.info/?l=mesa3d-dev&m=135423641422147 formatting is so broken that it's easier to do it by hand
  cat > configure.py <<"EOF"
#!/usr/bin/env python2

def c_compiler_rule(b, name, description, compiler, flags):
  command = "%s -MMD -MF $out.d %s -c -o $out $in" % (compiler, flags)
  b.rule(name, command, description + " $out", depfile="$out.d")

version_major = 0;
version_minor = 0;
version_patch = 1;

from optparse import OptionParser
import os
from subprocess import *
import sys

srcdir = os.path.dirname(sys.argv[0])

sys.path.insert(0, os.path.join(srcdir, 'build'))
import metabuild

p = OptionParser()
p.add_option('--with-llvm-config', metavar='PATH',
             help='use given llvm-config script')
p.add_option('--prefix', metavar='PATH',
             help='install to given prefix')
p.add_option('--libexecdir', metavar='PATH',
             help='install *.bc to given dir')
p.add_option('--includedir', metavar='PATH',
             help='install include files to given dir')
p.add_option('--pkgconfigdir', metavar='PATH',
             help='install clc.pc to given dir')
p.add_option('-g', metavar='GENERATOR', default='make',
             help='use given generator (default: make)')
(options, args) = p.parse_args()

llvm_config_exe = options.with_llvm_config or "llvm-config"

prefix = options.prefix
if not prefix:
  prefix = '/usr/local'

libexecdir = options.libexecdir
if not libexecdir:
  libexecdir = os.path.join(prefix, 'lib/clc')

includedir = options.includedir
if not includedir:
  includedir = os.path.join(prefix, 'include')

pkgconfigdir = options.pkgconfigdir
if not pkgconfigdir:
  pkgconfigdir = os.path.join(prefix, 'lib/pkgconfig')

def llvm_config(args):
  try:
    proc = Popen([llvm_config_exe] + args, stdout=PIPE)
    return proc.communicate()[0].rstrip().replace('\n', ' ')
  except OSError:
    print "Error executing llvm-config."
    print "Please ensure that llvm-config is in your $PATH, or use --with-llvm-config."
    sys.exit(1)

llvm_bindir = llvm_config(['--bindir'])
llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' ' + \
                 llvm_config(['--ldflags'])
llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'

llvm_clang = os.path.join(llvm_bindir, 'clang')
llvm_link = os.path.join(llvm_bindir, 'llvm-link')
llvm_opt = os.path.join(llvm_bindir, 'opt')

default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--']

targets = args
if not targets:
  targets = default_targets

b = metabuild.from_name(options.g)

b.rule("LLVM_AS", "%s -o $out $in" % os.path.join(llvm_bindir, "llvm-as"),
       'LLVM-AS $out')
b.rule("LLVM_LINK", command = llvm_link + " -o $out $in",
       description = 'LLVM-LINK $out')
b.rule("OPT", command = llvm_opt + " -O3 -o $out $in",
       description = 'OPT $out')

c_compiler_rule(b, "LLVM_TOOL_CXX", 'LLVM-CXX', 'clang++', llvm_cxxflags)
b.rule("LLVM_TOOL_LINK", "clang++ -o $out $in %s" % llvm_core_libs, 'LINK $out')

prepare_builtins = os.path.join('utils', 'prepare-builtins')
b.build(os.path.join('utils', 'prepare-builtins.o'), "LLVM_TOOL_CXX",
        os.path.join(srcdir, 'utils', 'prepare-builtins.cpp'))
b.build(prepare_builtins, "LLVM_TOOL_LINK",
        os.path.join('utils', 'prepare-builtins.o'))

b.rule("PREPARE_BUILTINS", "%s -o $out $in" % prepare_builtins,
       'PREPARE-BUILTINS $out')

manifest_deps = set([sys.argv[0], os.path.join(srcdir, 'build', 'metabuild.py'),
                     os.path.join(srcdir, 'build', 'ninja_syntax.py')])

install_files_bc = []
install_deps = []

# Create libclc.pc
clc = open('libclc.pc', 'w')
clc.write('includedir=%(inc)s\nlibexecdir=%(lib)s\n\nName: libclc\nDescription: \
Library requirements of the OpenCL C programming language\nVersion: \
%(maj)s.%(min)s.%(pat)s\nCflags: -I${includedir}\nLibs: -L${libexecdir}' % {'inc': \
includedir, 'lib': libexecdir, 'maj': version_major, 'min': version_minor, 'pat': \
version_patch})
clc.close()


for target in targets:
  (t_arch, t_vendor, t_os) = target.split('-')
  archs = [t_arch]
  if t_arch == 'nvptx' or t_arch == 'nvptx64':
    archs.append('ptx')
  archs.append('generic')

  subdirs = []
  for arch in archs:
    subdirs.append("%s-%s-%s" % (arch, t_vendor, t_os))
    subdirs.append("%s-%s" % (arch, t_os))
    subdirs.append(arch)

  incdirs = filter(os.path.isdir,
               [os.path.join(srcdir, subdir, 'include') for subdir in subdirs])
  libdirs = filter(lambda d: os.path.isfile(os.path.join(d, 'SOURCES')),
                   [os.path.join(srcdir, subdir, 'lib') for subdir in subdirs])

  clang_cl_includes = ' '.join(["-I%s" % incdir for incdir in incdirs])

  # The rule for building a .bc file for the specified architecture using clang.
  clang_bc_flags = "-target %s -I`dirname $in` %s " \
                   "-Dcl_clang_storage_class_specifiers " \
                   "-Dcl_khr_fp64 " \
                   "-emit-llvm" % (target, clang_cl_includes)
  clang_bc_rule = "CLANG_CL_BC_" + target
  c_compiler_rule(b, clang_bc_rule, "LLVM-CC", llvm_clang, clang_bc_flags)
  
  objects = []
  sources_seen = set()

  for libdir in libdirs:
    subdir_list_file = os.path.join(libdir, 'SOURCES')
    manifest_deps.add(subdir_list_file)
    for src in open(subdir_list_file).readlines():
      src = src.rstrip()
      if src not in sources_seen:
        sources_seen.add(src)
        obj = os.path.join(target, 'lib', src + '.bc')
        objects.append(obj)
        src_file = os.path.join(libdir, src)
        ext = os.path.splitext(src)[1]
        if ext == '.ll':
          b.build(obj, 'LLVM_AS', src_file)
        else:
          b.build(obj, clang_bc_rule, src_file)

  builtins_link_bc = os.path.join(target, 'lib', 'builtins.link.bc')
  builtins_opt_bc = os.path.join(target, 'lib', 'builtins.opt.bc')
  builtins_bc = os.path.join('built_libs', target + '.bc')
  b.build(builtins_link_bc, "LLVM_LINK", objects)
  b.build(builtins_opt_bc, "OPT", builtins_link_bc)
  b.build(builtins_bc, "PREPARE_BUILTINS", builtins_opt_bc, prepare_builtins)
  install_files_bc.append((builtins_bc, builtins_bc))
  install_deps.append(builtins_bc)
  b.default(builtins_bc)

install_cmd = ' && '.join(['mkdir -p $(DESTDIR)/%(dst)s && cp -r %(src)s \
$(DESTDIR)/%(dst)s' % {'src': file,
                            'dst': libexecdir}
                           for (file, dest) in install_files_bc])
install_cmd = ' && '.join(['%(old)s && mkdir -p $(DESTDIR)/%(dst)s && cp -r \
generic/include/clc $(DESTDIR)/%(dst)s' % {'old': \
install_cmd, 'dst': includedir}])
install_cmd = ' && '.join(['%(old)s && mkdir -p $(DESTDIR)/%(dst)s && cp -r \
libclc.pc $(DESTDIR)/%(dst)s' % {'old': install_cmd, 
                            'dst': pkgconfigdir}])
  
b.rule('install', command = install_cmd, description = 'INSTALL')
b.build('install', 'install', install_deps)

b.rule("configure", command = ' '.join(sys.argv), description = 'CONFIGURE',
       generator = True)
b.build(b.output_filename(), 'configure', list(manifest_deps))

b.finish()
EOF

  python2 configure.py --prefix=/usr
  make
}

package() {
  cd "${srcdir}/$_svnmod-build"

  make DESTDIR="$pkgdir" install

  install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

If anyone wants to fix that stuff and do put in in the AUR, go ahead.

Edit2: Also it needs --with-clang-libdir=/usr/lib with mesa.

Last edited by Cdh (2013-04-06 10:13:14)


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2428 2013-04-16 15:34:07

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,930

Re: Discussion: the ati/radeon open source drivers & radeon repository

To those using mesa-git that's build with llvm support :

mesa now needs elfutils to deal with llvm.
lib32-elfutils in aur is currently broken, so there's no way to build lib32-mesa-git against llvm until that package is fixed.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#2429 2013-04-16 15:40:19

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

Lone_Wolf wrote:

To those using mesa-git that's build with llvm support :

mesa now needs elfutils to deal with llvm.
lib32-elfutils in aur is currently broken, so there's no way to build lib32-mesa-git against llvm until that package is fixed.

I will see to fix and add this library to multilib. Just wait a little bit smile

Offline

#2430 2013-04-16 16:50:41

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Discussion: the ati/radeon open source drivers & radeon repository

moved to Arch Discussion...


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#2431 2013-04-16 18:15:56

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

Just apply https://raw.github.com/PhantomX/slackbu … cess.patch

It's a new error check in gcc 4.8 that breaks existing software. Not a very good decision from gcc I think. Would have been better as a warning.
- uninformed me

Last edited by Cdh (2013-04-16 18:16:44)


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2432 2013-04-17 10:01:29

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,930

Re: Discussion: the ati/radeon open source drivers & radeon repository

lordheavy fixed lib32-elfutils and added it to the multilib repo, so all lib32 mesa-git packages that use llvm can now be built again.

Thanks for the fast action, lordheavy .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#2433 2013-04-24 09:56:13

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

Mesa doesn't compile with llvm-amdgpu-svn 180177-1, right?

In file included from gallivm/lp_bld_misc.cpp:71:0:
/usr/include/llvm/Wrap.h: In function 'llvm::Type* llvm::unwrap(LLVMTypeRef)':
/usr/include/llvm/Wrap.h:62:3: error: redefinition of 'llvm::Type* llvm::unwrap(LLVMTypeRef)'
   DEFINE_ISA_CONVERSION_FUNCTIONS   (Type,               LLVMTypeRef          )
   ^

฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2434 2013-04-24 14:00:15

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

This seems to be a problem in llvm itself

edit: It should be fixed with r180188 at least

Last edited by lordheavy (2013-04-24 15:00:43)

Offline

#2435 2013-04-24 21:12:16

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

lordheavy wrote:

edit: It should be fixed with r180188 at least

Yes, it compiles. Thanks for the packages.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2436 2013-05-01 22:20:34

splashy
Member
Registered: 2010-08-21
Posts: 128

Re: Discussion: the ati/radeon open source drivers & radeon repository

So I found this:
http://chithanh.blogspot.de/2013/04/new … urous.html
http://www.spinics.net/lists/dri-devel/msg36692.html
It seems like vdpau is now avaible for RV710 (Radeon 4350-4670, 4770) and soon RV770 (4200, 4730, 4830-4890) with the support of all codecs (H264, MPEG4...).

Does anybody have more informations about it? Can we patch it already on mesa-git and others? Maybe provide a linux-firmware, basically reproduce what this gentoo dude did but for archlinux?
Thanks and I'm happy to see something coming after waiting a long time.

Last edited by splashy (2013-05-01 22:21:00)

Offline

#2437 2013-05-01 22:36:48

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

For uvd, you'll need the kernel 3.10 prerelease (1) (not yet available), patch the kernel 3.9, or use the kernel-drm-next tree (2), and of course mesa from git

(1) https://aur.archlinux.org/packages/linux-mainline
(2) http://cgit.freedesktop.org/~airlied/linux/?h=drm-next

Offline

#2438 2013-05-02 10:18:19

splashy
Member
Registered: 2010-08-21
Posts: 128

Re: Discussion: the ati/radeon open source drivers & radeon repository

Thanks for your response. What's the easiest way to install kernel-drm-next tree? Do I git clone the repo, compile it and manually complete the procedure with Y N and M or is their a pkgbuild that I could modify to use the drm-next tree without having to worry about the compilation of linux?
Thanks.

Offline

#2439 2013-05-02 10:53:31

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

splashy wrote:

Thanks for your response. What's the easiest way to install kernel-drm-next tree? Do I git clone the repo, compile it and manually complete the procedure with Y N and M or is their a pkgbuild that I could modify to use the drm-next tree without having to worry about the compilation of linux?
Thanks.

You can modify the linux-mainline package in aur, or wait for miffe repo to be updated with next testing kernel:

# for kernel-mainline (rc releases)
[miffe]
Server = http://arch.miffe.org/$arch

Offline

#2440 2013-05-07 17:31:57

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

Maybe I can save some people some time.

A recent git commit to mesa edit: or a new llvm revision made the compiled package about 130 megabyte bigger. As I have learned that is a good sign that something is wrong and indeed I couldn't start X:

X: /build/llvm-amdgpu-svn/src/trunk/include/llvm/Support/CommandLine.h:644: void llvm::cl::parser<DataType>::addLiteralOption(const char*, const DT&, const char*) [with DT = llvm::ScheduleDAGInstrs* (*)(llvm::MachineSchedContext*); DataType = llvm::ScheduleDAGInstrs* (*)(llvm::MachineSchedContext*)]: Assertion `findOption(Name) == Values.size() && "Option already exists!"' failed.

I have found this bugreport: https://bugs.freedesktop.org/show_bug.cgi?id=61364#c9

When compiling with --with-llvm-shared-libs, mesa is much smaller than without. I'm not sure what mesa packages by default but it seems it packages llvm libs that are on the system anyway, so this may be good to have anyway.

Haven't tested yet if it fixes it for me though and it doesn't work with lib32 mesa

checking for "/usr/lib32/llvm-3.3svn/libLLVM-3.3svn.so"... configure: error: cannot check for file existence when cross compiling

Last edited by Cdh (2013-05-07 20:48:33)


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2441 2013-05-09 18:55:42

Old user, new ID
Member
Registered: 2012-09-18
Posts: 13

Re: Discussion: the ati/radeon open source drivers & radeon repository

@lordheavy

It would be great if mesa-git group was added to the packages in the repo.
Then we could use --ignoregroup if we wished to not update the packages daily.

Offline

#2442 2013-05-13 11:26:28

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 678

Re: Discussion: the ati/radeon open source drivers & radeon repository

I can't make uvd work with kernel 3.10 rc1. Is mesa-git compiled with "--enable-vdpau" option?

UVD is enabled in kernel

[    1.985982] [drm] UVD initialized successfully.

My card is HD7950 using radeonsi driver.

vdpauinfo output

display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 
422    16384 16384  NV12 
444    16384 16384  NV12 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                16  9216  2048  1152
MPEG2_SIMPLE         16  9216  2048  1152
MPEG2_MAIN           16  9216  2048  1152
H264_BASELINE        16  9216  2048  1152
H264_MAIN            16  9216  2048  1152
H264_HIGH            16  9216  2048  1152
VC1_SIMPLE           16  9216  2048  1152
VC1_MAIN             16  9216  2048  1152
VC1_ADVANCED         16  9216  2048  1152
MPEG4_PART2_SP       16  9216  2048  1152
MPEG4_PART2_ASP      16  9216  2048  1152

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 
R8G8B8A8         16384 16384    y  NV12 
R10G10B10A2      16384 16384    y  NV12 
B10G10R10A2      16384 16384    y  NV12 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             -
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         -
HIGH QUALITY SCALING - L1        -
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  

Excuse my poor English.

Offline

#2443 2013-05-13 12:34:06

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

agapito wrote:

I can't make uvd work with kernel 3.10 rc1. Is mesa-git compiled with "--enable-vdpau" option?

UVD is enabled in kernel

[    1.985982] [drm] UVD initialized successfully.

My card is HD7950 using radeonsi driver.

vdpauinfo output

display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 
422    16384 16384  NV12 
444    16384 16384  NV12 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                16  9216  2048  1152
MPEG2_SIMPLE         16  9216  2048  1152
MPEG2_MAIN           16  9216  2048  1152
H264_BASELINE        16  9216  2048  1152
H264_MAIN            16  9216  2048  1152
H264_HIGH            16  9216  2048  1152
VC1_SIMPLE           16  9216  2048  1152
VC1_MAIN             16  9216  2048  1152
VC1_ADVANCED         16  9216  2048  1152
MPEG4_PART2_SP       16  9216  2048  1152
MPEG4_PART2_ASP      16  9216  2048  1152

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 
R8G8B8A8         16384 16384    y  NV12 
R10G10B10A2      16384 16384    y  NV12 
B10G10R10A2      16384 16384    y  NV12 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             -
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         -
HIGH QUALITY SCALING - L1        -
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  

With mplayer:

VDPAU_DRIVER=r600 mplayer The.**********.mkv
MPlayer SVN-r35920-4.8.0 (C) 2000-2013 MPlayer Team
203 audio & 421 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing The.**********.mkv.
libavformat version 54.63.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (dca), -aid 0
VIDEO:  [H264]  1280x544  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
 creation_time: 2012-02-21 21:12:58
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.92.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 1536.0 kbit/50.00% (ratio: 192000->384000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 2.35:1 - prescaling to correct movie aspect.
VO: [vdpau] 1280x544 => 1280x544 Planar YV12 
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
A:   3.1 V:   3.1 A-V:  0.001 ct:  0.041   0/  0 28%  2%  1.6% 0 0 

Exiting... (Quit)

With a radeon HD6870

Edit: yes, mesa-git packages are built with vdpau enabled

Last edited by lordheavy (2013-05-13 16:48:44)

Offline

#2444 2013-05-13 16:23:57

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Discussion: the ati/radeon open source drivers & radeon repository

Could you set up some automated compile test for llvm in your repo?

gallivm/lp_bld_debug.cpp: In function 'size_t disassemble(const void*, llvm::raw_ostream&)':
gallivm/lp_bld_debug.cpp:216:64: error: no matching function for call to 'llvm::Target::createMCAsmInfo(std::string&) const'
    OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
                                                                ^

฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#2445 2013-05-13 16:27:29

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

Cdh wrote:

Could you set up some automated compile test for llvm in your repo?

gallivm/lp_bld_debug.cpp: In function 'size_t disassemble(const void*, llvm::raw_ostream&)':
gallivm/lp_bld_debug.cpp:216:64: error: no matching function for call to 'llvm::Target::createMCAsmInfo(std::string&) const'
    OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
                                                                ^

http://lists.freedesktop.org/archives/m … 39311.html

Offline

#2446 2013-05-13 16:51:37

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

Old user, new ID wrote:

@lordheavy

It would be great if mesa-git group was added to the packages in the repo.
Then we could use --ignoregroup if we wished to not update the packages daily.

Done, the name of the group (llvm, mesa-git) is 'mesagit'

Offline

#2447 2013-05-17 03:04:22

Old user, new ID
Member
Registered: 2012-09-18
Posts: 13

Re: Discussion: the ati/radeon open source drivers & radeon repository

lordheavy wrote:

Done, the name of the group (llvm, mesa-git) is 'mesagit'

Thanks.

Offline

#2448 2013-05-18 19:48:43

kuglee
Member
Registered: 2011-09-02
Posts: 61

Re: Discussion: the ati/radeon open source drivers & radeon repository

I don't know if it's the best place to post this.
I've managed to get vdpau working with the driver. It's a good thing that flash works with vdpau, but it has a serious bug: flash content leaks from one to an other so they on top of each other. I've seached for a fix, but unfortunotely the fixes were related to nvidia, and they didn't work. Of course disabling hardware acceleration "fixes" the problem, but that's not what I want.
Does anyone else experiencing this issue? I also have this on Ubuntu.

Offline

#2449 2013-05-22 20:47:03

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

With recent update to the mesa-git repository, OpenCL support for evergreen+ GPUs (x86_64 and i686) is available

There is the following new packages:
* clang-svn
* clang-analyzer-svn
* llvm-ocaml-svn
* libclc-amdgpu-svn

I've not yet tested OpenCL, but you will have to install at least ati-dri-git, clang-svn and libclc-amdgpu-svn and follow http://dri.freedesktop.org/wiki/GalliumCompute/
Do not hesitate to post here your experiences and update to radeon wiki (https://wiki.archlinux.org/index.php/Radeon)

Have fun!

Last edited by lordheavy (2013-05-22 20:50:27)

Offline

#2450 2013-05-22 23:52:43

lordheavy
Developer
From: France
Registered: 2010-04-01
Posts: 292

Re: Discussion: the ati/radeon open source drivers & radeon repository

with http://cgit.freedesktop.org/~tstellar/opencl-example/ :

[lordh@archMain opencl-example]$ ./hello_world 
There are 1 platforms.
There are 1 GPU devices.
clCreateContext() succeeded.
clCreateCommandQueue() succeeded.
clCreateProgramWithSource() suceeded.
clBuildProgram() suceeded.
clCreateKernel() suceeded.
clCreateBuffer() succeeded.
clSetKernelArg() succeeded.
clEnqueueNDRangeKernel() suceeded.
clFinish() succeeded.
clEnqueueReadBuffer() suceeded.
pi = 3.141590
[lordh@archMain opencl-example]$ ./run_tests.sh 
Running ./math-int add 1 2 3
Passed
Running ./math-int add 2 1 3
Passed
Running ./math-int add -5 10 5
Passed
Running ./math-int add -1 -4 -5
Passed
Running ./math-int mul 4 5 20
Passed
Running ./math-int mul 8 0 0
Passed
Running ./math-int mul -3 8 -24
Passed
Running ./math-int mul -12 -6 72
Passed
Running ./math-int div 20 5 4
Passed
Running ./math-int div 23 5 4
Passed
Running ./math-int div 30 1 30
Passed
Running ./math-int div 57 -1 -57
Passed
Running ./math-int div 10 -2 -5
Passed
Running ./math-int div 17 -3 -5
Passed
Running ./math-int div -28 2 -14
Passed
Running ./math-int div -8 3 -2
Passed
Running ./math-int div -25 -5 5
Passed
Running ./math-int div -24 -5 4
Passed
Running ./math-int mod 18 6 0
Passed
Running ./math-int mod 59 12 11
Passed
Running ./math-int mod -20 5 0
Passed
Running ./math-int mod -18 5 -3
Passed
Running ./math-int mod 50 -10 0
Passed
Running ./math-int mod 16 -3 1
Passed
Running ./math-int mod 2147483647 12345 9172
Passed
Running ./math-int mod -2147483648 476 -128
Passed
Running ./math-int mod 10 20 10
Passed
Running ./math-int mod_nine 18 9 0
Passed
Running ./math-int mod_nine 23 9 5
Passed
Running ./math-int mod_four 20 4 0
Passed
Running ./math-int mod_four 5 4 1
Passed
Running ./get-global-id 100 100
Passed
Running ./get-global-id 250 1
Passed
Running ./math-int if_gt 5 4 1
Passed
Running ./math-int if_gt 5 6 0
Passed
Running ./math-int if_gt -20 10 0
Passed
Running ./math-int if_gt -5 8 0
Passed
Running ./math-int if_gt 12 -15 1
Passed
Running ./math-int if_gt 16 -3 1
Passed
Running ./math-int if_ge 8 7 1
Passed
Running ./math-int if_ge 10 10 1
Passed
Running ./math-int if_ge 20 30 0
Passed
Running ./math-int if_ge 3 -8 1
Passed
Running ./math-int if_ge -5 5 0
Passed
Running ./math-int if_ge -20 10 0
Passed
Running ./math-int if_eq 21 21 1
Passed
Running ./math-int if_eq 30 18 0
Passed
Running ./math-int if_eq -12 12 0
Passed
Running ./math-int if_eq 81 -81 0
Passed
Running ./math-int if_lt 2 10 1
Passed
Running ./math-int if_lt -20 3 1
Passed
Running ./math-int if_lt 15 3 0
Passed
Running ./math-int if_le 20 25 1
Passed
Running ./math-int if_le 18 18 1
Passed
Running ./math-int if_le -10 5 1
Passed
Running ./math-int if_le 18 9 0
Passed
Running ./math-int if_le 10 -20 0
Passed
Running ./math-int if_ne 10 9 1
Passed
Running ./math-int if_ne -20 20 1
Passed
Running ./math-int if_ne 31 -31 1
Passed
Running ./math-int if_ne 3 3 0
Passed
Running ./loop loop_lt 10
Passed
Running ./loop loop_le 10
Passed
Running ./loop loop_gt 10
Passed
Running ./loop loop_ge 10
Passed
Running ./math-int rotl 1 1 2
Passed
Running ./math-int rotl 1 32 1
Passed
Running ./math-int rotl -1 5 -1
Passed
Running ./math-int rotl 4096 23 8
Passed
Running ./use-host-ptr 10
Passed
Running ./vec-load
Passed
71 passes, 0 fails

Offline

Board footer

Powered by FluxBB