I'm curious about some of the obscurity in the "nv" driver.  In 
particular, almost everywhere in the driver, registers are 
addressed numerically, and not by symbolic names.  That on it's 
own is obscure enough to make things difficult to tell what's 
going on, but we know the deal with Nvidia documentation well 
enough, so I won't bother to worry about that much...

Various people have commented though about certian obscurities 
like the following being rather odd:

    chip->Rop    = (RivaRop   *)&(chip->FIFO[0x00000000/4]);

Why "0x00000000/4" and not just plain "0x00000000"?  Everywhere 
in the driver hex values are given premultiplied by 4 it seems, 
and specified as VALUE/4.

Was that done just to intentionally obfuscate the driver source 
further?  Or was the original driver (or current driver for that 
matter) actually maintained elsewhere with real symbolic names 
and whatnot, and then obfuscation scripts ran over them prior to 
committing to the XFree86 tree?

Would cleanups that remove this obfuscation and make the driver 
more readable be considered useful, and potentially accepted?  Or 
is there some other reason I'm missing as to why the driver is so 

Mike A. Harris

Devel mailing list

Reply via email to