Page 1 of 8 123 ... LastLast
Results 1 to 10 of 73

Thread: KMS + Radeon quick mini guide

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    73

    Default KMS + Radeon quick mini build guide

    update 2009 12 23 added some ideas from the comments and kernel stuff for drm radeon testing


    Since the dri wiki left some holes here's a short guide that worked for me.

    Kernel =/> 2.6.32 works

    build with dri/drm/radeon built in to avoid module probing order issues.
    do not use any FB options, these potentially conflict with KMS.

    for interrupts you need last kernel drm and a special extra kernel firmware

    obtain last drm and git linux kernel tree (about 1GB download)
    (this is quite big, drm-radeon-testing appears to be 2.6.32 plus the drm patches at moment of writing)

    Code:
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
    git checkout -b drm-radeon-testing origin/drm-radeon-testing

    Obtain R700_rlc.bin and built it in your kernel, or put it in firmware/radeon/ to load.
    Either way make sure the kernel loads it at boot, else it will stall for 20s and fail to load it, dont panic it will boot further eventually so you can correct things.







    force kms on in grub menu.lst:
    Code:
    kernel /boot/bzImage radeon.modeset=1
    (also available as modprobe radeon modeset=1
    but using modules gave me issues, modprobing drm first was reported to help in some cases)

    Checkout and build git drm,xf86-video-ati (aka ddx),mesa

    Code:
    git clone git://anongit.freedesktop.org/mesa/drm
    git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
    git clone git://anongit.freedesktop.org/mesa/mesa
    The first time you have to autogen inside the respective trees, to generate configure files, install missing proto files and other dependencies when needed.

    Now build it in this order:

    Code:
     > cat builddri 
    #!/bin/sh
    
    cd drm
    make clean
    git pull
    ./configure --enable-radeon-experimental-api --disable-intel && make && make install
    cd ..
    
    
    cd xf86-video-ati
    make clean
    git pull
    ./configure && make && make install
    cd ..
    
    cd mesa 
    make clean
    git pull
    
    # to enable opengl 2 beta code for r600
    # export CFLAGS="$CFLAGS -DR600_ENABLE_GLSL_TEST"
    # this is now the default since december 2009
    
    ./configure --with-dri-drivers=r600 --disable-gallium && make && make install
    cd ..
    Adjust r600 to your card family radeon,r300,r500 etc (see configure --help)

    If everything built without error you can restart xorg.
    Have fun.
    Last edited by pheldens; 12-24-2009 at 06:10 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    73

    Default

    Oh yes if it went well you should boot into a huge graphical KMS console, which you can seamlessly switch with xorg if thats running.

    In xorg you can verify hardware acceleration is working with:

    Code:
    > glxinfo | egrep 'OpenGL (version|renderer) string'
    OpenGL renderer string: Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
    OpenGL version string: 1.5 Mesa 7.8-devel

  3. #3
    Join Date
    Aug 2009
    Posts
    122

    Default

    Quote Originally Posted by pheldens View Post
    Oh yes if it went well you should boot into a huge graphical KMS console, which you can seamlessly switch with xorg if thats running.

    In xorg you can verify hardware acceleration is working with:

    Code:
    > glxinfo | egrep 'OpenGL (version|renderer) string'
    OpenGL renderer string: Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
    OpenGL version string: 1.5 Mesa 7.8-devel
    if you have kms working, you will get DRI2, not just DRI.

    Also, it's better(more stable) to compile drm/radeon as modules and add this line to /etc/modules

    radeon modeset=1

  4. #4
    Join Date
    Jun 2009
    Posts
    2,932

    Default

    Also, it's better(more stable) to compile drm/radeon as modules
    Is it?

    I've had no problems with stability.

  5. #5
    Join Date
    Jan 2008
    Posts
    73

    Default

    The reverse is true here for modules, as there are some autodetection order issues reported, in my experience, but once things have stabilized more it should become identical. Modules ofcourse have the added advantage you can upgrade them without rebooting.


    DRI2 in the version string is a good verification check indeed, if you scroll the CODE box you see it at the end.
    Last edited by pheldens; 11-26-2009 at 05:57 PM.

  6. #6
    Join Date
    May 2009
    Location
    Exodus hair
    Posts
    76

    Default

    Code:
    ~$ glxinfo | egrep 'OpenGL (version|renderer) string'
    do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly.
    Try adjusting the vblank_mode configuration parameter.
    OpenGL renderer string: Mesa DRI R600 (RV635 9598) 20090101  TCL DRI2
    OpenGL version string: 1.5 Mesa 7.8-devel
    (latest versions from ppa:xorg-edgers)

  7. #7
    Join Date
    Jun 2009
    Posts
    1,188

    Default

    add this after git the mesa 7.8 branch to get glsl and gl 2.0

    As for GLSL, to get it you have to edit:

    Code:
    src/mesa/drivers/dri/r600/r600_context.c
    and remove the two slashes at the beginning of this line:

    Code:
    //#define R600_ENABLE_GLSL_TEST 1
    But do note it's commented out for a reason Only use for testing, it's not 'production ready' yet.
    thx to moonraf for this info

  8. #8
    Join Date
    Jun 2009
    Posts
    2,932

    Default

    You can also add -DR600_ENABLE_GLSL_TEST to your CFLAGS, which does the same thing without having to edit the source code.

  9. #9
    Join Date
    Jan 2009
    Location
    Italy
    Posts
    82

    Default

    Quote Originally Posted by pheldens View Post
    but using modules gave me issues, modprobing drm first was reported to help in some cases)
    Smells like FUD The only problem is that you might end up with a blank screen if you forget to load fbcon (the framebuffer console). In particular the drm module is always loaded before radeon since the latter has a hard dependency on it.

  10. #10
    Join Date
    Aug 2009
    Posts
    122

    Default

    Bleh, updated xf86-video-ati from git today, and X doesnt start anymore.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •