Video driver documentation?

Alex Deucher alexdeucher at gmail.com
Fri Feb 17 06:46:19 PST 2006


On 2/17/06, Vaclav Barta <vbar at comp.cz> wrote:
> Hi,
>
> is there some on-line tutorial (or even a printed book) about writing X video
> drivers? Google finds lots of articles about using Xlib, but not much about
> the lower layers. I'm specifically interested in Radeon, but can't really
> make sense of the code without learning some concepts first...
>

your best bet is probably to start reading the video drivers and
comparing them.  Also read over the driver design document:
http://ftp.x.org/pub/X11R6.9.0/doc/html/DESIGN.html
feel free to ask questions.

Basic parts:

Framebuffer - vram.  This is where the content of the screen lives.
What you see on the screen is the portion of video ram your CRTC is
pointed at.  offscreen memory can be used to store other things: other
pixmaps, textures, cursor images, engine queues, etc.

CRTC - you have one or more CRTCs (CRT Controllers) or sometimes
called display controllers.  These are used to define the size,
offset, and basic timing of the video mode.  Think of them as windows
into the framebuffer.

DAC - (Digital Analog Convertor) provides an analog output from a CRTC.

TMDS controller - provides a TMDS digital output (DVI usually) from a CRTC.

LVDS controller - provides a LVDS digital output (usually laptop flat
panels) from a CRTC.

TV Encoder - provides a TV compatible output from a CRTC, possibly
with scaling, etc.

CLUT - color lookup table.  most chips have one or more CLUTs that can
be associated with a CRTC that allow you to adjust the color output
(think gamma correction).

Stride/pitch - the width of a buffer in vram in bytes.

2D/Drawing engine - provides accelerated drawing.  Basically includes
bitblts (copying a rectangle of a certain size from one place in vram
to another) and fills (drawing a filled rectange at a particular
location in vram).  Most cards also accelerate line drawing and some
other operations, however, generally, these aren't used to much
anymore.

Overlay - most hardware provides a video overlay that overlays data
from one buffer onto another either via a colorkey or coordinates. the
overlay can also perform features like scaling and color space
conversion (think YUV to RGB).

Alex

>         Bye
>                 Vasek



More information about the xorg mailing list