Learning to write video drivers, resources
Jerome Glisse
j.glisse at gmail.com
Thu Nov 2 04:51:19 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.
>
For 3D driver you might want to take a look at documentation on
dri.freedesktop.org
You should also get a lot of high level informations by carefully
reading graphics card
review published on hardware site (beyond3d.com, tomshardware...).
A good understanding of the 2D side of a card is also helpfull for
this you could look on
the internet for old video card specification, the hornet.org archive
used to have a couple
of intersting doc maybe they are mirrored somewhere.
best,
Jerome Glisse
More information about the xorg
mailing list