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

DOUBLESCAN bug in NV4 driver (and fix) & XF86 modelines



a few weeks back i asked the list if they could produce a couple
compadible modelines for me in XF86 so i could use real low res for full
screen MPEGs.  most of the response of what i got was that the information
i had was not right, or something ..anything but XF86's fault.

ANYWAYS.  i got this reply from a guy on one of the newsgroups(not sure
which).  And i wanted to post this so others could use these modelines if
they were having trouble (its at least a place to start!)

These modelines run for me on a 16MB TNT with 300Mhz ramDAC, using a
Princeton E0500 (30-70 hsync 50-120 vsync 15")

Modeline  "320x240"    15.75 320 360 376 400 240 240 244 245 doublescan

And i can get this mode to run by changing my hsync to 30-62 and vsync  to
50-100, but i lose support for 1024x768 with a dotclock of 85.  If i keep
it to my "normal" sync rates the vsync for this modeline jumps to 161kHz

ModeLine  "400x300"    17.58 400 440 472 512 300 301 302 312 doublescan


see the original message below.  I still do think XF86Setup generates
invalid modes for below 640x400 even when every piece of information is
input correctly.  Hope this can be fixed soon.  What is the use of these
modelines? the only use i can see is playing VideoCDs in fullscreen mode
while using MpegTV (www.mpegtv.com)

nate



----------------------------------------[mailto:aphro@aphroland.org ]--
   Vice President Network Operations       http://www.firetrail.com/
  Firetrail Internet Services Limited      http://www.aphroland.org/
       Everett, WA 425-348-7336            http://www.linuxpowered.net/
            Powered By:                    http://comedy.aphroland.org/
    Debian 2.1 Linux 2.0.36 SMP            http://yahoo.aphroland.org/
-----------------------------------------[mailto:aphro@netquest.net ]--
7:43pm up 83 days, 7:13, 2 users, load average: 2.40, 1.88, 1.75

---------- Forwarded message ----------
Date: Mon, 08 Nov 1999 23:17:49 +0100
From: root <ldrolez@usa.net>
To: nate@aphroland.org
Subject: DOUBLESCAN bug in NV4 driver (and fix)

Hi !

I have found on DejaNews that you had a similar problem. 
Here is my quick hack.

I have a 8MB Riva TNT. I use it with Linux/Mandrake 6.1 + XFree 3.3.5.
I noticed that 320x240 and 400x300 doublescanned modes did not
worked properly with my old 800x600 monitor.
So I decided to bring back my high-end office's monitor (which has
a kind of integrated frequency meter) to make things clearer...

Indeed, the 320x240 output by my TNT had a vsync=62.6KHz instead of
31.5Khz and the 400x300 one, had vsync=69.8KHz instead of 35KHz !!!!

So this XFree 3.3.5 NV3 driver myteriously multiply the vsync by TWO
!!!

After having played a little with modelines, I finally found a quick
turnaround to make these doublescanned modes work: simply divide by 2
the mode's dot clock:

Modeline "320x240"     6.3 320  360  376  400   240  240  244  245
Doublescan

will give 31.5KHz/60Hz, and

ModeLine "400x300"     9     400  440  472  512   300  301  302  312
Doublescan

will give 35KHz/56Hz. (Of course, you'll also need to lower your 
'HorizSync' and 'VertRefresh' values because XFree will think that
you want to use a 17.5KHz/28Hz mode)


Conclusion and Patch:

In the XFree source (in riva_xaa.c, in RivaInit()? ), 
only one line should be added to make doublescan modes work:
 
	  if (mode->Flags & V_DBLSCAN) 
		mode->Clock /= 2;

It would be nice to fix this in the source code for a next
release of the XFree86 server...

regards,

	Ludovic Drolez.


Reply to: