lkml.org 
[lkml]   [1996]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SVGA kernel chipset drivers.


On Mon, 3 Jun 1996, Brad Pepers wrote:
>
> Why are graphics cards singled out as the only PC hardware that cannot
> be in the kernel?
>
> Don't get me wrong - I don't want to see massive drivers included in the
> kernel. But some basic support from the kernel for mode switching and
> querying of card information along with a user land program that provides
> a standard API that uses this information sounds like a good idea to me.

There are a few things that singles out graphics as a special case:

- extreme performance requirements. It's one of the few devices (the
others being mainly disk drivers and high-speed networking) where
every cycle counts.
- no good generic interface. This is where it differs from disks and
networking and most of the rest. A disk is a disk is a disk - they
look more-or-less the same to the end user, and you can virtualize
them behind a driver pretty well. However, trying to virtualize a
graphics card is not really possible in a reasonably small API. You
end up losing "special features" that can be critical (like bitmap
caching in video memory etc - stuff like that is very hard to virtualize
without exposing all the details you want to hide in the first place)

The problem is really that while you can say that "yes, we can virtualize
bitmap caching" etc, the stuff just keeps coming and coming, and in the
end you have a list of hundreds of things that the driver needs to know
about, and you have a rather complex API to it all, including a "get
features" request that tells the user exactly which things are available.

In contrast, look at a disk driver: you want to get very good performance
from that too, but the interface is rather simple. You read a block,
write a block, and have a few special ioctl's to do special cases that
are conceptually very simple ("ask geometry", "lock door" etc). And the
special cases aren't really performance critical, so you don't have to
worry overmuch about them.

The closest thing to a video driver in the current kernel is probably the
sound driver: that's a reasonably complex beast with a reasonably complex
interface. However, the performance constraints are _much_ less of an issue
(orders of magnitude less data to shuffle around), and while games etc want
to do strange things, the strange things are usually reasonably well-defined
("play this snippet of sound in the background while I do other things").

Linus


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.070 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site