kevinlekiller / cvt_modeline_calculator_12

CVT (Coordinated Video Timings) modeline calculator with CVT v1.2 timings.
74 stars 16 forks source link

Forcing Reduced Blanking with CVT 1.1 #3

Closed maciekz closed 5 years ago

maciekz commented 5 years ago

Hi,

I've come across this calculator when trying to "overclock" my Fujitsu P27T-7.

Using regular CVT I've managed to go from 60Hz to 66Hz. Unfortunately going to 67Hz was unsuccessful because anytime the HSync goes above 100 kHz, the monitor is showing a warning message.

Then I've tried "Reduced Blanking 2" (CVT 1.2) and got this Modeline:

# 2560x1440 @ 67.000 Hz Reduced Blank (CVT) field rate 67.000 Hz; hsync: 99.562 kHz; pclk: 262.84 MHz Modeline "2560x1440_67.00_rb2" 262.84 2560 2568 2600 2640 1440 1472 1480 1486 +hsync -vsync

It failed as well but this time not with an error message, the screen simply stayed black.

Next I've tried the old version of the calculator from http://www.uruk.org/~erich/projects/cvt/, that doesn't have the "Refresh rate must be multiple of 60hz" check. It produced a Modeline slightly different but surprisingly that one has worked!

# 2560x1440 @ 67.00 Hz Reduced Blank (CVT) field rate 66.99 Hz; hsync: 99.54 kHz; pclk: 270.75 MHz Modeline "2560x1440_67.00_rb" 270.75 2560 2608 2640 2720 1440 1443 1448 1486 +HSync -Vsync

I'm afraid I know very little on how exactly CVT works and how the Modelines are calculated but maybe it would be possible to add a "force" option to skip the 60Hz check with CVT 1.1 "Reduced blanking" calculations? It would show a warning but it would do the calculations either way.

I've tried simply removing the 60Hz check from cvt12.c and it gives the exact same Modeline as the version from uruk.org

Regards, Maciej

maciekz commented 5 years ago

I have not programmed in C/C++ for years but I've managed to add the option. Here's the pull request: https://github.com/kevinlekiller/cvt_modeline_calculator_12/pull/4

Please feel free to discard it if it's not any good :)

kevinlekiller commented 5 years ago

Glad you got it sorted!

Edit: I guess it's the vsync timing that is too high on cvt 1.2 vs 1.1 (80us vs 50us)

kevinlekiller commented 5 years ago

If you've got patience you can try getting to 68Hz by testing small changes using http://www.epanorama.net/faq/vga2rgb/calc.html

Edit: Upping the pixel clock from 270.75 to 270.8 will get you got 67Hz for example (from 66.99).

maciekz commented 5 years ago

@kevinlekiller Hi :)

Thank you for merging my changes, I hope they will be useful for more people.

As I've said, I'm not really sure what all the parameters are and what they do but I might try to learn and then I'll try your suggestions :)

Best regards, Maciej