completed unhide_fw and pgm_panel option stuff

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8333 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2004-07-06 10:58:25 +00:00
parent ead2658b25
commit 58fa391ee4
10 changed files with 68 additions and 27 deletions

View File

@ -81,7 +81,6 @@ typedef struct settings { // apsed, see comments in nv.settings
// for driver
char accelerant[B_FILE_NAME_LENGTH];
bool dumprom;
bool unhide_fw;
// for accelerant
uint32 logmask;
uint32 memory;
@ -89,6 +88,7 @@ typedef struct settings { // apsed, see comments in nv.settings
bool hardcursor;
bool switchhead;
bool force_pci;
bool unhide_fw;
bool pgm_panel;
} settings;

View File

@ -4,7 +4,7 @@
Other authors:
Mark Watson,
Rudolf Cornelissen 10/2002-6/2004.
Rudolf Cornelissen 10/2002-7/2004.
*/
#define MODULE_BIT 0x00800000

View File

@ -2,7 +2,7 @@
Rudolf Cornelissen 6/2004-7/2004
Note:
This stuff will probably be relocated to the AGP busmanager module later on,
Most of this stuff will probably be relocated to the AGP busmanager module later on,
but for now we have something to test with...
*/
@ -40,6 +40,22 @@ status_t nv_agp_setup(void)
((ai_card.config.agp_cap_id & AGP_rev_major) >> AGP_rev_major_shift),
((ai_card.config.agp_cap_id & AGP_rev_minor) >> AGP_rev_minor_shift)));
/* try to enable FW support if user requested this ('unsupported' tweak!) */
if (si->settings.unhide_fw)
{
uint32 reg;
LOG(4, ("AGP: STRAPINFO2 contains $%08x\n", NV_REG32(NV32_NVSTRAPINFO2)));
LOG(4, ("AGP: attempting to enable fastwrite support..\n"));
/* 'force' FW support */
reg = (NV_REG32(NV32_NVSTRAPINFO2) & ~0x00000800);
/* enable strapinfo overwrite */
NV_REG32(NV32_NVSTRAPINFO2) = (reg | 0x80000000);
LOG(4, ("AGP: STRAPINFO2 now contains $%08x\n", NV_REG32(NV32_NVSTRAPINFO2)));
}
nv_agp_list_caps(ai_card);
/* check for motherboard AGP host bridge */

View File

@ -143,13 +143,23 @@ status_t nv_dac_set_pix_pll(display_mode target)
float pix_setting, req_pclk;
status_t result;
/* fix a DVI or laptop flatpanel to 61Hz refresh!
* (we can't risk getting below 60.0Hz as some panels shut-off then!) */
/* we offer this option because some panels have very tight restrictions,
* and there's no overlapping settings range that makes them all work.
* note:
* this assumes the cards BIOS correctly programmed the panel (is likely) */
//fixme: when VESA DDC EDID stuff is implemented, this option can be deleted...
if (si->ps.tmds1_active && !si->settings.pgm_panel)
{
LOG(4,("DAC: Not programming DFP refresh (specified in nv.settings)\n"));
return B_OK;
}
/* fix a DVI or laptop flatpanel to 60Hz refresh! */
/* Note:
* The pixelclock drives the flatpanel modeline, not the CRTC modeline. */
if (si->ps.tmds1_active)
{
LOG(4,("DAC: Fixing DFP refresh to 61Hz!\n"));
LOG(4,("DAC: Fixing DFP refresh to 60Hz!\n"));
/* use the panel's modeline to determine the needed pixelclock */
target.timing.pixel_clock = si->ps.p1_timing.pixel_clock;

View File

@ -149,13 +149,23 @@ status_t nv_dac2_set_pix_pll(display_mode target)
float pix_setting, req_pclk;
status_t result;
/* fix a DVI or laptop flatpanel to 61Hz refresh!
* (we can't risk getting below 60.0Hz as some panels shut-off then!) */
/* we offer this option because some panels have very tight restrictions,
* and there's no overlapping settings range that makes them all work.
* note:
* this assumes the cards BIOS correctly programmed the panel (is likely) */
//fixme: when VESA DDC EDID stuff is implemented, this option can be deleted...
if (si->ps.tmds2_active && !si->settings.pgm_panel)
{
LOG(4,("DAC2: Not programming DFP refresh (specified in nv.settings)\n"));
return B_OK;
}
/* fix a DVI or laptop flatpanel to 60Hz refresh! */
/* Note:
* The pixelclock drives the flatpanel modeline, not the CRTC modeline. */
if (si->ps.tmds2_active)
{
LOG(4,("DAC2: Fixing DFP refresh to 61Hz!\n"));
LOG(4,("DAC2: Fixing DFP refresh to 60Hz!\n"));
/* use the panel's modeline to determine the needed pixelclock */
target.timing.pixel_clock = si->ps.p2_timing.pixel_clock;

View File

@ -80,7 +80,7 @@ status_t nv_general_powerup()
{
status_t status;
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.18 running.\n"));
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.19 running.\n"));
/* preset no laptop */
si->ps.laptop = false;
@ -1129,7 +1129,10 @@ static status_t nv_general_bios_to_powergraphics()
* (NOTE: testsignal function block resides in DAC1 only (!)) */
if (si->ps.secondary_head) DAC2W(TSTCTRL, (DAC2R(TSTCTRL) & 0xfffeefff));
/* setup AGP */
/* setup AGP:
* Note:
* This may only be done when no transfers are in progress on the bus, so now
* is probably a good time.. */
nv_agp_setup();
/* turn screen one on */

View File

@ -482,10 +482,9 @@ static void detect_panels()
if (DACR(FP_TG_CTRL) & 0x00000001) si->ps.p1_timing.flags |= B_POSITIVE_VSYNC;
if (DACR(FP_TG_CTRL) & 0x00000010) si->ps.p1_timing.flags |= B_POSITIVE_HSYNC;
/* refreshrate:
* fix a DVI or laptop flatpanel to 61Hz refresh!
* (we can't risk getting below 60.0Hz as some panels shut-off then!) */
* fix a DVI or laptop flatpanel to 60Hz refresh! */
si->ps.p1_timing.pixel_clock =
(si->ps.p1_timing.h_total * si->ps.p1_timing.v_total * 61) / 1000;
(si->ps.p1_timing.h_total * si->ps.p1_timing.v_total * 60) / 1000;
}
if (si->ps.tmds2_active)
{
@ -505,10 +504,9 @@ static void detect_panels()
if (DAC2R(FP_TG_CTRL) & 0x00000001) si->ps.p2_timing.flags |= B_POSITIVE_VSYNC;
if (DAC2R(FP_TG_CTRL) & 0x00000010) si->ps.p2_timing.flags |= B_POSITIVE_HSYNC;
/* refreshrate:
* fix a DVI or laptop flatpanel to 61Hz refresh!
* (we can't risk getting below 60.0Hz as some panels shut-off then!) */
* fix a DVI or laptop flatpanel to 60Hz refresh! */
si->ps.p2_timing.pixel_clock =
(si->ps.p2_timing.h_total * si->ps.p2_timing.v_total * 61) / 1000;
(si->ps.p2_timing.h_total * si->ps.p2_timing.v_total * 60) / 1000;
}
/* dump some panel configuration registers... */

View File

@ -4,7 +4,7 @@
</head>
<body>
<p><h2>Changes done for each driverversion:</h2></p>
<p><h1>head (0.18), (Rudolf)</h1></p>
<p><h1>head (0.19), (Rudolf)</h1></p>
<ul>
<li>Added AGP mode capability on AGP cards along with the option to block it in nv.settings. No GART and AGP aperture support; but if your card and system AGP host bridge support the 'fastwrite' (FW) feature, you'll notice a nice speedup of unaccelerated graphics.
<ul>
@ -12,7 +12,7 @@
<li>Also tested video playback using bitmap output mode: CPU load drops considerably depending on desktop colordepth and resolution of the video played back.<br>
<li>2D acceleration will not speedup because it's working 'local', so within the graphics cards engine and it's RAM only.
</ul>
<strong>Note please :</strong><br>
<strong>Note please:</strong><br>
<ul>
<li>You need the new AGP kernel driver I setup for this feature, without it you will remain using PCI mode as usual.
<li>This AGP stuff BTW will be re-setup later on (as a module) to be graphics driver-independant so all AGP cards, even AGP cards running in VESA mode, can profit from it.
@ -21,7 +21,11 @@
<li>Updated CRTC modeline tuning for panels: this should fix the 'right-shifted' picture on some panels in their native modes;
<li>Fixed BIOS ROM dump (to file) option;
<li>Fixed GET_TIMING_CONSTRAINTS and GET_ACCELERANT_DEVICE_INFO accelerant hooks to return valid data; updated modeline checking and modification code (used by ProposeDisplayMode) to adhere to one more timing constraint
<li>Lowered fixed refreshrate setting for panels to be 61Hz now: it turns out panels exist that are picky 'on the high side' as well.
<li>Lowered fixed refreshrate setting for panels to be 60Hz now: it turns out panels exist that are picky 'on the high side' as well;
<li>Added option in nv.settings to block refreshrate programming if a flatpanel is active: this should enable support on picky panels;
<li>Added option in nv.settings to 'unhide' fastwrite support in AGP cards. Some older cards support FW even though normally they don't show it so it won't get activated (confirmed GeForce2 MX400, NV11).<br>
<strong>NOTE please:</strong><br>
This is a tweak that you <strong>can</strong> enable, but you do so at your own risk (of course)!
</ul>
<p><h1>nv_driver 0.10, (Rudolf)</h1></p>
<ul>

View File

@ -258,7 +258,6 @@ static settings current_settings = { // see comments in nv.settings
// for driver
DRIVER_PREFIX ".accelerant",
false, // dumprom
false, // unhide_fw
// for accelerant
0x00000000, // logmask
0, // memory
@ -266,6 +265,7 @@ static settings current_settings = { // see comments in nv.settings
false, // hardcursor
false, // switchhead
false, // force_pci
false, // unhide_fw
true, // pgm_panel
};
@ -379,7 +379,6 @@ init_driver(void) {
strcpy (current_settings.accelerant, item);
}
current_settings.dumprom = get_driver_boolean_parameter (settings_handle, "dumprom", false, false);
current_settings.unhide_fw = get_driver_boolean_parameter (settings_handle, "unhide_fw", false, false);
// for accelerant
item = get_driver_parameter (settings_handle, "logmask", "0x00000000", "0x00000000");
@ -394,6 +393,7 @@ init_driver(void) {
current_settings.usebios = get_driver_boolean_parameter (settings_handle, "usebios", false, false);
current_settings.switchhead = get_driver_boolean_parameter (settings_handle, "switchhead", false, false);
current_settings.force_pci = get_driver_boolean_parameter (settings_handle, "force_pci", false, false);
current_settings.unhide_fw = get_driver_boolean_parameter (settings_handle, "unhide_fw", false, false);
current_settings.pgm_panel = get_driver_boolean_parameter (settings_handle, "pgm_panel", false, false);
unload_driver_settings (settings_handle);

View File

@ -8,25 +8,25 @@
# accelerant "nv.accelerant"
# nv.accelerant parameters
usebios false # if true rely on bios to coldstart the card: not working yet, so always true
usebios false # if true rely on bios to coldstart the card: not working, so always true
#memory 2 # in MB, override builtin memory size detection
hardcursor true # if true use on-chip cursor capabilities
#logmask 0x00000000 # nothing logged, is default
#logmask 0x08000604 # log overlay use in full
#logmask 0x00000000 # nothing logged, is default
#logmask 0x08000604 # log overlay use in full
#logmask 0xffffffff # log everything
dumprom false # dump bios rom in ~/nv.rom
switchhead false # switch head assignment (dualhead cards only)
force_pci false # block AGP mode use if true (AGP cards only)
# WARNING: tweak alert! modify stuff below on your own risk...
unhide_fw false # if true 'unhide' cards AGP fastwrite support on cards that hide, it
unhide_fw false # if true 'unhide' cards AGP fastwrite support on cards that hide it
pgm_panel true # if false don't program DVI and laptop panel pixelclocks (refreshrates)
#--------- that's all.
#logmask setup info:
#log level select:
#logmask 0x0000000x # lowest digit: bitmask to select logging level.
#logmask 0x0000000x # lowest digit: bitmask to select logging level.
#log modules select:
#logmask 0xxxxxxxx0 # highest 7 digits: bitmask to select individual modules to log.