Re: Xfree86 drivers versus kernel drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jf simon wrote:

>  
> I am having some difficulty understanding the fundamental differences
> between xfree86 drivers and linux kernel drivers. Is there a good
> reference somewhere?


I'm not sure a reference is really necessary.  The only problem is that
the word "driver" is overloaded.  XFree86 "drivers" and kernel drivers
are both dynamically loadable modules, like a Linux shared object or a
Windows DLL.  XFree86 happens to have its own module loader, so that a
single XFree86 driver binary can be loaded regardless of operating system.

Kernel drivers are loaded into the kernel, and run in the privileged
kernel mode.  XFree86 drivers are loaded by the XFree86 server process. 
It is a user-mode process, although it must run as root in order to
touch I/O ports.

Historically, the original Windows NT 3.x had the exact same design. 
Display drivers were actually user-mode DLLs that ran in a separate
process (called CSRSS).  Users complained about the task-switch
overhead, and so Microsoft moved display drivers into the kernel in NT
4.  It's still not clear this was a net win.

> I have read that xfree86 drivers are really user space programs that
> map the graphic video memory and then access it.


Basically correct, although XFree86 drivers are not really "programs". 
They are just modules that are loaded by the XFree86 server program.

> If so does xfree86 needs anything at all from the linux kernel stuff
> that is in ./drivers/video ? Or is that stuff just needed by linux so
> that it can print out boot messages before X starts?


Remember that XFree86 is not a "fundamental" part of Linux.  It's just
another Linux application.  Linux runs perfectly well without XFree86,
and the kernel video stuff supports that.  Most XFree86 drivers use the
Linux kernel video stuff only for mapping the frame buffer into memory
(via the mmap system call).

Some drivers use more than that.  If a graphics chip requires the use of
DMA, as some do, then the XFree86 driver has to rely on a kernel
component for help.  Almost all of the OpenGL drivers need a kernel
component for that reason.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

_______________________________________________

Devel@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [XFree86]     [XFree86 Newbie]     [X.Org]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux