On Wed, 5 Nov 2003, Gerhard W. Gruber wrote:

>>Agreed.  I think he is of the belief perhaps that an X driver
>>module is perhaps like an SVGAlib API you can use in arbitrary
>>programs perhaps including kernelspace, which of course isn't
>>true.
>
>NO, I was not thinking of that. I was rather thinking to take a
>look on how the mode is exactly set so I can copy this to the
>kernel module. Of course not verbatim as this wouldn't work
>since it is user space code. I never intended to use the user
>space code from the kernel. What I wanted to know is, on how to
>read the current state so that I can save that information, do
>whatever I need to do, and then restore the original state so
>that the application executaion can resume without problems.

Ok, gotcha.


>>That's of course all true... I think he just totally 
>>misunderstands XFree86 and it's driver architecture in general.  
>
>Might be. :) But that is because I had to download a kernel
>module and the OpenGL stuff from the nVidia web site. I think
>most of that is needed in order to use 3D acceleration, but I
>was not sure what else is in there.

Correct, the Nvidia driver is not just for 3D acceleration 
however, it is a complete video driver, 2D/3D/etc. which is 
comprised of various components, and does not use the driver code 
included with XFree86.  The Nvidia driver is useful to you if you 
want to use it in XFree86, but it isn't useful to you from a 
driver developer perspective as the source code isn't available.


>>Perhaps knowing that the majority of drivers don't even have a
>>kernel module at all period is a clearer indicator that XFree86
>>and it's userland video driver modules do _everything_ WRT
>>setting video modes, and configuring the hardware to blast
>>pixels.
>
>It can't do everything. When I run Enemy territory it switches
>to OpenGL 3D mode. This can obviously not done from within
>XFree86, because if that would be the case, I wouldn't have
>needed to download that kernel module and the libraries.

Wrong.  Video mode switching is completely done within XFree86 
itself, and does not involve the kernel at all.  The video driver 
directly programs the CRTC on the video card in some drivers, and 
in other drivers, the video mode is programmed using the video 
BIOS.  Drivers with kernel modules, the kernel module contains 
interfaces which allow the userland 2D/3D driver components to do 
direct rendering to the video card, using DMA/IRQ.  The Nvidia 
proprietary kernel module also contains other goodies of which 
probably include some kind of JIT compiler to compile microcode 
on the fly for their GPU engine.  What else it might contain is 
anyone's guess as it isn't open source.  Other proprietary 
drivers work similarly as well.


>>Indeed.  I think the key part of your message, and I'm in
>>complete concurrence with you, is "read the source Luke".  ;o)
>
>I will do that. Now with your all help I know at least where I
>can start reading. :)

Hope it helps out.  ;o)


>Actually the open sourced part is in 
>/root/src/NVIDIA_kernel-1.0-4191
>along with the closed module nvidia.o downloaded from 
>ftp://download.nvidia.com/XFree86/Linux-x86/1.0-4496

That is not open sourced really.  That is nothing bug glue code, 
and is useless other than for the purpose of relinking the Nvidia 
proprietary kernel driver to a new kernel, so you can continue to 
use their driver.

Remember, "open source" does not mean "you can read the source 
code", it means http://www.opensource.org definition of open 
source, which is where the term was coined.  Initially the term 
was trademarked as well, so that people could not apply the term 
open source inappropriately to software that did not comply to 
the OSD (Open Source Definition), however the general community 
has kindof bastardized the term "open source" to mean "you can 
access the source code and it doesn't matter what the license 
is".  However it very much does matter what the terms of license 
a given piece of source code is under as to wether it can 
properly be called "open source" under the true and proper Open 
Source Definition.

The Nvidia driver is not in any way "open source".

Just wanted to clarify this sometimes common misconception, in 
hopes that many people are reading this, and take a liking to the 
fine http://www.opensource.org website and it's terminology, fun 
articles, stories, and useful hacker tidbits and history.  ;o)

 
>So it seems there IS a kernel module to accompany XFree86. :)

There is no Nvidia kernel module which comes with XFree86, just 
the one that comes with the Nvidia proprietary video driver off 
Nvidia's website of which no source code is provided other than 
the small aforementioned useless kernel glue code used for 
relinking.  This code, and the driver do not come with XFree86 
and are not useful to driver developers trying to write their own 
video driver code or talk directly to the video card, as it is a 
proprietary driver.

Hope this clears up any misconceptions for sure this time.  ;o)  

The most useful stuff for you is most likely the 2D XFree86 "nv"  
driver source code, and whatever might be in the Linux kernel
framebuffer driver, or BSD et al.  Since no docs are available
for this hardware though, you may have a tough time doing
anything with it without the aide of someone familiar with the
hardware.  Wish you the best of luck nonetheless.

Take care,
TTYL


-- 
Mike A. Harris

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

Reply via email to