Announcement

Collapse
No announcement yet.

KMS + Radeon quick mini guide

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

  • KMS + Radeon quick mini 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; 24 December 2009, 06:10 AM.

  • #2
    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

    Comment


    • #3
      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

      Comment


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

        I've had no problems with stability.

        Comment


        • #5
          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; 26 November 2009, 05:57 PM.

          Comment


          • #6
            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)

            Comment


            • #7
              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

              Comment


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

                Comment


                • #9
                  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.

                  Comment


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

                    Comment

                    Working...
                    X