diff --git a/headers/private/graphics/nvidia/DriverInterface.h b/headers/private/graphics/nvidia/DriverInterface.h index cca4621844..98e97d8ef8 100644 --- a/headers/private/graphics/nvidia/DriverInterface.h +++ b/headers/private/graphics/nvidia/DriverInterface.h @@ -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; diff --git a/src/add-ons/accelerants/nvidia/InitAccelerant.c b/src/add-ons/accelerants/nvidia/InitAccelerant.c index 18451cb4cf..059c64b749 100644 --- a/src/add-ons/accelerants/nvidia/InitAccelerant.c +++ b/src/add-ons/accelerants/nvidia/InitAccelerant.c @@ -4,7 +4,7 @@ Other authors: Mark Watson, - Rudolf Cornelissen 10/2002-6/2004. + Rudolf Cornelissen 10/2002-7/2004. */ #define MODULE_BIT 0x00800000 diff --git a/src/add-ons/accelerants/nvidia/engine/nv_agp.c b/src/add-ons/accelerants/nvidia/engine/nv_agp.c index f6b730e0da..c27e4950b9 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_agp.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_agp.c @@ -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 */ diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac.c b/src/add-ons/accelerants/nvidia/engine/nv_dac.c index 27dea89740..8af9409bc3 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac.c @@ -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; diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c index ef4d756347..07d7f421bf 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c @@ -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; diff --git a/src/add-ons/accelerants/nvidia/engine/nv_general.c b/src/add-ons/accelerants/nvidia/engine/nv_general.c index e7f4fe5c6b..05dc08b2d8 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_general.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_general.c @@ -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 */ diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c index 65526ae64d..dc1ef12bfc 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_info.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c @@ -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... */ diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html b/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html index 4561f3bbb9..160344dbe1 100644 --- a/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html +++ b/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html @@ -4,7 +4,7 @@