Xfree86 drivers versus kernel drivers

2006-08-08 Thread jf simon

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


I have read that xfree86 drivers are really user space programs 
that map the graphic video memory and then access it. 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?

Thanks a lot,
-jf simon





___ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. 
http://fr.answers.yahoo.com 


___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


Re: Xfree86 drivers versus kernel drivers

2006-08-08 Thread Tim Roberts
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, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.

___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


Re: Xfree86 drivers versus kernel drivers

2006-08-08 Thread Enrico Weigelt
* Tim Roberts [EMAIL PROTECTED] 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 mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


Re: Xfree86 drivers versus kernel drivers

2006-08-08 Thread Tim Roberts




Enrico Weigelt wrote:

  * Tim Roberts [EMAIL PROTECTED] wrote:
  
  
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 ...
  


We're getting a bit far afield here, but I'm always willing to orate at
length on arcane topics of little interest to anyone.

The XFree86 approach is not all that different from the old NT
approach. The Xlib application interface is similar to the GDI
application interface. The XAA driver interface is similar in many
ways to the GDI driver interface. The major difference is that,
whereas X crosses that gap by feeding X protocol through a socket
(thereby enabling client and server on different machines), NT crossed
that gap by using an RPC mechanism.


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


In practical terms, there are no major differences. X.org branched
from XFree86 at version 4.3.99, so at that point, they were identical.
I would judge that there has been more activity on the source base
since then by X.org, but I may be out of touch.


  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.
  


Only in a fleeting way. As I said, most 2D XFree86 drivers use the
kernel video drivers to map the frame buffer into memory, and nothing
else. Last time I looked, the kernel video drivers did not expose any
graphics accelerator features at all, making them useless to XFree86.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.





[XFree86] xfree86 emulation of VGA BIOS cards on powerpc platforms

2006-08-08 Thread jf simon

Hi,
For non x86 architecture like PowerPC, I understand that xfree86 
is able to initialize PCI graphic cards, by emulating the VGA 
BIOS extension located on the graphic card.
We are using IBM Maple platform (featuring a IBM 970 ppc64 
processor). When we boot linux, nothing happens as it seems the 
graphic card used (ATI Radeon 7000) is not initialized.


Does emulation for powerPC works in xfree86?
Thanks
-jf simon






___ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. 
http://fr.answers.yahoo.com 


___
XFree86 mailing list
XFree86@XFree86.Org
http://XFree86.Org/mailman/listinfo/xfree86


[XFree86] 4.6.0 breaks XDM

2006-08-08 Thread Andrew Wilcox [CEO]

Hello,

First of all, I'm still fairly new to XFree86 (and indeed X11 in 
general) but am learning.


I have Linux 2.6 with an Intel 82810 DC100 and a Compaq Presario MV500 
Color Monitor.  It was working fine while I had a Samsung SyncMaster 
700IFT hooked up to it, and XFree86 4.3.9, but I moved the computer into 
a different place and this was the monitor I got.  I had to reconfigure 
the monitor.  I screwed up my keyboard configuration (every key I 
pressed changed the resolution) while messing around with the monitor, 
so I decided alright, time to upgrade.


I downloaded XFree86 4.6.0 from the FTP, got all the necessary tgzs in 
hand, and installed.  It finished, and at first glance it worked!  I 
startxed and got xterm.  I pushed a key and it put it on the display.  
Yay!


Now, I have a new problem.  I can't graphically login, or use XFree86 at 
all, anymore.  I type my name and password, it flashes a black screen, 
and comes up the login screen, then I type my name and password, well, 
you get the picture.  My /var/log/messages is full of these errors:


Aug  9 01:09:51 Linux kdm: :0[5469]: Can't execute 
/etc/X11/xdm/Xstartup: No such file or directory
Aug  9 01:09:51 Linux kdm: :0[4868]: Cannot execute startup script 
/etc/X11/xdm/Xstartup
Aug  9 01:09:51 Linux kdm: :0[5486]: Can't execute 
/etc/X11/xdm/Xsetup: No such file or directory


I unzipped the Xstartup, Xsetup, Xsession, and Xreset files, but then I 
just got xterm no matter what I tried.  I gzip'ed them back up and 
attempted to copy my old files (from 4.3.9).  It flashed a black screen 
and came up the login screen again when I tried that.  So I removed 
those and now I'm back at square one.


Trying to startkde manually came up a bunch of Xlib: connection to 
':0.0' refused by server messages (probably because kdm has the server 
locked).


I'm attaching my XF86Config file, the XFree86.0.log file, and screen 
output of XFree86 -version and uname -a.


Thank you for the help!

Andrew Wilcox
Linux:~ # ./version.sh  /media/floppy/Versions

XFree86 Version 4.6.0
Release Date: 10 May 2006
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.4.24 i686 [ELF]
Current Operating System: Linux Linux 2.6.5-7.111-default #1 Wed Oct 13 
15:45:13 UTC 2004 i686
Build Date: 8 May 2006
Changelog Date: 10 May 2006
Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
Command line: XFree86 -version

Linux Linux 2.6.5-7.111-default #1 Wed Oct 13 15:45:13 UTC 2004 i686 i686 i386 
GNU/Linux
Linux:~ #
# /.../
# SaX generated XFree86 config file
# Created on: 2006-08-09T00:18:43-0400.
#
# Version: 4.8
# Contact: Marcus Schaefer [EMAIL PROTECTED], 2002
#
# Automatically generated by [ISaX] (4.8)
# PLEASE DO NOT EDIT THIS FILE!
#
Section Files
  FontPath /usr/X11R6/lib/X11/fonts/misc:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/local
  FontPath /usr/X11R6/lib/X11/fonts/75dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/100dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/Type1
  FontPath /usr/X11R6/lib/X11/fonts/URW
  FontPath /usr/X11R6/lib/X11/fonts/Speedo
  FontPath /usr/X11R6/lib/X11/fonts/PEX
  FontPath /usr/X11R6/lib/X11/fonts/cyrillic
  FontPath /usr/X11R6/lib/X11/fonts/latin2/misc:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/latin2/75dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/latin2/100dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/latin2/Type1
  FontPath /usr/X11R6/lib/X11/fonts/latin7/75dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/baekmuk:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/japanese:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/kwintv
  FontPath /usr/X11R6/lib/X11/fonts/truetype
  FontPath /usr/X11R6/lib/X11/fonts/uni:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/CID
  FontPath /usr/X11R6/lib/X11/fonts/ucs/misc:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/ucs/75dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/ucs/100dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/hellas/misc:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/hellas/75dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/hellas/100dpi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/hellas/Type1
  FontPath /usr/X11R6/lib/X11/fonts/misc/sgi:unscaled
  FontPath /usr/X11R6/lib/X11/fonts/xtest
  FontPath /opt/kde3/share/fonts
  InputDevices /dev/ttyS0
  InputDevices /dev/ttyS1
  InputDevices /dev/ttyS2
  InputDevices /dev/ttyS3
  InputDevices /dev/ttyS4
  InputDevices /dev/ttyS5
  InputDevices /dev/ttyS6
  InputDevices /dev/ttyS7
  InputDevices /dev/ttyS8
  InputDevices /dev/psaux
  InputDevices /dev/logibm
  InputDevices /dev/sunmouse
  InputDevices /dev/atibm
  InputDevices /dev/amigamouse
  InputDevices /dev/atarimouse
  InputDevices /dev/inportbm
  InputDevices /dev/gpmdata
  InputDevices /dev/mouse
  InputDevices /dev/usbmouse
  InputDevices /dev/adbmouse