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

Riva 128 patch



Hi there, I found a patch to correct the X 4.0.1 nv driver when used
with Riva 128... it'd be nice if it could be incorporated as a Debian
patch, given the X developers aren't willing to help on this at all,
even if it's really a little bug

http://www.iit.uni-miskolc.hu/~halasz3/linux/xpatch.html

regards...

PS: Cc: me as I'm not on the list

X Server Patch to XFree 4.0 - © 15/05/2000 Csaba Halász

This is a patch to fix the NV3 frequency detection and the double scan modes. Details follow. (Skip to usage)

The main problem is that the crystal frequency autodetection is broken. (I think that is the case from 3.3.3 onwards, but I was only able to figure it out with 4.0) In my fix I just reversed the PAL and NTSC cases. I don't know if just my card is special or the two values really are swapped. The effect is that the pixel clock is programmed totally wrong.

The other two problems both relate to double scan modes. The pixel clock values need to be doubled in these modes. Currently it is done by the driver in a strange fashion. This causes two more bugs. First, the mode validation is screwed up, because the doubling is not taken into account, so some valid modes are rejected and some invalid are not. Also the driver deduces that a mode is double scan from the display width (hDisplaySize < 512) when in fact it should use the information from the config file. (I have a 768x288 double scan mode which works perfectly!)

Additionally, the hardware cursor is not correctly set up under double scan conditions. The chip seems to have hardware support for double scan so why not switch it on? This eliminates the need to multiply the vertical coordinates by two. Apart from this, the cursor shape should be also doubled vertically, but the driver forgets about this, so we get a squashed cursor. As mentioned, the hardware can take care of it perfectly. (And for the unlikely case that the hw cursor should malfunction, it can be turned off in the config file.)

My modifications have a non-transparent change, namely that the pixel clock values for double scan modes must be doubled by the user in the config file. (I believe that was the case with previous releases as well.) I don't know whether this conflicts with how other drivers do it.

Usage:
You will need the X server source to use this. See below for a
precompiled binary.
First apply xpatch-4.0.diff.gz in xc/programs/Xserver/hw/xfree86/drivers:

	zcat xpatch-4.0.diff.gz | patch
Compile and copy nv_drv.o to your modules directory. Enjoy.

It is mandatory that every user send me an e-mail!!! Come on, it isn't that hard!

Download xpatch-4.0.diff.gz (1.6 kB)
Download a patched X server binary module. (nv_drv.o.gz, 25kB)
Comments?
Last modified on Tuesday, 20-Jun-2000 09:15:18 MET

Reply to: