From faed7a30d412011bf96830da74fc03a8b4932740 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 5 Sep 2009 16:02:20 +0000 Subject: [PATCH] fixed PLL selection trouble on GF6xxx and 7xxx cards with a little help from the nouveau project and a lot of testing. Now dualhead should work on most of these cards, and now you should nolonger be presented with a 'out of range' message on your DVI connected screen if the boot splash screen is at a lower-than-native resolution for your screen. This hopefully fixes bugs #1557, #2780, #2948 and #4321. Bumped version to 1.00. Yes. +alphabranch. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32946 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_dac.c | 16 +++++++++++++- .../accelerants/nvidia/engine/nv_dac2.c | 16 +++++++++++++- .../accelerants/nvidia/engine/nv_general.c | 11 ++-------- .../drivers/graphics/nvidia/README.html | 22 +++++++++---------- .../drivers/graphics/nvidia/UPDATE.html | 5 +++-- 5 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac.c b/src/add-ons/accelerants/nvidia/engine/nv_dac.c index a4622a7553..7c788c3f46 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac.c @@ -1,6 +1,6 @@ /* program the DAC */ /* Author: - Rudolf Cornelissen 12/2003-7/2009 + Rudolf Cornelissen 12/2003-9/2009 */ #define MODULE_BIT 0x00010000 @@ -200,6 +200,20 @@ status_t nv_dac_set_pix_pll(display_mode target) /* Give the PIXPLL frequency some time to lock... (there's no indication bit available) */ snooze(1000); + + /* enable programmable PLLs */ + /* (confirmed PLLSEL to be a write-only register on NV04 and NV11!) */ + /* note: + * setup PLL assignment _after_ programming PLL */ + if (si->ps.secondary_head) { + if (si->ps.card_arch < NV40A) + DACW(PLLSEL, 0x30000f00); + else + DACW(PLLSEL, 0x30000f04); + } else { + DACW(PLLSEL, 0x10000700); + } + LOG(2,("DAC: PIX PLL frequency should be locked now...\n")); return B_OK; diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c index 23ca802897..063750fafd 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c @@ -1,6 +1,6 @@ /* program the secondary DAC */ /* Author: - Rudolf Cornelissen 12/2003-7/2009 + Rudolf Cornelissen 12/2003-9/2009 */ #define MODULE_BIT 0x00001000 @@ -203,6 +203,20 @@ status_t nv_dac2_set_pix_pll(display_mode target) /* Give the PIXPLL frequency some time to lock... (there's no indication bit available) */ snooze(1000); + + /* enable programmable PLLs */ + /* (confirmed PLLSEL to be a write-only register on NV04 and NV11!) */ + /* note: + * setup PLL assignment _after_ programming PLL */ + if (si->ps.secondary_head) { + if (si->ps.card_arch < NV40A) + DACW(PLLSEL, 0x30000f00); + else + DACW(PLLSEL, 0x30000f04); + } else { + DACW(PLLSEL, 0x10000700); + } + LOG(2,("DAC2: PIX PLL frequency should be locked now...\n")); return B_OK; diff --git a/src/add-ons/accelerants/nvidia/engine/nv_general.c b/src/add-ons/accelerants/nvidia/engine/nv_general.c index c1c986accf..2c806fc00b 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_general.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_general.c @@ -1,7 +1,7 @@ /* Authors: Mark Watson 12/1999, Apsed, - Rudolf Cornelissen 10/2002-8/2009 + Rudolf Cornelissen 10/2002-9/2009 tst.. */ @@ -92,7 +92,7 @@ status_t nv_general_powerup() { status_t status; - LOG(1,("POWERUP: Haiku nVidia Accelerant 0.99 running.\n")); + LOG(1,("POWERUP: Haiku nVidia Accelerant 1.00 running.\n")); /* log VBLANK INT usability status */ if (si->ps.int_assigned) @@ -1789,13 +1789,6 @@ static status_t nv_general_bios_to_powergraphics() DACW(GENCTRL, 0x00100100); if (si->ps.secondary_head) DAC2W(GENCTRL, 0x00100100); - /* enable programmable PLLs */ - /* (confirmed PLLSEL to be a write-only register on NV04 and NV11!) */ - if (si->ps.secondary_head) - DACW(PLLSEL, 0x30000f00); - else - DACW(PLLSEL, 0x10000700); - /* turn on DAC and make sure detection testsignal routing is disabled * (b16 = disable DAC, * b12 = enable testsignal output */ diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/README.html b/src/add-ons/kernel/drivers/graphics/nvidia/README.html index 70671db365..79e6fe93ef 100644 --- a/src/add-ons/kernel/drivers/graphics/nvidia/README.html +++ b/src/add-ons/kernel/drivers/graphics/nvidia/README.html @@ -41,7 +41,7 @@ Geforce 8xxx and later series cards (NV50, G80, also known as GPGPU, general pur
  • B_YCbCr422 hardware overlay support on both TNT and GeForce series cards, except for GeForce 6xxx and 7xxx series (GeForce 6800 works though). Overlay output 'follows head' in dualhead stretch/switch modes;
  • Dualhead support on GeForce dualhead cards (use 'Dualhead Setup' from BeBits for now);
  • DVI and laptop panel support; -
  • Widescreen mode support (all screens must be widescreen type and they must all be digitally connected); +
  • Widescreen mode support (all screens must be widescreen type;
  • Basic AGP mode support on AGP cards, using the new (seperate) Haiku AGP busmanager;
  • Basic ('legacy') PCIe support;
  • Coldstart support for analog connected screens on most cards except TNT1, GeForce 6xxx and 7xxx series; @@ -54,20 +54,20 @@ Geforce 8xxx and later series cards (NV50, G80, also known as GPGPU, general pur
  • If the driver seems to create 'random' trouble make sure you have a fully functional VGA BIOS, or system BIOS for embedded cards (check for updates on the manufacturor's site). Make sure you mail me if you still have trouble but also if this version fixed that!
  • If on a laptop the internal panel doesn't work when you connect an external monitor, make sure you set 'output device selection' to 'internal' (instead of 'auto') in the system BIOS if it has such an option. If you have this symptom on a normal card, or on a laptop without that BIOS option then you are probably out of luck for dualhead support;
  • NV40 architecture cards: (GeForce 6xxx, but 6800 AGP seems to be OK)
    - Secondary analog monitor load detection doesn't work and we can't control very well to which connector the card's output gets routed (lack of specs). This means you might have to experiment a bit with the way you connect your monitor to the card. A single analog or DVI screen should work OK, and two analog screens should be OK as well. + We can't control very well to which connector the card's output gets routed (lack of specs). This means you might have to experiment a bit with the way you connect your monitor to the card.

    Installation:

    -If you encounter bugs, please checkout the driver's website to see if it's already on the todo list. You can also checkout the UPDATE file included with this driver to see if it should have been fixed. If you think it's prudent, or if you are unsure, then please fill out the bugreport form on the site or send me an Email. Make sure you are as precise as possible because that will make things easier to trackdown and fix...
    +If you encounter bugs, please see if a matching bug report already exists at the Haiku website. If not, or if you are unsure, file a new one. Make sure you are as precise as possible because that will make things easier to trackdown and fix...


    OK, now that's all said let's get to it ;-)

    -In contrary to what I have said before you don't need to de-install official Be drivers for this driver to work correctly. This driver will install in the user part of the BeOS, so not in the system part where the official drivers are.
    -BeOS first checks (during boot) if there are 'user-addons' that should be loaded for a device. If not, it loads it's own drivers (if any). You can select which driver should be loaded by hitting the spacebar as soon as the BeOS 'icons' screen appears. If you select disable user addons the system will load it's own drivers. If you don't do anything, the system will load the Haiku Nvidia TNT/GeForce graphics driver.
    +You don't need to de-install official drivers for this driver to work correctly. This driver will install in the user part of Haiku, so not in the system part where the official drivers are.
    +Haiku first checks (during boot) if there are 'user-addons' that should be loaded for a device. If not, it loads it's own drivers (if any). You can select which driver should be loaded by hitting the spacebar just before the Haiku 'icons' splash screen appears. If you select disable user addons the system will load it's own drivers. If you don't do anything, the system will load the Haiku Nvidia TNT/GeForce graphics driver.

    -Note: This might turn out to be handy if you run into trouble upon testing the driver, or if you are 'tweaking' the nv.settings file...
    +Note: This might turn out to be handy if you run into trouble upon testing the driver, or if you are 'tweaking' the nvidia.settings file...


    actual INSTALLATION:

    @@ -83,10 +83,10 @@ Unzip the zip file that contains the driver to the root folder. Now reboot and y
    Currently there's no uninstall script included. Just do it manually:

    -Delete the nv.accelerant file in home/config/add-ons/accelerants/
    -Delete the nv.driver file in home/config/add-ons/kernel/drivers/bin/
    -Delete the nv.settings file in home/config/settings/kernel/drivers/
    -Delete the nv.driver shortcut in home/config/add-ons/kernel/drivers/dev/graphics/ which pointed to the file nv.driver.
    +Delete the nvidia.accelerant file in home/config/add-ons/accelerants/
    +Delete the nvidia.driver file in home/config/add-ons/kernel/drivers/bin/
    +Delete the nvidia.settings file in home/config/settings/kernel/drivers/
    +Delete the nvidia.driver shortcut in home/config/add-ons/kernel/drivers/dev/graphics/ which pointed to the file nvidia.driver.

    You have to reboot in order to apply the original configuration.

    @@ -254,6 +254,6 @@ The acceleration engine is disabled.

    Rudolf Cornelissen.
    -

    (Page last updated on August 23, 2009)

    +

    (Page last updated on September 5, 2009)

    diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html b/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html index 6cca05658d..0b46a467e7 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 @@

    Changes done for each driverversion:

    -

    head (SVN 0.98, Rudolf)

    +

    head (SVN 1.00, Rudolf)

    nv_driver 0.80 (Rudolf)