August 31, 2007

Free ATI drivers for Christmas?

Author: Bruce Byfield

Fully-functional video drivers -- ones capable of handling 3-D acceleration -- remain one of the weak points of free software. The Free Software Foundation has declared them a high-priority project. Meanwhile, some distributions and even more users have resorted to using the proprietary drivers offered as free downloads by card manufacturers. One of the main projects attempting to provide complete, free drivers is focusing on developing the Avivo driver for the R500 and R600 cards from AMD/ATI, so-called after a specification first introduced in this line of cards. According to Jerome Glisse, who coordinates the development of the driver, progress is being made in the project, and "maybe by the end of this year, we might have some 3-D acceleration."

The community of graphics experts in free software is a small one. Like many in the community, Glisse got his start in the now-defunct R300 project, which was designed to study 3-D acceleration in ATI cards. Although the project never produced stable drivers, many of those involved in the project have gone on to related work in Mesa, the free software implementation of the OpenGL specification for delivering 3-D graphics, or DRI (Direct Rendering Infrastructure), or the Nouveau project, which is developing free drivers for Nvidia cards. Glisse himself chose to continue giving attention to ATI largely because "I didn't think there were many people working on this card."

Glisse and the three or four other people in the project (the number varies at any given time, Glisse says) began working on the Avivo driver at the start of 2007. However, serious work only began a couple of months ago, and the first official release of the driver is still in the future.

As might be expected, much of the work involves reverse-engineering the fglrx driver, the GNU/Linux binary released by ATI, and drawing on information learned in the R300 project. "What chipmakers often do," Glisse explains, "is reuse things from previous releases. So you can find things for the Avivo in the R300. The differences between them are very slight. It looks like we could save a lot of time."

Currently, the Avivo driver is in an extremely basic state, unsuitable for general use. "The driver is actually only capable of setting the mode," Glisse says. More specifically, the project's developers have learned to program hardware specifications such as DAC (digital to analog converter), LVDS (low-voltage differential signaling), and TMDS (transition minimized differential signaling) that allow a computer to communicate with a video card. This, as Glisse says, "is the basic you need to get something on the screen."

Of course, to make the driver actually useful, more is needed. Glisse is reasonably confident that the project knows enough to work in the near future upon card initialization with such functions as suspend and display, under- and over-clocking cards, and accessing on-board RAM.

Much of the remaining work, Glisse hopes, can be ported directly from work done by the R300 project, including XAA acceleration needed for the blit function for 2-D display under the X Window System. Speaking for the project, he also says that its members know enough to make "an educated guess" that the "3-D engine is very much like the one which the R400 [driver] supports. The major differences lie in the fragment shader [the function that calculates display on a pixel-by-pixel basis], and I believe that some freely available documents from AMD give a quite insightful description of this part of the graphical processing unit."

However, Glisse adds, "I am personally a bit reluctant to do that work" immediately. Glisse suggests that upcoming changes to Mesa's and DRI's architectures makes the use of OpenGL to achieve 2-D and 3-D acceleration directly within Xorg, making the work on individual drivers redundant. For this reason, he considers porting the 2-D and 3-D acceleration in its current form a "partial waste" and would prefer to focus on the card initialization features first.

Eventually, Glisse would like to see the Avivo project's work ported to other Unix-based systems, such as the BSDs and Solaris, although he worries whether their implementation of Direct Rendering Manager, which is needed for 3D acceleration, is sufficiently advanced.

In addition, although AMD acquired ATI more than a year ago and has shown no sign yet of wanting to encourage free drivers, Glisse has not yet ruled out the possibility that corporate involvement in the Avivo project might simplify its members' work methods.

"They know that we exist, because I've talked with a few people," he says. "And AMD may be wanting open source drivers."

If it does, he believes that Avivo and related projects may play an important role. "If you really want open source drivers, then you have to go outside the company. If you don't, you won't get the support of the community and everything that goes with it. I believe that AMD right now is trying to change how it works, because if you look at what it's doing on motherboards and other things like that, it's really starting to work with the community. So we're hoping that AMD will change its mind and decide that the best thing to do is work with the community. I hope it's sooner than later."

Meanwhile, while hoping for the best, the Avivo project continues preparing for the worst by inching towards the goal of traditional drivers on its own efforts. More people could help, Glisse says, but they need to be people with experience in graphic drivers and a willingness to make a long-term effort. "I think it's one of the few places left in open source where there is still plenty of room for new people."


  • Open Source
  • Hardware
Click Here!