Announcement

Collapse
No announcement yet.

The Open-Source ATI R500 Driver

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

  • The Open-Source ATI R500 Driver

    Phoronix: The Open-Source ATI R500 Driver

    Last week the first open-source ATI R500 (Radeon X1000 series) driver had entered the world. This new driver (named the xf86-video-avivo) is very early into development, but a small set of developers have been working on reverse engineering this GPU class for the past couple of months. This driver does not yet contain any 3D functionality or support for features that most end-users expect. At this point, the driver just contains very basic initialization and set video mode support for a portion of the Radeon X1000 family. Even with this very basic R500 driver, we couldn't help but to explore the Avivo driver for the past few days.

    http://www.phoronix.com/vr.php?view=10247

  • #2
    Very interesting. Might try it with my X1900XT 512 soon... is it already supported in git?

    I have 6 weeks school holidays starting tomorrow so I could test it for fun.

    Comment


    • #3
      Out of interest, were you able to test with an X1400?

      I added the PCI id for my Lenovo T60 (id is 7145 - M54 Mobility X1400). I get normal looking output on the left side of the screen, but tearing on the right side..

      Thanks,
      Jon.

      Comment


      • #4
        Originally posted by d2kx View Post
        Very interesting. Might try it with my X1900XT 512 soon... is it already supported in git?

        I have 6 weeks school holidays starting tomorrow so I could test it for fun.
        Not supported in git... You'll need to add the IDs manually (see the article).
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #5
          Originally posted by jone View Post
          Out of interest, were you able to test with an X1400?

          I added the PCI id for my Lenovo T60 (id is 7145 - M54 Mobility X1400). I get normal looking output on the left side of the screen, but tearing on the right side..

          Thanks,
          Jon.
          Had no problems with it using yesterday's git. When did you checkout from git?
          Michael Larabel
          http://www.michaellarabel.com/

          Comment


          • #6
            Just about 15 mins ago.

            Am assuming I didn't do anything dim when adding the id, it is an RV515 right? Am running with the 1400x1050 panel, so I guess I could try some different resolutions etc..

            Thanks.

            Comment


            • #7
              Originally posted by jone View Post
              Just about 15 mins ago.

              Am assuming I didn't do anything dim when adding the id, it is an RV515 right? Am running with the 1400x1050 panel, so I guess I could try some different resolutions etc..

              Thanks.
              Yes, RV515. It works for me with 1400 x 1050. There was a git commit a few days ago that corrected it for odd resolutions (those that when divided by 64 wasn't an integer) but that should be all fixed.
              Michael Larabel
              http://www.michaellarabel.com/

              Comment


              • #8
                Fedora 7 with X1700 problem with open-source

                Hi all,

                I've tried using the xf86-video-avivo open-source driver for ati but can't seem to get it working. Could someone please push me in the right direction?

                This is my output:-

                [root@localhost xf86-video-avivo]# ./autogen.sh prefix=/usr/
                autoreconf: Entering directory `.'
                autoreconf: configure.ac: not using Gettext
                autoreconf: running: aclocal
                autoreconf: configure.ac: tracing
                autoreconf: configure.ac: not using Libtool
                autoreconf: running: /usr/local/bin/autoconf
                configure.ac:38: error: possibly undefined macro: AC_DISABLE_STATIC
                If this token and others are legitimate, please use m4_pattern_allow.
                See the Autoconf documentation.
                configure.ac:39: error: possibly undefined macro: AC_PROG_LIBTOOL
                configure.ac:53: error: possibly undefined macro: XORG_DRIVER_CHECK_EXT
                configure.ac:78: error: possibly undefined macro: XORG_MANPAGE_SECTIONS
                configure.ac:80: error: possibly undefined macro: XORG_RELEASE_VERSION
                autoreconf: /usr/local/bin/autoconf failed with exit status: 1
                [root@localhost xf86-video-avivo]# pwd
                /usr/xf86-video-avivo

                Comment


                • #9
                  Originally posted by domzanator View Post
                  Hi all,

                  I've tried using the xf86-video-avivo open-source driver for ati but can't seem to get it working. Could someone please push me in the right direction?

                  This is my output:-

                  [root@localhost xf86-video-avivo]# ./autogen.sh prefix=/usr/
                  autoreconf: Entering directory `.'
                  autoreconf: configure.ac: not using Gettext
                  autoreconf: running: aclocal
                  autoreconf: configure.ac: tracing
                  autoreconf: configure.ac: not using Libtool
                  autoreconf: running: /usr/local/bin/autoconf
                  configure.ac:38: error: possibly undefined macro: AC_DISABLE_STATIC
                  If this token and others are legitimate, please use m4_pattern_allow.
                  See the Autoconf documentation.
                  configure.ac:39: error: possibly undefined macro: AC_PROG_LIBTOOL
                  configure.ac:53: error: possibly undefined macro: XORG_DRIVER_CHECK_EXT
                  configure.ac:78: error: possibly undefined macro: XORG_MANPAGE_SECTIONS
                  configure.ac:80: error: possibly undefined macro: XORG_RELEASE_VERSION
                  autoreconf: /usr/local/bin/autoconf failed with exit status: 1
                  [root@localhost xf86-video-avivo]# pwd
                  /usr/xf86-video-avivo

                  Do you have xorg-x11-server-sdk installed?
                  Michael Larabel
                  http://www.michaellarabel.com/

                  Comment


                  • #10
                    Michael, can you please show me a link where we can see changes between the git commits in text form? I know projects where it says for example "fixed a bug where it could crash blabla" and then there's the code of the changes (in which I'm not interested in). Does the avivo driver project has something like that? I really am interested in the work they do from now on.

                    Comment


                    • #11
                      Originally posted by d2kx View Post
                      Michael, can you please show me a link where we can see changes between the git commits in text form? I know projects where it says for example "fixed a bug where it could crash blabla" and then there's the code of the changes (in which I'm not interested in). Does the avivo driver project has something like that? I really am interested in the work they do from now on.
                      You're looking for gitweb: http://gitweb.freedesktop.org/?p=avi....git;a=summary
                      Michael Larabel
                      http://www.michaellarabel.com/

                      Comment


                      • #12
                        Originally posted by Michael View Post
                        Do you have xorg-x11-server-sdk installed?
                        Hi Michael,

                        I've had success in getting through all of these lines: -
                        yum install git libpciaccess-devel xorg-x11-server-sdk
                        git clone git://anongit.freedesktop.org/git/avivo/xf86-video-avivo
                        cd xf86-video-avivo/
                        ./autogen.sh --prefix=/usr/
                        make
                        su
                        make install
                        <edit /etc/X11/xorg.conf so the driver changes from vesa or fglrx to avivo>

                        Now i think my problem is that my X1700 is not supported; when i do a lspci this is what comes back with my card M66-P [Mobility Radeon X1700]. I can't find anywhere saying that my card is supported.

                        Below is the error i get in the Xorg.0.log

                        (II) Avivo: driver for Radeon r5xx chipsets: RV515 (Radeon X1300),
                        RV530 (Radeon X1600), RV530 (Radeon X1600), R580 (Radeon X1900 GT),
                        RV530 (Radeon X1650 Pro), M52 (Mobility Radeon X1300)
                        (II) Primary Device is: PCI 01:00:0
                        (--) Assigning device section with no busID to primary device
                        (EE) No devices detected.


                        Thanks,
                        Dom

                        Comment


                        • #13
                          Originally posted by domzanator View Post
                          Hi Michael,

                          I've had success in getting through all of these lines: -
                          yum install git libpciaccess-devel xorg-x11-server-sdk
                          git clone git://anongit.freedesktop.org/git/avivo/xf86-video-avivo
                          cd xf86-video-avivo/
                          ./autogen.sh --prefix=/usr/
                          make
                          su
                          make install
                          <edit /etc/X11/xorg.conf so the driver changes from vesa or fglrx to avivo>

                          Now i think my problem is that my X1700 is not supported; when i do a lspci this is what comes back with my card M66-P [Mobility Radeon X1700]. I can't find anywhere saying that my card is supported.

                          Below is the error i get in the Xorg.0.log

                          (II) Avivo: driver for Radeon r5xx chipsets: RV515 (Radeon X1300),
                          RV530 (Radeon X1600), RV530 (Radeon X1600), R580 (Radeon X1900 GT),
                          RV530 (Radeon X1650 Pro), M52 (Mobility Radeon X1300)
                          (II) Primary Device is: PCI 01:00:0
                          (--) Assigning device section with no busID to primary device
                          (EE) No devices detected.


                          Thanks,
                          Dom
                          Yes, you are getting the no devices detected as the X1700 ID isn't there. It should work with the X1700, but the ID just hasn't been added. See the article for how to add the IDs. In the article it mentions where you just need to add the PCI IDs and such. If you still are having problems, I can try to tell you exactly what to do for your Mobility X1700.
                          Michael Larabel
                          http://www.michaellarabel.com/

                          Comment


                          • #14
                            Originally posted by Michael View Post
                            Yes, you are getting the no devices detected as the X1700 ID isn't there. It should work with the X1700, but the ID just hasn't been added. See the article for how to add the IDs. In the article it mentions where you just need to add the PCI IDs and such. If you still are having problems, I can try to tell you exactly what to do for your Mobility X1700.
                            Thanks for the quick response... I'm sort of lost...
                            Could you please let me know what exactly to do?

                            Comment


                            • #15
                              Originally posted by domzanator View Post
                              Thanks for the quick response... I'm sort of lost...
                              Could you please let me know what exactly to do?
                              Okay, I just checked out git this morning for avivo and made modifications for your Mobility Radeon X1700. Below are two files, replace them with the ones you already have.

                              include/avivo_chipset.h

                              Code:
                              #ifndef _AVIVO_CHIPSET_H_
                              #define _AVIVO_CHIPSET_H_
                              
                              #include "xf86_OSproc.h"
                              #include "xf86Resources.h"
                              /* Drivers for PCI hardware need this */
                              #include "xf86PciInfo.h"
                              /* Drivers that need to access the PCI config space directly need this */
                              #include "xf86Pci.h"
                              #ifdef PCIACCESS
                              #include <pciaccess.h>
                              #endif
                              
                              #define PCI_CHIP_RV515_7142     0x7142
                              #define PCI_CHIP_RV530_71C2     0x71C2
                              #define PCI_CHIP_RV530_71C5     0x71C5
                              #define PCI_CHIP_R580_724B      0x724B
                              #define PCI_CHIP_M52_7149       0x7149
                              #define PCI_CHIP_RV530_71C6     0x71C6
                              #define PCI_CHIP_M66_71D5       0x71D5
                              
                              enum avivo_chip_type {
                                  CHIP_FAMILY_RV515,
                                  CHIP_FAMILY_R520,
                                  CHIP_FAMILY_RV530,
                                  CHIP_FAMILY_R580,
                                  CHIP_FAMILY_LAST,
                              };
                              
                              #ifdef PCIACCESS
                              extern const struct pci_id_match *avivo_device_match;
                              #endif
                              extern SymTabRec avivo_chips[];
                              extern PciChipsets avivo_pci_chips[];
                              
                              #endif

                              xorg/avivo_chipset.c

                              Code:
                              #ifdef HAVE_CONFIG_H
                              #include "config.h"
                              #endif
                              #include "avivo.h"
                              
                              #ifdef PCIACCESS
                              const struct pci_id_match avivo_device_match[] = {
                                  {
                                      PCI_VENDOR_ATI, 0x71c2, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0
                                  },
                                  {
                                      PCI_VENDOR_ATI, 0x71c5, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0
                                  },
                                  {
                                      PCI_VENDOR_ATI, 0x724b, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0
                                  },
                                  {
                                      PCI_VENDOR_ATI, 0x7142, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0      
                                  },
                                  {
                                      PCI_VENDOR_ATI, 0x7149, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0      
                                  },
                                  {
                                      PCI_VENDOR_ATI, 0x71C6, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0      
                                  }, 
                                  {
                                      PCI_VENDOR_ATI, 0x71d5, PCI_MATCH_ANY, PCI_MATCH_ANY,
                                      0x00030000, 0x00ffffff, 0
                                  },
                              
                                  { 0, 0, 0 },
                              };
                              #endif
                              
                              /* Supported chipsets.  I'm really, really glad that these are
                               * separate, and the nomenclature is beyond reproach. */
                              SymTabRec avivo_chips[] = {
                                  { PCI_CHIP_RV515_7142, "RV515 (Radeon X1300)" },
                                  { PCI_CHIP_RV530_71C2, "RV530 (Radeon X1600)" },
                                  { PCI_CHIP_RV530_71C5, "RV530 (Radeon X1600)" },
                                  { PCI_CHIP_R580_724B,  "R580 (Radeon X1900 GT)" },
                                  { PCI_CHIP_RV530_71C6, "RV530 (Radeon X1650 Pro)" },
                                  { PCI_CHIP_M52_7149,   "M52 (Mobility Radeon X1300)" },
                                  { PCI_CHIP_M66_71D5,   "M66 (Mobility Radeon X1700)" },
                                  { -1,                  NULL }
                              };
                              
                              PciChipsets avivo_pci_chips[] = {
                                { PCI_CHIP_RV530_71C2, PCI_CHIP_RV530_71C2, RES_SHARED_VGA },
                                { PCI_CHIP_RV530_71C5, PCI_CHIP_RV530_71C5, RES_SHARED_VGA },
                                { PCI_CHIP_R580_724B,  PCI_CHIP_R580_724B,  RES_SHARED_VGA },
                                { PCI_CHIP_RV515_7142, PCI_CHIP_RV515_7142, RES_SHARED_VGA },
                                { PCI_CHIP_M52_7149,   PCI_CHIP_M52_7149,   RES_SHARED_VGA },
                                { PCI_CHIP_RV530_71C6, PCI_CHIP_RV530_71C6, RES_SHARED_VGA },
                                { PCI_CHIP_M66_71D5, PCI_CHIP_M66_71D5, RES_SHARED_VGA },
                                { -1,                  -1,                  RES_UNDEFINED }
                              };
                              
                              void
                              avivo_get_chipset(struct avivo_info *avivo)
                              {
                                  switch (avivo->pci_info->chipType) {
                                  case PCI_CHIP_RV530_71C2:
                                  case PCI_CHIP_RV530_71C6:
                                  case PCI_CHIP_RV530_71C5:
                                  case PCI_CHIP_M66_71D5:
                                      avivo->chipset = CHIP_FAMILY_RV530;
                                      break;
                              
                                  case PCI_CHIP_R580_724B:
                                      avivo->chipset = CHIP_FAMILY_R580;    
                                      break;
                              
                                  case PCI_CHIP_M52_7149:
                                  case PCI_CHIP_RV515_7142:
                                      avivo->chipset = CHIP_FAMILY_RV515;    
                                      break;
                              
                                  default:
                                      FatalError("Unknown chipset for %x!\n", avivo->pci_info->device);
                                      break;
                                  }
                              }
                              Then after you replace those two files, compile it like usual, and then it should be able to detect your card.
                              Michael Larabel
                              http://www.michaellarabel.com/

                              Comment

                              Working...
                              X