http://www.linuxgraphics.cn/xwindow/evolution.html

Overview

  • Historically, a distinction has been made between 2D and 3D acceleration.
  • 2D acceleration was provided by the XAA(XFree86 Acceleration Architecture), which made the video card's 2D hardware acceleration available to the X server.
  • The 3D acceleration set was provided via the DRM(Direct Rendering Manager), which worked by mapping 3D rendered pictures on top of the 2D picture.
  • This had some buggy corner cases, but more or less worked, until compositing entered into the desktop. This distinction has become the source of a lot of bugs, and performance problems.
  • EXA was introduced as a stopgap measure, to provide better integration with XRender than XAA did, improving the X.Org Server 2D performance. In practice, while this proved quite advantageous in some respects, it also exhibited a number of corner cases and regressions.
  • The solution to this is to move to hardware accelerated OpenGL for both, 2D and 3D graphics, with 2D becoming just a subset of 3D rendering.
  • Switching entirely over is unfortunately not so simple, and not without some major obstacles.
  • http://en.wikipedia.org/wiki/EXA

最 新的技术: DRI2,GEM/GEM-ified TTM, EXA/UXA,KMS,AIGLX

There are two ways in which a windowing system can allow an OpenGL implementation to talk to the graphics card.

  • The first is to specify the OpenGL command stream in a portable network-neutral manner using a client/server implementation similar to the X11 drawing routines. This method, used by AIGLX, is indirect in that the drawing commands are sent to the X server and then the X server sends them along to the graphics card.
  • The second way, which is at the base of Xgl, is to open a window and then allow the OpenGL library to send commands directly to the graphics card.
  • http://en.wikipedia.org/wiki/AIGLX

Xorg Architecture

参 考资料3有个体系结构图,可以参考下。

Xorg Release History1

Version Release date Most important changes
X1 June 1984 First use of the name "X"; fundamental changes distinguishing the product from W.|
X6 January 1985 First version licensed to a handful of outside companies.|
X9 September 1985 Color. First release under MIT License.|
X10 late 1985 IBM RT/PC, AT (running DOS), and others.
X10R2 January 1986 -
X10R3 February 1986 First freely redistributable X release. Earlier releases required a BSD source license to cover code changes to init/getty to support login. uwm made standard window manager.
X10R4 December 1986 Last version of X10.
X11 September 15, 1987 First release of the current protocol.
X11R2 February 1988 First X Consortium release.
X11R3 October 25, 1988 XDM
X11R4 December 22, 1989 XDMCP, twm brought in as standard window manager, application improvements, Shape extension, new fonts.
X11R5 September 5, 1991 PEX, Xcms (color management), font server, X386, X video extension
X11R6 May 16, 1994 ICCCM v2.0; Inter-Client Exchange; X Session Management; X Synchronization extension; X Image extension; XTEST extension; X Input; X Big Requests; XC-MISC; XFree86 changes.
X11R6.1 March 14, 1996 X Double Buffer extension; X keyboard extension; X Record extension.
X11R6.2 - -
X11R6.3 (Broadway) December 23, 1996 Web functionality, LBX. Last X Consortium release. X11R6.2 is the tag for a subset of X11R6.3 with the only new features over R6.1 being XPrint and the Xlib implementation of vertical writing and user-defined character support.
X11R6.4 March 31, 1998 Xinerama.
X11R6.5 - Internal X.org release; not made publicly available.
X11R6.5.1 August 20, 2000
X11R6.6 April 4, 2001 Bug fixes, XFree86 changes.
X11R6.7.0 April 6, 2004 First X.Org Foundation release, incorporating XFree86 4.4rc2. Full end-user distribution. Removal of XIE, PEX and libxml2.
X11R6.8.0 September 8, 2004 Window translucency, XDamage, Distributed Multihead X, XFixes, Composite, XEvIE.
X11R6.8.1 September 17, 2004 Security fix in libxpm.
X11R6.8.2 February 10, 2005 Bug fixes, driver updates.
X11R6.9 - -
X11R7.0 December 21, 2005 EXA, major source code refactoring.From the same source-code base, the modular autotooled version became 7.0 and the monolithic imake version was frozen at 6.9.
X11R7.1 May 22, 2006 EXA enhancements, KDrive integrated, AIGLX, OS and platform support enhancements.
X11R7.2 February 15, 2007 Removal of LBX and the built-in keyboard driver, X-ACE, XCB, autoconfig improvements, cleanups.
X11R7.3 September 6, 2007 XServer 1.4, Input hotplug, output hotplug (RandR 1.2), DTrace probes, PCI domain support.
X11R7.4 September 23, 2008 XServer 1.5.1, XACE, PCI-rework, EXA speed-ups, _X_EXPORT, GLX 1.4, faster startup and shutdown.
X11R7.5(Forthcoming) August 2009 XServer 1.7, XKB 2 and Xi 2, XGE, E-EDID support, RandR 1.3 (GPU object), MPX, predictable pointer acceleration, DRI memory manager, DRI2, Shatter, further removal of obsolete libraries and extensions.

XAA (XFree86 Acceleration Architecture)

  • A driver architecture to make a video card's 2D hardware acceleration available to X server
  • Written by Harm Hanemaayer in 1996. First released in XFree86 version3.3
  • Completely rewritten for XFree86 4.0
  • Most drivers implement acceleration using XAA module.
  • The driver for the ARK chipset was the original development platform for XAA.
  • XAA supplies almost no speed advantage for current video cards.
  • In X.Org server release 6.9/7.0, EXA was released as a replacement for XAA.
  • EXA is regarded as an intermediate step to converting the entire X server to using OpenGL.
  • http://en.wikipedia.org/wiki/XFree86_Acceleration_Architecture

EXA

  • A graphics acceleration architecture of the X.Org Server designed to replace XAA.
  • Designed by Zack Rusin and announced at LinuxTag 2005. First released with X.Org Server version 6.9/7.0.
  • Provide better integration with XRender than XAA did, improving the X.Org Server 2D performance.
  • http://en.wikipedia.org/wiki/EXA

UXA

  • A reimplementation of the EXA API developed by Intel, using the GEM(Graphics Execution Manager), replacing TTM(Translation Table Maps).
  • In May 2009 it was announced that Ubuntu would migrate their graphics acceleration for the Ubuntu 9.10 release to UXA
  • http://en.wikipedia.org/wiki/UXA

TTM(translation table map)

  • A GPU memory manager created by Tungsten graphics
  • written primarily by Thomas Hellstrom, Eric Anholt, and Dave Airlie.
  • However TTM has several deficiencies, and its API is regarded as needlessly complex.
  • GEM is developed to replace TTM.
  • http://lwn.net/Articles/257417/

GEM (Graphics Execution Manager)

  • Primary developed by Keith Packard and Eric Anholt of Intel, starting in May 2008, as a minimalist, easy-to-use alternative to the TTM.
  • A GPU memory manager. Specialized for use in device driver.
  • A modern memory manager specialized for use in device drivers for graphics chipsets.
  • It manages graphics memory, controls the execution context and manages the Non-Uniform Memory Access (NUMA) environment on modern graphics chipsets.
  • Multiple applications can share graphics device resources without the need to store and restore the entire graphics card state between changes.
  • GEM ensures conflict-free sharing of data between applications by managing the memory synchronization.
  • It uses many existing kernel subsystems for its operations and hence has a very modest code size.
  • GEM is included in the Linux kernel from version 2.6.28.
  • Designed with Intel hardware in mind and collided with current X.Org Server development (notably DRI2 and new EXA acceleration architecture).
  • GEM is being replaced and superseeded by GEM-ified TTM Manager developed currently for ATI Radeon and VIA S3 Graphics.
  • http://en.wikipedia.org/wiki/Graphics_Execution_Manager

KMS (kernel-based mode-setting)

XRender

  • The X Rendering Extension (Render or XRender) is an X Window System extension to implement Porter-Duff image compositing in the X server.
  • Written by Keith Packard in 2000 and was first released with XFree86 version 4.0.1.
  • http://en.wikipedia.org/wiki/XRender

RandR (X Resize and Rotate Extension)

DRI (Direct Rendering Infrastructure)

Who develop it
  • Started by Jens Owen and Kevin E. Martin of Precision Insight.
  • First made widely available as part of XFree86 4.0 and is now part of the X.Org Server.
  • Currently maintained by Tungsten Graphics and others in the free software community.
What is it
  • An interface and a free software implementation used in the X Window System to securely allow user applications to access the video hardware without requiring data to be passed (slowly) through the X server.
Architecture
来自参考资料4
来自参考资料4

libGL:

  1. Present a OpenGL compatible API to the client application;
  2. Implement the GLX API (the glue between OpenGL and X);
  3. Find and load the appropriate 3D driver;
  4. Dispatch the received OpenGL API calls to the 3D driver, or fallback to the X server if no 3D driver was found;

3D driver:

  1. Implement the OpenGL API;
  2. Transform the received vertex and texture data into the hardware native format;
  3. Keep a backup of the graphics hardware state which is relevant to its drawing context;
  4. If DMA is supported by the hardware, fill in DMA buffers with the vertex and texture data and signal the DRM module to dispatch it to the hardware;
  5. Provide software fallbacks for all operations not supported in hardware.

DRI extension:

  1. Context/window setup;

2D Driver:

  1. Detect and initialize hardware;
  2. Reserve on-board memory for 3D operations;
  3. Synchronize 2D operations with 3D ones;
  4. Identify which 3D driver and DRM module to load;
  5. Communicate the current cliprect list;
  6. Authorize client access to the DRM module;

DRM core module

  1. Thin OS kernel abstraction layer for portability

DRM module:

  1. Graphical hardware lock;
  2. Allocate a pool of DMA buffers (in the AGP aperture if possible);
  3. Memory map the DMA buffers to client virtual address space;
  4. Dispatch the DMA buffers written by the clients;

SAREA:

  1. Store dirty hardware specific state;
  2. Store cliprects.

Details:

Direct Rendering Infrastructure: Architecture

Who use it
  • Its primary application is to provide hardware acceleration of the Mesa implementation of OpenGL. Mesa 的硬件加速就是通过 DRI 来实现的。
  • It has also been adapted to provide OpenGL acceleration on a framebuffer console without an X Server running.
DRI OpenGL Support

The DRI OpenGL support consists of several pieces:

  • DRM is a combination of at least two kernel modules, one of core DRM code and others providing APIs to userland to access different classes of video hardware.
  • The userland driver module contains an OpenGL driver that typically prepares buffers of commands to be sent to the hardware by the DRM and interacts with the windowing system for synchronization of access to the hardware.
  • Additional code provides access to the interface provided by the driver module. In X this is the libdri.so support module and a DRI-enabled DDX (2D driver). In the framebuffer implementation this is MiniGLX, which initializes the DRM and provides some X APIs to the userland driver despite the lack of an X Server.
新 进展
  • Work on DRI2 started at the 2007 X Developers' Summit. The new rendering infrastructure improves several shortcomings of the old design, including removing internal locks and adding proper support for offscreen rendering, so that compositing and XVideo/OpenGL applications are properly managed.
SeeAlso

DRM (Direct Rendering Manager)

  • A component of the Direct Rendering Infrastructure.
  • Consists of two in-kernel drivers (realized as kernel modules on Linux)
    • A generic drm driver
    • Another which has specific support for the video hardware.
  • This pair of drivers allows a userspace client direct access to the video hardware.
  • http://en.wikipedia.org/wiki/Direct_Rendering_Manager

XGL

  • An X server architecture designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL via glitz.
  • Started by David Reveman of Novell and first released on January 2, 2006.
  • It was finally removed from the X.org server in favor of AIGLX on June 12, 2008.
  • http://en.wikipedia.org/wiki/Xgl

AIGLX (Accelerated Indirect GLX)

  • Founded by Red Hat and the Fedora community to allow accelerated indirect GLX rendering capabilities to X.Org and DRI drivers.
  • This allows remote X clients to get fully hardware accelerated rendering over the GLX protocol.
  • Has been merged into X.Org and is available as of X.Org 7.1.
  • http://en.wikipedia.org/wiki/AIGLX

SeeAlso

  1. wikipedia:X Window System
  2. http://keithp.com/~keithp/talks/ 有很多介绍 X window 的文章
  3. Xorg Architecture Diagram
  4. Direct Rendering Infrastructure: Architecture

Reply via email to