Learning to write video drivers, resources

Alex Deucher alexdeucher at gmail.com
Thu Nov 2 06:18:40 PST 2006

On 11/2/06, bloogity bloggity <sanmingge at yahoo.com> wrote:
> I've coded C++ professionally for a couple of years now, but mostly working
> on desktop and a couple server applications, never on anything like drivers.
> I'm interested in learning how to code video drivers, i.e. how video cards
> 2D and 3D engines generally work, the algorithms involved, how the OS
> communicates with the card, etc. I figure a good way to do this is working
> on an open source project like Xorg, but I'm having a lot of trouble finding
> good resources on how to get started.
> I've found the wiki, checked out a couple of drivers with git, etc., but
> just staring at at a 40,000 lines of C driver and hoping to gain an
> understanding doesn't sound very effective. Having some prior knowledge will
> probably make looking at Xorg's code a lot more meaningful. I've done some
> searching for books that might address the topic, but couldn't find any.
> There's Robert Love's kernel book, but it has no coverage of video drivers
> whatsoever, probably because Xorg is a separate project but not even of how
> DRM modules work.
> Basically, what prior knowledge should I have besides a good understanding
> of C, and where can I get it? Any books, tutorials, etc.? Would learning
> Xlib or XCB first help? Is there a 'simplest' video driver that would be
> good to learn by reading? Would going back and looking at old DOS game
> programming tutorials and examining the inline assembly you use to have to
> write to init video and such be useful? ;)
> I really have no idea so any tips would be helpful.

I'm writing a basic guide to understanding GPUs, but it's currently a
work in progress.  Once I get a bit more of it fleshed out, I'll post
it.  In the meantime, if you have any questions about any specific
things feel free to ask.


More information about the xorg mailing list