Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[radeonhd - git] No 2D or 3D acceleration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
earendilion
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2007
Posts: 115
Location: Meudon (92), France

PostPosted: Thu May 14, 2009 6:23 am    Post subject: [radeonhd - git] No 2D or 3D acceleration Reply with quote

Hi all,

I've got some problem to get 2d acceleration with radeonhd driver : the windows painting is really bad.

I cannot get desktop effects with kwin...

I use radeonhd git version (from zen-overlay). My libdrm version is 2.4.9, xorg-server 1.5.3-r6 and mesa is 7.4.9.

Here is my xorg.conf :

Code:
Section "Module"
        Load "glx"
        Load "dri"
        Load "drm"
EndSection

Section "Device"
        Identifier  "ati"
        Driver      "radeonhd"
        VendorName  "ati"
        BoardName   "HD 4850"
        Option "AccelMethod" "exa"
        Option "DRI" "True"
EndSection

Section "Extensions"
        Option "Composite" "On"
        Option  "RENDER" "On"
EndSection
Section "ServerFlags"
        Option "AIGLX" "On"
EndSection

Section "DRI"
        Group "video"
        Mode 0666
EndSection


With glxgears I get these results :

Code:
606 frames in 5.0 seconds = 121.007 FPS
606 frames in 5.0 seconds = 121.050 FPS
607 frames in 5.0 seconds = 121.211 FPS
606 frames in 5.0 seconds = 121.083 FPS
607 frames in 5.0 seconds = 121.211 FPS
606 frames in 5.0 seconds = 121.118 FPS
606 frames in 5.0 seconds = 121.090 FPS


Code:
earendil@ithil ~ $ glxinfo | grep rendering
direct rendering: Yes



Here is the KDM log (no error in Xorg.0.log :

Code:
(EE) RADEONHD(0): RHDDRIVersionCheck: drmOpen("radeon", "pci:0000:04:00.0") failed.



Should I use a more recent libdrm/mesa version (is there an ebuild on some overlay for git version ?)
Is there some option I forgot in the xorg.conf ?

Thank you for your help ;)
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Thu May 14, 2009 11:30 am    Post subject: Reply with quote

You're using a HD 48xx. Anything made in the last few years does not have usable open-source 3d support yet. You'll need to wait, or use fglrx in the meantime. It will probably take another couple of months to have things like desktop effects properly accelerated in 3d. The development pace is very fast, but there's lots of work to be done.

Additionally, you'll need an updated drm. You can get it by installing a 2.6.30 kernel or by building drm from git. Without a new drm, there is no 2D acceleration either (EXA). Follow the instructions here to get the latest drm.

Then you'll need to set the KWin backend to XRender. 3d effects will not work, but many other effects work great with 2D acceleration (stuff like expose, compositing, animations, thumbnails, etc.) This is what I use with a recent radeon driver and it works great (HD 4550).
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7693
Location: Pelotas, BR

PostPosted: Thu May 14, 2009 8:32 pm    Post subject: Reply with quote

Moved from Desktop Environments to Unsupported Software.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Fri May 15, 2009 6:50 am    Post subject: Reply with quote

pingufunkybeat wrote:
You're using a HD 48xx. Anything made in the last few years does not have usable open-source 3d support yet. You'll need to wait, or use fglrx in the meantime. It will probably take another couple of months to have things like desktop effects properly accelerated in 3d. The development pace is very fast, but there's lots of work to be done.

Additionally, you'll need an updated drm. You can get it by installing a 2.6.30 kernel or by building drm from git. Without a new drm, there is no 2D acceleration either (EXA). Follow the instructions here to get the latest drm.

Then you'll need to set the KWin backend to XRender. 3d effects will not work, but many other effects work great with 2D acceleration (stuff like expose, compositing, animations, thumbnails, etc.) This is what I use with a recent radeon driver and it works great (HD 4550).


which drm is it? x11-libs/libdrm or x11-base/x11-drm?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Fri May 15, 2009 12:40 pm    Post subject: Reply with quote

I don't think the needed DRM is in portage. It might be in the x overlay, but I'm not sure. In any case, it has to be from the r6xx-r7xx branch and later than April. 7th.

I compiled it from git, as described in the link I gave. The cleanest solution right now is probably to upgrade to a 2.6.30 kernel, which has the proper drm bits in it already.

With the proper drm installed, the most recent ati driver from portage has EXA and Xvideo, and compositing for all Radeon cards (including HD 4850). The latest radeonhd driver from portage should probably work as well.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Fri May 15, 2009 2:09 pm    Post subject: Reply with quote

well if I'll know which one, I can search for the git package of that one
I don't want to go 30 yet.
how about radeon driver? from what I know, it supports more features.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Fri May 15, 2009 2:38 pm    Post subject: Reply with quote

you could use x11-drm-999999 from x11 overlay and put DRM_LIVE_BRANCH="r6xx-r7xx-support" into your make.conf
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri May 15, 2009 5:58 pm    Post subject: Reply with quote

*subscribes*

I'm also waiting for the radeon / ati-drivers to get 3D-acceleration and advanced power management so that I can (probably) ditch the proprietary drivers and keep on migrating to newer kernels earlier
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Fri May 15, 2009 6:00 pm    Post subject: Reply with quote

kernelOfTruth wrote:
*subscribes*

I'm also waiting for the radeon / ati-drivers to get 3D-acceleration and advanced power management so that I can (probably) ditch the proprietary drivers and keep on migrating to newer kernels earlier


ditch them today, the downsides outweighed the upsides alot
will sacrifice the opengl support for my mental being...
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Fri May 15, 2009 6:42 pm    Post subject: Reply with quote

ssmaxss wrote:
you could use x11-drm-999999 from x11 overlay and put DRM_LIVE_BRANCH="r6xx-r7xx-support" into your make.conf


it just get stuck at remote: Compressing objects: 100% (15755/15755), done.
if I stop and retry, I get an r6xx-r7xx-support uknown error
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Fri May 15, 2009 7:12 pm    Post subject: Reply with quote

Actually I copied x11-drm-9999 ebuild to my local overlay and modified it like this:
Code:
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-base/x11-drm/x11-drm-20070314.ebuild,v 1.2 2007/03/14 18:18:53 battousai Exp $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="1.7"

#EGIT_BRANCH="vblank-rework"


#EGIT_REPO_URI="git://anongit.freedesktop.org/~agd5f/drm"
#EGIT_BRANCH="r6xx-r7xx-3d"
#EGIT_TREE="r6xx-r7xx-3d"
[b]
EGIT_REPO_URI="git://anongit.freedesktop.org/git/mesa/drm"
EGIT_BRANCH="r6xx-r7xx-support"
EGIT_TREE="r6xx-r7xx-support"[/b]
#EGIT_TREE="8938a6bb2420b8853bc81a3b51d39936c2169045"

inherit eutils x11 linux-mod autotools git

IUSE_VIDEO_CARDS="
   video_cards_mach64
   video_cards_mga
   video_cards_nv
   video_cards_r128
   video_cards_radeon
   video_cards_savage
   video_cards_sis
   video_cards_sunffb
   video_cards_tdfx
   video_cards_via"
IUSE="${IUSE_VIDEO_CARDS} kernel_FreeBSD kernel_linux"

# Make sure Portage does _NOT_ strip symbols.  We will do it later and make sure
# that only we only strip stuff that are safe to strip ...
# Tests require user intervention (see bug #236845)
RESTRICT="strip test"

S="${WORKDIR}/drm"
PATCHVER="0.2"
PATCHDIR="${WORKDIR}/patch"
EXCLUDED="${WORKDIR}/excluded"

DESCRIPTION="DRM Kernel Modules for X11"
HOMEPAGE="http://dri.sf.net"
#SRC_URI="http://dev.gentoo.org/~dberkholz/distfiles/${P}-gentoo-${PATCHVER}.tar.bz2"
SRC_URI=""

SLOT="0"
LICENSE="X11"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc x86 ~x86-fbsd"

DEPEND="kernel_linux? ( virtual/linux-sources )
   kernel_FreeBSD? ( sys-freebsd/freebsd-sources
         sys-freebsd/freebsd-mk-defs )"
RDEPEND=""

pkg_setup() {
   # Setup the kernel's stuff.
   kernel_setup

   # Set video cards to build for.
   set_vidcards

   # Determine which -core dir we build in.
   get_drm_build_dir

   return 0
}

src_unpack() {
   git_src_unpack
   cd "${WORKDIR}"
   cd "${S}"
   #epatch "${FILESDIR}"/init_mm.patch

   # unpack "${DISTFILES}"/${P}-gentoo-${PATCHVER}.tar.bz2


   #patch_prepare
   # Apply patches
   #EPATCH_SUFFIX="patch" epatch ${PATCHDIR}

   # Substitute new directory under /lib/modules/${KV_FULL}
   cd "${SRC_BUILD}"
   sed -i -e "s:/kernel/drivers/char/drm:/${PN}:g" Makefile

   cp "${S}"/tests/*.c ${SRC_BUILD}

   src_unpack_os

   cd "${S}"
   eautoreconf -v --install
}

src_compile() {
   unset LDFLAGS

   cd "${S}"
   # Building the programs. These are useful for developers and getting info from DRI and DRM.
   #
   # libdrm objects are needed for drmstat.
   econf \
      --enable-static \
      --disable-shared \
      || die "libdrm configure failed."
   emake || die "libdrm build failed."

   einfo "Building DRM in ${SRC_BUILD}..."
   src_compile_os
   einfo "DRM build finished".
}

src_install() {
   einfo "Installing DRM..."
   cd "${SRC_BUILD}"

   src_install_os

   dodoc "${S}/linux-core/README.drm"

   #dobin dristat
   #dobin drmstat
}

pkg_postinst() {
   if use video_cards_sis
   then
      einfo "SiS direct rendering only works on 300 series chipsets."
      einfo "SiS framebuffer also needs to be enabled in the kernel."
   fi

   if use video_cards_mach64
   then
      einfo "The Mach64 DRI driver is insecure."
      einfo "Malicious clients can write to system memory."
      einfo "For more information, see:"
      einfo "http://dri.freedesktop.org/wiki/ATIMach64."
   fi

   pkg_postinst_os
}

# Functions used above are defined below:

kernel_setup() {
   if use kernel_FreeBSD
   then
      K_RV=${CHOST/*-freebsd/}
   elif use kernel_linux
   then
      linux-mod_pkg_setup

      if kernel_is 2 4
      then
         eerror "Upstream support for 2.4 kernels has been removed, so this package will no"
         eerror "longer support them."
         die "Please use in-kernel DRM or switch to a 2.6 kernel."
      fi

      linux_chkconfig_builtin "DRM" && \
         die "Please disable or modularize DRM in the kernel config. (CONFIG_DRM = n or m)"

      CONFIG_CHECK="AGP"
      ERROR_AGP="AGP support is not enabled in your kernel config (CONFIG_AGP)"
   fi
}

set_vidcards() {
   VIDCARDS=""

   if [[ -n "${VIDEO_CARDS}" ]]; then
      use video_cards_mach64 && \
         VIDCARDS="${VIDCARDS} mach64.${KV_OBJ}"
      use video_cards_mga && \
         VIDCARDS="${VIDCARDS} mga.${KV_OBJ}"
      use video_cards_nv && \
         VIDCARDS="${VIDCARDS} nv.${KV_OBJ} nouveau.${KV_OBJ}"
      use video_cards_r128 && \
         VIDCARDS="${VIDCARDS} r128.${KV_OBJ}"
      use video_cards_radeon && \
         VIDCARDS="${VIDCARDS} radeon.${KV_OBJ}"
      use video_cards_savage && \
         VIDCARDS="${VIDCARDS} savage.${KV_OBJ}"
      use video_cards_sis && \
         VIDCARDS="${VIDCARDS} sis.${KV_OBJ}"
      use video_cards_via && \
         VIDCARDS="${VIDCARDS} via.${KV_OBJ}"
      use video_cards_sunffb && \
         VIDCARDS="${VIDCARDS} ffb.${KV_OBJ}"
      use video_cards_tdfx && \
         VIDCARDS="${VIDCARDS} tdfx.${KV_OBJ}"
   fi
}

get_drm_build_dir() {
   if use kernel_FreeBSD
   then
      SRC_BUILD="${S}/bsd-core"
   elif kernel_is 2 6
   then
      SRC_BUILD="${S}/linux-core"
   fi
}

patch_prepare() {
   # Handle exclusions based on the following...
   #     All trees (0**), Standard only (1**), Others (none right now)
   #     2.4 vs. 2.6 kernels
   if use kernel_linux
   then
       kernel_is 2 6 && mv -f "${PATCHDIR}"/*kernel-2.4* "${EXCLUDED}"
   fi

   # There is only one tree being maintained now. No numeric exclusions need
   # to be done based on DRM tree.
}

src_unpack_linux() {
   convert_to_m "${SRC_BUILD}"/Makefile
}

src_unpack_freebsd() {
   # Link in freebsd kernel.
   ln -s "/usr/src/sys-${K_RV}" "${WORKDIR}/sys"
   # SUBDIR variable gets to all Makefiles, we need it only in the main one.
   SUBDIRS=${VIDCARDS//.ko}
   sed -i -e "s:SUBDIR\ =.*:SUBDIR\ =\ drm ${SUBDIRS}:" "${SRC_BUILD}"/Makefile
}

src_unpack_os() {
   if use kernel_linux; then
      src_unpack_linux
   elif use kernel_FreeBSD
   then
      src_unpack_freebsd
   fi
}

src_compile_os() {
   if use kernel_linux
   then
      src_compile_linux
   elif use kernel_FreeBSD
   then
      src_compile_freebsd
   fi
}

src_install_os() {
   if use kernel_linux
   then
      src_install_linux
   elif use kernel_FreeBSD
   then
      src_install_freebsd
   fi
}

src_compile_linux() {
   # remove leading and trailing space
   VIDCARDS="${VIDCARDS% }"
   VIDCARDS="${VIDCARDS# }"

   check_modules_supported
   MODULE_NAMES=""
   for i in drm.${KV_OBJ} ${VIDCARDS}; do
      MODULE_NAMES="${MODULE_NAMES} ${i/.${KV_OBJ}}(${PN}:${SRC_BUILD})"
      i=$(echo ${i} | tr '[:lower:]' '[:upper:]')
      eval MODULESD_${i}_ENABLED="yes"
   done

   # This now uses an M= build system. Makefile does most of the work.
   cd "${SRC_BUILD}"
   unset ARCH
   BUILD_TARGETS="modules"
   BUILD_PARAMS="DRM_MODULES='${VIDCARDS}' LINUXDIR='${KERNEL_DIR}' M='${SRC_BUILD}'"
   ECONF_PARAMS='' S="${SRC_BUILD}" linux-mod_src_compile

   if linux_chkconfig_present DRM
   then
      ewarn "Please disable in-kernel DRM support to use this package."
   fi

   # LINUXDIR is needed to allow Makefiles to find kernel release.
   #cd "${SRC_BUILD}"
   #emake LINUXDIR="${KERNEL_DIR}" dristat || die "Building dristat failed."
   #emake LINUXDIR="${KERNEL_DIR}" drmstat || die "Building drmstat failed."
}

src_compile_freebsd() {
   cd "${SRC_BUILD}"
   # Environment CFLAGS overwrite kernel CFLAGS which is bad.
   local svcflags=${CFLAGS}; local svldflags=${LDFLAGS}
   unset CFLAGS; unset LDFLAGS
   MAKE=make \
      emake \
      NO_WERROR= \
      SYSDIR="${WORKDIR}/sys" \
      KMODDIR="/boot/modules" \
      || die "pmake failed."
   export CFLAGS=${svcflags}; export LDFLAGS=${svldflags}

   cd "${S}/tests"
   # -D_POSIX_SOURCE skips the definition of several stuff we need
   # for these two to compile
   sed -i -e "s/-D_POSIX_SOURCE//" Makefile
   emake dristat || die "Building dristat failed."
   emake drmstat || die "Building drmstat failed."
   # Move these where the linux stuff expects them
   mv dristat drmstat ${SRC_BUILD}
}

die_error() {
   eerror "Portage could not build the DRM modules. If you see an ACCESS DENIED error,"
   eerror "this could mean that you were using an unsupported kernel build system."
   eerror "Only 2.6 kernels at least as new as 2.6.6 are supported."
   die "Unable to build DRM modules."
}

src_install_linux() {
   linux-mod_src_install

   # Strip binaries, leaving /lib/modules untouched (bug #24415)
   strip_bins \/lib\/modules
}

src_install_freebsd() {
   cd "${SRC_BUILD}"
   dodir "/boot/modules"
   MAKE=make \
      emake \
      install \
      NO_WERROR= \
      DESTDIR="${D}" \
      KMODDIR="/boot/modules" \
      || die "Install failed."
}

pkg_postinst_os() {
   if use kernel_linux
   then
      linux-mod_pkg_postinst
   fi
}
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Fri May 15, 2009 7:51 pm    Post subject: Reply with quote

will try, thanks
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Sat May 16, 2009 6:10 am    Post subject: Reply with quote

okie dokie, done that, 2d acc is nice, still jumpy abit but it is ok, btw, fro some reason, the color of the titles in the site are suddenly pink...
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
scary
n00b
n00b


Joined: 17 Apr 2004
Posts: 47

PostPosted: Wed May 20, 2009 8:27 am    Post subject: Reply with quote

has anyone managed to compile this drm on latest 2.6.30-rc kernels ? i get

drm/linux-core/drm_os_linux.h:54: error: conflicting types for 'irqreturn_t'
include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5325

PostPosted: Wed May 20, 2009 10:59 am    Post subject: Reply with quote

scary wrote:
has anyone managed to compile this drm on latest 2.6.30-rc kernels ? i get

drm/linux-core/drm_os_linux.h:54: error: conflicting types for 'irqreturn_t'
include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here


by drm, do you mean x11-base/x11-drm or x11-libs/libdrm?
if you mean x11-base/x11-drm and by latest you mean from svn to get the 2d acc support, just use the radeon and drm in the kernel, it is a bit older version but 2d acc is supported.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
scary
n00b
n00b


Joined: 17 Apr 2004
Posts: 47

PostPosted: Wed May 20, 2009 5:49 pm    Post subject: Reply with quote

x11-base/x11-drm, I wanted to live on the bleeding edge since I've already been using xf86-video-ati, mesa and libdrm live ebuilds :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
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