On Mon, 03 Nov 2003 11:31:41 -0800, "Tim Roberts" <[EMAIL PROTECTED]> wrote:

>nvidia.o is not a kernel module.  It is just a dynamically loaded object
>file that gets loaded by the XFree86 dynamic loader and called entirely in
>user mode.  It could have been done as an ordinary .so DLL, but the design
>objective was to have these work regardless of operating system.  That's
>why there is a loader built-in to XFree86.

I think I know now where the confusion comes from. There is a kernel module
for nVidia which you can download at their site and there is also, seemingly,
a module within XFree86. I suppose the kernel part from nVidia is only there
for 3D acceleration stuff, right? I looked into what functions this module
exports but I can't make much of it. Seems mostly to do with register/memory
access.

>Some drivers DO have kernel modules, to handle the DMA transfers that are
>necessary for adequate 3D operation.  However, kernel drivers are loaded
>with insmod.  If you specify a driver name in the Device section of an
>XF86Config file, it is NOT a kernel driver.  It is a user-mode library.

There is a module which has to be loaded with insmod (or depmod if you prefer
:) ), so I was wondering what this module is exactly doing and how it is
related to XFree86.

>Have you never looked at the XFree86 source code?  You need to do so. 
>Really.  Much of this would be cleared up.

I had a look at the source code, but the code base for XFree86 is not exactly
small, so I didn't knew where to start. I looked into the kernel sources and I
found some support for switching non-standard consoles (meaning non-textmode)
which is aparently used by XFree86 and others like SVGAlib.

>If you have a kernel module that you load with insmod, there still needs
>to be an XFree86 board-specific driver that can talk to that kernel
>driver.

Yes. That's what I meant. I already looked into the code of XFree86 nVidia
driver, but this will take some time to figure it out. :)

>The driver put it into that mode originally.  It has a data structure that
>tells it exactly what timing parameters it set.  All it has to do is do
>that again.

I see. I hoped that the driver would read the current state from the hardware
and forgot that it probably wouldn't need to do that. :)

>    Driver   "nvidia"
>then XFree86 will load /usr/X11R6/lib/modules/drivers/nvidia_drv.o.  The
>name of the EnterVT entry point is up to the driver, but it will usually
>be based on the driver name, just like you said.

The module of XFree86 is nv for nVidia. The proprietary drivers are called
nvidia. Apparently nVidia open sourced only that small part needed on the side
of XFree86 and closed source on the kernel part.

>ALL done in the user-mode driver.  For those drivers that DO have kernel
>components, the kernel sections are doing little more than DMA memory
>management, which cannot be done in user-mode.  Register I/O and mode
>switching is STILL in user mode.

I see. That would fit what I read in the kernel module, at least what is
available.

>There are documents on DGA in the XFree86 tree, and you can probably find
>pointers on the XFree86 web site.  As others have said, however, I'm not
>sure it will help you, because DGA is an application interface that gets
>called from user-mode.

Even if I can't use DGA directly, the source should provide information on how
to handle the hardware, so that would help me also. I have to take a look at
these.

Thanks.

-- 
Gerhard Gruber

F�r jedes menschliche Problem gibt es immer eine einfache L�sung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to