From d827b3cc06ab24462bc249a5e4e1ba83d2aa61f0 Mon Sep 17 00:00:00 2001
From: Rudolf Cornelissen
Date: Tue, 13 Apr 2021 00:16:53 +0000
Subject: [PATCH] nvidia driver: fixed tickets #2780, #4670, #6292, #12955
(Nforce 4, 4xx display trouble)
---
.../accelerants/nvidia/engine/nv_general.c | 2 +-
.../accelerants/nvidia/engine/nv_info.c | 26 +++++++++++++------
.../drivers/graphics/nvidia/UPDATE.html | 4 +++
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/src/add-ons/accelerants/nvidia/engine/nv_general.c b/src/add-ons/accelerants/nvidia/engine/nv_general.c
index ee94571db7..b16aa486f1 100644
--- a/src/add-ons/accelerants/nvidia/engine/nv_general.c
+++ b/src/add-ons/accelerants/nvidia/engine/nv_general.c
@@ -92,7 +92,7 @@ status_t nv_general_powerup()
{
status_t status;
- LOG(1,("POWERUP: Haiku nVidia Accelerant 1.10 running.\n"));
+ LOG(1,("POWERUP: Haiku nVidia Accelerant 1.11 running.\n"));
/* log VBLANK INT usability status */
if (si->ps.int_assigned)
diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c
index d18cd97265..2640c7cdf5 100644
--- a/src/add-ons/accelerants/nvidia/engine/nv_info.c
+++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c
@@ -1,7 +1,7 @@
/* Read initialisation information from card */
/* some bits are hacks, where PINS is not known */
/* Author:
- Rudolf Cornelissen 7/2003-11/2009
+ Rudolf Cornelissen 7/2003-4/2021
*/
#define MODULE_BIT 0x00002000
@@ -3326,14 +3326,24 @@ static void getstrap_arch_nv10_20_30_40(void)
}
/* determine PLL reference crystal frequency: three types are used... */
- if (strapinfo & 0x00000040)
- si->ps.f_ref = 14.31818;
- else
- si->ps.f_ref = 13.50000;
-
if ((si->ps.secondary_head) && (si->ps.card_type != NV11))
- {
- if (strapinfo & 0x00400000) si->ps.f_ref = 27.00000;
+ strapinfo &= 0x00400040;
+ else
+ strapinfo &= 0x00000040;
+
+ switch (strapinfo) {
+ case 0x00000000:
+ si->ps.f_ref = 13.50000;
+ break;
+ case 0x00000040:
+ si->ps.f_ref = 14.31818;
+ break;
+ case 0x00400000:
+ si->ps.f_ref = 27.00000;
+ break;
+ case 0x00400040:
+ si->ps.f_ref = 25.00000;
+ break;
}
}
diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html b/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html
index 7ce908724d..c9cca3f4d9 100644
--- a/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html
+++ b/src/add-ons/kernel/drivers/graphics/nvidia/UPDATE.html
@@ -4,6 +4,10 @@
Changes done for each driverversion:
+head (Haiku repository 1.11, Rudolf)
+
+- Fixed driver trouble on several Geforce 6000-6200 cards and maybe even more where the refreshrate was not properly calculated causing things like only displaying a part of the screen, a wobbly screen, no screen at all or just displaying at a too low rate. In cases where the GPU and/or RAM PLL is programmed on cards (depending on the nvidia.settings file) this might also solve random 'noise' or flickering across the entire screen(s). It turns out some newer supported cards outthere (notably Nforce 4 and 4xx types) use a new crystal frequency base (25 Mhz) for the GPU chip which was not yet detected by the driver.
+
head (Haiku repository 1.10, Rudolf)
- 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.