nVidia driver: added option to block EDID resolution restrictions (check_edid)

This commit is contained in:
Rudolf Cornelissen 2016-01-05 23:49:00 +01:00
parent 32276e7762
commit b0c69e8490
8 changed files with 44 additions and 26 deletions

View File

@ -5,7 +5,7 @@
Other authors: Other authors:
Mark Watson; Mark Watson;
Apsed; Apsed;
Rudolf Cornelissen 10/2002-12/2015. Rudolf Cornelissen 10/2002-1/2016.
*/ */
#ifndef DRIVERINTERFACE_H #ifndef DRIVERINTERFACE_H
@ -245,6 +245,7 @@ typedef struct { // apsed, see comments in nvidia.settings
bool block_acc; bool block_acc;
uint32 gpu_clk; uint32 gpu_clk;
uint32 ram_clk; uint32 ram_clk;
bool check_edid;
} nv_settings; } nv_settings;
/* monitor info gathered via EDID */ /* monitor info gathered via EDID */

View File

@ -4,7 +4,7 @@
Other authors: Other authors:
Mark Watson, Mark Watson,
Rudolf Cornelissen 10/2002-12/2015. Rudolf Cornelissen 10/2002-1/2016.
*/ */
#define MODULE_BIT 0x00800000 #define MODULE_BIT 0x00800000
@ -42,8 +42,8 @@ static status_t init_common(int the_fd) {
si->settings.logmask, si->settings.memory, si->settings.hardcursor, si->settings.usebios, si->settings.switchhead, si->settings.force_pci)); si->settings.logmask, si->settings.memory, si->settings.hardcursor, si->settings.usebios, si->settings.switchhead, si->settings.force_pci));
LOG(4,("init_common: dumprom %d, unhide_fw %d, pgm_panel %d, dma_acc %d, tv_output %d, vga_on_tv %d\n", LOG(4,("init_common: dumprom %d, unhide_fw %d, pgm_panel %d, dma_acc %d, tv_output %d, vga_on_tv %d\n",
si->settings.dumprom, si->settings.unhide_fw, si->settings.pgm_panel, si->settings.dma_acc, si->settings.tv_output, si->settings.vga_on_tv)); si->settings.dumprom, si->settings.unhide_fw, si->settings.pgm_panel, si->settings.dma_acc, si->settings.tv_output, si->settings.vga_on_tv));
LOG(4,("init_common: force_sync %d, gpu_clk %dMhz, ram_clk %dMhz, force_ws %d, block_acc %d\n", LOG(4,("init_common: force_sync %d, gpu_clk %dMhz, ram_clk %dMhz, force_ws %d, block_acc %d, check_edid %d\n",
si->settings.force_sync, si->settings.gpu_clk, si->settings.ram_clk, si->settings.force_ws, si->settings.block_acc)); si->settings.force_sync, si->settings.gpu_clk, si->settings.ram_clk, si->settings.force_ws, si->settings.block_acc, si->settings.check_edid));
/*Check for R4.5.0 and if it is running, use work around*/ /*Check for R4.5.0 and if it is running, use work around*/
{ {

View File

@ -4,7 +4,7 @@
Other authors for NV driver: Other authors for NV driver:
Mark Watson, Mark Watson,
Rudolf Cornelissen 9/2002-12/2015 Rudolf Cornelissen 9/2002-1/2016
*/ */
#define MODULE_BIT 0x00400000 #define MODULE_BIT 0x00400000
@ -316,22 +316,26 @@ PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, const displa
} }
} }
/* check if screen(s) can display the requested resolution (if we have it's EDID info) /* only limit modelist if user did not explicitly block this via nv.settings
note: (because of errors in monitor's EDID information returned) */
allowing 2 pixels more for horizontal display for the 1366 mode, since multiples of 8 if (si->settings.check_edid) {
are required for the CRTCs horizontal timing programming) */ /* check if screen(s) can display the requested resolution (if we have it's EDID info)
if (si->ps.crtc1_screen.have_native_edid) { note:
if ((target->timing.h_display - 2) > si->ps.crtc1_screen.timing.h_display allowing 2 pixels more for horizontal display for the 1366 mode, since multiples of 8
|| target->timing.v_display > si->ps.crtc1_screen.timing.v_display) { are required for the CRTCs horizontal timing programming) */
LOG(4, ("PROPOSEMODE: screen at crtc1 can't display requested resolution, aborted.\n")); if (si->ps.crtc1_screen.have_native_edid) {
return B_ERROR; if ((target->timing.h_display - 2) > si->ps.crtc1_screen.timing.h_display
|| target->timing.v_display > si->ps.crtc1_screen.timing.v_display) {
LOG(4, ("PROPOSEMODE: screen at crtc1 can't display requested resolution, aborted.\n"));
return B_ERROR;
}
} }
} if (si->ps.crtc2_screen.have_native_edid) {
if (si->ps.crtc2_screen.have_native_edid) { if ((target->timing.h_display - 2) > si->ps.crtc2_screen.timing.h_display
if ((target->timing.h_display - 2) > si->ps.crtc2_screen.timing.h_display || target->timing.v_display > si->ps.crtc2_screen.timing.v_display) {
|| target->timing.v_display > si->ps.crtc2_screen.timing.v_display) { LOG(4, ("PROPOSEMODE: screen at crtc2 can't display requested resolution, aborted.\n"));
LOG(4, ("PROPOSEMODE: screen at crtc2 can't display requested resolution, aborted.\n")); return B_ERROR;
return B_ERROR; }
} }
} }

View File

@ -1,7 +1,7 @@
/* Authors: /* Authors:
Mark Watson 12/1999, Mark Watson 12/1999,
Apsed, Apsed,
Rudolf Cornelissen 10/2002-6/2010 Rudolf Cornelissen 10/2002-1/2016
tst.. tst..
*/ */
@ -92,7 +92,7 @@ status_t nv_general_powerup()
{ {
status_t status; status_t status;
LOG(1,("POWERUP: Haiku nVidia Accelerant 1.09 running.\n")); LOG(1,("POWERUP: Haiku nVidia Accelerant 1.10 running.\n"));
/* log VBLANK INT usability status */ /* log VBLANK INT usability status */
if (si->ps.int_assigned) if (si->ps.int_assigned)

View File

@ -254,10 +254,18 @@ The acceleration engine is disabled.
<ul> <ul>
<li>On Haiku the acceleration engine is not used at all.<br> <li>On Haiku the acceleration engine is not used at all.<br>
</ul> </ul>
<li><strong>check_edid:</strong><br>
This option lets you disable adherence to your monitor's reported capabilities via EDID. It happens very rarely that especially older monitors report their capabilities in a non-correct way, making the driver believe it has less capabilities than it actually has.
<ul>
<li><strong>false:</strong><br>
<strong>check_edid false</strong> prevents the driver from blocking modes your monitor does not support according to the EDID information it returns to the driver. The driver still fetches the EDID information from your monitor, and still checks it's aspect ratio.
<li><strong>true:</strong> (default setting)<br>
Keep it set to <strong>check_edid true</strong>, unless you have determined that your monitor supports higher resolution modes than the modes the driver lets you choose from currently.
</ul>
</ul> </ul>
<hr> <hr>
<br> <br>
Rudolf Cornelissen.<br> Rudolf Cornelissen.<br>
<p>(Page last updated on January 4, 2016)</p> <p>(Page last updated on January 5, 2016)</p>
</body> </body>
</html> </html>

View File

@ -4,7 +4,7 @@
</head> </head>
<body> <body>
<p><h2>Changes done for each driverversion:</h2></p> <p><h2>Changes done for each driverversion:</h2></p>
<p><h1>head (Haiku repository 1.09, Rudolf)</h1></p> <p><h1>head (Haiku repository 1.10, Rudolf)</h1></p>
<ul> <ul>
<li>Fixed driver assuming enabling AGP mode succeeded on some occasions if it did not block it itself. Blocking AGP mode completely via the AGP busmanager (option 'block_agp') resulted in a crashing acceleration engine because it was setup for AGP transfers instead of using PCI transfers. Error was solved with help from user kraton. <li>Fixed driver assuming enabling AGP mode succeeded on some occasions if it did not block it itself. Blocking AGP mode completely via the AGP busmanager (option 'block_agp') resulted in a crashing acceleration engine because it was setup for AGP transfers instead of using PCI transfers. Error was solved with help from user kraton.
<li>Fixed shared_info struct problem occuring when 3D 'accelerant' is used (tested Alpha 4.1): the TVencoder type definition list apparantly gets some memory assigned these days when done inside the definition of shared_info. Moved encoder list outside the shared_info definition. <li>Fixed shared_info struct problem occuring when 3D 'accelerant' is used (tested Alpha 4.1): the TVencoder type definition list apparantly gets some memory assigned these days when done inside the definition of shared_info. Moved encoder list outside the shared_info definition.
@ -34,7 +34,8 @@
<li>Added dithering for laptop panels (if they are connected to DAC1 only for now). Gradients should now display much more fluently on 18bit depth panels (no more 'colorbands'); <li>Added dithering for laptop panels (if they are connected to DAC1 only for now). Gradients should now display much more fluently on 18bit depth panels (no more 'colorbands');
<li>Fixed black screen on (some?) NV44 cards like Geforce 6100, 6150 and 6200 types; <li>Fixed black screen on (some?) NV44 cards like Geforce 6100, 6150 and 6200 types;
<li>Modified 'force_ws' option to force aspect 16:9 instead of 16:10 so both aspect widescreen modes are settable; <li>Modified 'force_ws' option to force aspect 16:9 instead of 16:10 so both aspect widescreen modes are settable;
<li>Added basic support for Haiku's native ScreenPrefs panel for dualhead modes. No TVout currently, and switched dualhead mode is not remembered over reboots nor is it coupled with workspaces (so unlike as it is with Dualhead Setup). <li>Added basic support for Haiku's native ScreenPrefs panel for dualhead modes. No TVout currently, and switched dualhead mode is not remembered over reboots nor is it coupled with workspaces (so unlike as it is with Dualhead Setup);
<li>Added new nv.setting called 'check_edid' that forces higher resolution modes to be available on monitors that don't report their EDID info correctly (if option is set to 'false'). Only use this new option if appropriate of course, too high resolution modes will not be liked by your monitor(s)!
</ul> </ul>
<p><h1>nv_driver 0.80 (Rudolf)</h1></p> <p><h1>nv_driver 0.80 (Rudolf)</h1></p>
<ul> <ul>

View File

@ -4,7 +4,7 @@
Other authors: Other authors:
Mark Watson; Mark Watson;
Rudolf Cornelissen 3/2002-6/2010. Rudolf Cornelissen 3/2002-1/2016.
*/ */
@ -391,6 +391,7 @@ static nv_settings sSettings = { // see comments in nvidia.settings
false, // block_acc false, // block_acc
0, // gpu_clk 0, // gpu_clk
0, // ram_clk 0, // ram_clk
true, // check_edid
}; };
@ -1460,6 +1461,8 @@ init_driver(void)
"force_ws", false, false); "force_ws", false, false);
sSettings.block_acc = get_driver_boolean_parameter(settings, sSettings.block_acc = get_driver_boolean_parameter(settings,
"block_acc", false, false); "block_acc", false, false);
sSettings.check_edid = get_driver_boolean_parameter(settings,
"check_edid", true, true);
item = get_driver_parameter(settings, "gpu_clk", "0", "0"); item = get_driver_parameter(settings, "gpu_clk", "0", "0");
value = strtoul(item, &end, 0); value = strtoul(item, &end, 0);

View File

@ -30,6 +30,7 @@ pgm_panel false # if false don't program DVI and laptop panel pixelclocks (refr
vga_on_tv false # if true enables VGA output on the head outputting to TV vga_on_tv false # if true enables VGA output on the head outputting to TV
#gpu_clk 150 # in Mhz, (tries to) override default GPU clockspeed (be carefull!!!) #gpu_clk 150 # in Mhz, (tries to) override default GPU clockspeed (be carefull!!!)
#ram_clk 150 # in Mhz, (tries to) override default cardRAM clockspeed (be carefull!!!) #ram_clk 150 # in Mhz, (tries to) override default cardRAM clockspeed (be carefull!!!)
check_edid true # if true blocks resolutions beyond monitor(s) capabilities
#--------- that's all. #--------- that's all.