In association with heise online

05 February 2010, 14:14

Kernel Log: Coming in 2.6.33 (Part 3) - Graphics

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Kernel Log Logo by Thorsten Leemhuis

The next version of Linux is not only the first to offer the Nouveau KMS graphics driver for NVIDIA graphics hardware, it also comes with a multitude of improvements for the two AMD/ATI and Intel graphics drivers which support Kernel-based Mode Setting (KMS).

At the end of last week, Linus Torvalds released Linux 2.6.33-rc6, the sixth release candidate of Linux 2.6.33; the final version is expected either at the end of this month, or early next month. As usual at this stage in the development cycle, the number of changes and their extent is beginning to decrease; Torvalds writes that development is reaching the point where most things "just work" ('[...]we're getting to that stage of the release cycle where things mostly should "just work"[...]')

The Kernel Log takes this opportunity to continue its report about the advancements of Linux 2.6.33 and discuss what's new in terms of graphics hardware support in part three of the "Coming in 2.6.33" mini series. The most important changes concerning the kernel's network support, file systems and storage subsystem were covered in part one and two of this series.

New driver for NVIDIA GPUs

As previously reported, the kernel developers have, at the urging of Linus Torvalds, included the kernel code for the Nouveau driver for GeForce graphics cores (GPUs/Graphics Processing Units) in the Linux kernel's staging area. Version 2.6.33 of the kernel will, therefore, also offer Kernel-based Mode Setting (KMS) for many older as well as modern NVIDIA graphics chips; KMS has so far only been available with AMD/ATI and Intel GPUs. It allows flicker-free start-ups, faster switching between X Server and text console, and more reliable graphics hardware reinitialisation when waking up from system sleep states.

Based on the new kernel code, the Nouveau driver for X.org is capable of dual screen operation via RandR and offers Xvideo acceleration for recent GeForce models – these two features are not available with the "nv" (full name "xf86-video-nv") X.org driver many distributions configure for NVIDIA hardware. 3D acceleration, however, has not been mastered by either of the drivers – while it is currently under construction for Nouveau, it is still considered very experimental in this reverse engineered driver. Therefore, 3D support will for now continue to require NVIDIA's proprietary graphics driver, which some graphics cards also require to enable fan control. However, NVIDIA drivers only work if the Nouveau KMS code is disabled – one way of doing this at run-time is to set the "nomodeset" kernel parameter when booting.

Shortly before merging Nouveau, the developers modified the driver in such a way that the "ctxprogs" component, which was previously an integral part and often regarded as "firmware", is now only retrieved if required. Some distributions include this non-open source code for recent GPUs, which is sometimes called "Voodoo", even though the code was developed using proprietary graphics drivers and its inclusion might not be legal. The discussions around this problem prompted a developer to write open source code that replaces ctxprogs. This code was included in Linux 2.6.33 a few days after Nouveau – so far, however, it only supports generation NV40 GPUs, which are found on series 6000 and 7000 GeForce cards.

KMS included as standard

In early January, the developers of Nouveau took the integration of the driver's KMS code as an opportunity to remove about fifteen thousand lines of code for setting video modes without KMS, from the Nouveau driver for X.org; this measure was taken to simplify the maintenance and ongoing development of Nouveau. The Nouveau team are not alone in this decision, as the developers of Intel's graphics driver for X.org also removed their driver's "User Mode Setting" (UMS) functionality:) before they released version 2.10 of the driver in early January. As a result, current and future versions of these drivers will rely on kernels which offer KMS support, which is likely to promote the fast and wide-spread acceptance of this relatively young technology.

When combined with the "drmmode overlay support" feature first integrated in the KMS driver for Intel GPUs with Linux 2.6.33, version 2.10 of the Intel graphics drivers now also supports video overlays. The developers have also included numerous improvements for Ironlake graphics cores, which are used in Westmere CPUs such as the series i3 und i5 dual core processors introduced at the beginning of the year. The Intel KMS driver now also supports resolutions with a colour depth of 30 bits.

The kernel's DRM (Direct Rendering Manager), which is used by the KMS drivers, and the Intel drivers based on it will from now on offer an interface that improves the way graphics drivers synchronise the display of new screen content when flipping pages. This is to reduce or avoid "tearing", a type of image distortion which can be a particular nuisance when rendering video output. To make kernel-side "Page Flipping Support" available, the developers had to extend the DRI2 protocol. As a result, the technology will only be functional with Mesa 7.8, X Server 1.9 and with version 2.11 of the Intel graphics driver for X.org, which is still in development – a comprehensive blog post by PCI subsystem maintainer and driver developer Jesse Barnes provides further details.

Better rating for Radeon drivers

The kernel's DRM and KMS code for Radeon graphics chips now allows monitors to be controlled via DisplayPort (1, 2) and eDP (embedded DisplayPort); audio output via HDMI is now also possible. Another new inclusion is the IRQ support for r6xx and r7xx GPUs, which allows monitor change overs to be detected without repeated polling and is a prerequisite for the previously mentioned page flipping support for Radeon cards – however, the whole set-up will only work when combined with a firmware update. The developers also made many minor corrections and improvements to the Radeon KMS driver. As a result, the code has now matured to a degree that allowed the developers to remove it from the staging area, which is intended for incomplete and low quality drivers, and indicate in their commit comment that the driver is now stable enough to be used in the Linux distributions.

Another new addition to the kernel is the vmwgfx KMS driver for virtual "SVGA2" graphics hardware, which is visible to guest systems in some of the VMWare hypervisors. Like the KMS drivers for GeForce and Radeon graphics hardware, this driver will initially be placed in the staging area because, at least, the driver interfaces for 3D support still require adjustment. Furthermore, a display subsystem and drivers for OMAP2/3 processors have found their way into the kernel via a Nokia developer – such ARM CPUs are, for instance, included in Nokia's n900 and in the Beagle Board.

Minor gems

Many further minor, but by no means insignificant, changes can be found in the list below, which contains the commit headers referring to the respective change. Like many of the references in the text above, the links point to the relevant commit in the web front end of the Git branch for the kernel sources maintained by Linus Torvalds at kernel.org. The commit comments and the patches themselves provide extensive further information on the respective changes.

For other articles on 2.6.33 and links to the rest of the "Coming in 2.6.33 " series, see The H's Kernel Log - 2.6.33 Tracking page.

(thl)

(crve)

Print Version | Send by email | Permalink: http://h-online.com/-922495
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit