Re: Xfree86 drivers versus kernel drivers

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

 



* Tim Roberts <timr@xxxxxxxxx> wrote:

Hi folks,

> Kernel drivers are loaded into the kernel, and run in the 
> privileged kernel mode.  

To be a hair-splitting, not completely correct: 
kernel drivers (at least on GNU/Linux) can be either built into 
the kernel *or* loaded dynamically. On certain platforms, buitin
drivers *may* be slightly more efficient (near jumps possible, etc)
But from the user's view, the difference is quite irrelevant ;-)

The communication between userland and kernel drivers mostly 
happens through device files - that's the unix philosophy: 
"evrything's a file" :)
Userland drivers are simply called like just any other library.

> XFree86 drivers are loaded by the XFree86 server process. 

But they may also sit on top of kernel drivers. For example several
mouse drivers actually call the certain kernel drivers to most
of the work (aka reading data from the serial interface). Another
example is the DRI stuff, which does much of the (critical)
rendering work in kernelspace.

> 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.

As far as I remember, the NT model was much more low-level than X11,
so the percentage of data to pass through processes vs. data rendered
within the display server was much worse than on X11. But I'm not an
NT expert ...

Today, X11 has several extensions for speeding up certain load 
intesive screen operations, ie. playing videos locally.


BTW: could anyone point out if there are major differences between
traditional xf86 and current Xorg ?

<snip>

> > 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.

In fact, xf86/xorg runs on many platforms. Historically, xf86 was an
fork of old xorg, optimized for x86 platforms. While xorg development
was stalled for quite a long time, xf86 brought many improvements
which now went into new xorg.

<snip>

> 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).

The Linux video drivers are their own layer. They provide lots of 
low-level things, ie. device independent framebuffers access and 
some rendering primitives. xf86/xorg - when running on GNU/Linux - 
sits on top of it.

And there's another interesting layer: DirectFB. It's an platform
intependent framebuffer access library (living in userland), and
there's an Xserver which sits on top of it. So the Xserver actually
has no more device drivers, but instead lets DirectFB does all 
this work. 


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------
_______________________________________________

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