From 2e3e1a5902f4fd9824c90dff7fc45c638b67c834 Mon Sep 17 00:00:00 2001
From: Rudolf Cornelissen
Date: Sun, 7 Feb 2016 22:46:49 +0100
Subject: [PATCH] VIA gfx driver: fixed overlay on DDR166 and DDR200 memory.
v0.19, updated docs.
---
src/add-ons/accelerants/via/engine/bes.c | 30 +++++++++++++++----
src/add-ons/accelerants/via/engine/general.c | 4 +--
.../kernel/drivers/graphics/via/UPDATE.html | 9 +++---
3 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/src/add-ons/accelerants/via/engine/bes.c b/src/add-ons/accelerants/via/engine/bes.c
index 0db40de56c..9ece4ac4b5 100644
--- a/src/add-ons/accelerants/via/engine/bes.c
+++ b/src/add-ons/accelerants/via/engine/bes.c
@@ -1,5 +1,5 @@
/* VIA Unichrome Back End Scaler functions */
-/* Written by Rudolf Cornelissen 05/2002-1/2016 */
+/* Written by Rudolf Cornelissen 05/2002-2/2016 */
#define MODULE_BIT 0x00000200
@@ -49,13 +49,21 @@ bool eng_bes_chk_bandwidth()
switch (((CRTCR(MEMCLK)) & 0x70) >> 4)
{
case 0: /* SDR 66 */
- case 1: /* SDR 100 */
- case 2: /* SDR 133 */
- /* memory is too slow, sorry. */
+ LOG(8,("Overlay: System memory is type SDR 66\n"));
return false;
break;
- case 3: /* DDR 100 */
+ case 1: /* SDR 100 */
+ LOG(8,("Overlay: System memory is type SDR 100\n"));
+ return false;
+ break;
+ case 2: /* SDR 133 */
+ /* memory is too slow, sorry. */
+ LOG(8,("Overlay: System memory is type SDR 133\n"));
+ return false;
+ break;
+ case 3: /* DDR 100 (PC1600) */
/* DDR100's basic limit... */
+ LOG(8,("Overlay: System memory is type DDR 100\n"));
if (bandwidth > 921600000.0) return false;
/* ... but we have constraints at higher than 800x600 */
if (si->dm.timing.h_display > 800)
@@ -65,10 +73,20 @@ bool eng_bes_chk_bandwidth()
if (refresh > 60.2) return false;
}
break;
- case 4: /* DDR 133 */
+ case 4: /* DDR 133 (PC2100) */
+ LOG(8,("Overlay: System memory is type DDR 133\n"));
if (bandwidth > 4045440000.0) return false;
break;
+ case 5: /* DDR 166 (PC2700) */
+ LOG(8,("Overlay: System memory is type DDR 166\n"));
+ if (bandwidth > 5210000000.0) return false;//fixme: set more correct limit?
+ break;
+ case 6: /* DDR 200 (PC3200) */
+ LOG(8,("Overlay: System memory is type DDR 200\n"));
+ if (bandwidth > 6170000000.0) return false;//fixme: set more correct limit?
+ break;
default: /* not (yet?) used */
+ LOG(8,("Overlay: System memory is (yet) unknown type!\n"));
return false;
break;
}
diff --git a/src/add-ons/accelerants/via/engine/general.c b/src/add-ons/accelerants/via/engine/general.c
index 849810922f..54efe494ad 100644
--- a/src/add-ons/accelerants/via/engine/general.c
+++ b/src/add-ons/accelerants/via/engine/general.c
@@ -1,7 +1,7 @@
/* Authors:
Mark Watson 12/1999,
Apsed,
- Rudolf Cornelissen 10/2002-1/2016
+ Rudolf Cornelissen 10/2002-2/2016
*/
#define MODULE_BIT 0x00008000
@@ -90,7 +90,7 @@ status_t eng_general_powerup()
{
status_t status;
- LOG(1,("POWERUP: Haiku VIA Accelerant 0.18 running.\n"));
+ LOG(1,("POWERUP: Haiku VIA Accelerant 0.19 running.\n"));
/* preset no laptop */
si->ps.laptop = false;
diff --git a/src/add-ons/kernel/drivers/graphics/via/UPDATE.html b/src/add-ons/kernel/drivers/graphics/via/UPDATE.html
index e0eb72950d..dc4c63c1cf 100644
--- a/src/add-ons/kernel/drivers/graphics/via/UPDATE.html
+++ b/src/add-ons/kernel/drivers/graphics/via/UPDATE.html
@@ -4,7 +4,7 @@
Changes done for each driverversion:
-via_driver (Haiku repository 0.18, Rudolf)
+via_driver (Haiku repository 0.19, Rudolf)
- Initial setup based on nVidia driver 0.30;
- Kerneldriver uses MTR-WC mapping where available;
@@ -24,7 +24,8 @@
- Added returning correct information in GET_ACCELERANT_DEVICE_INFO (displayed in Haiku screenprefs panel);
- Fixed wrong PLL registerdefines for K8M800 and added seperate pixelPLL calculation routine: K8M800 now works correctly whereas previously you'd have a black screen (tested different resolutions, refreshrates and colordepths);
- Fixed blocking overlay hooks if current videomode is not supported (before overlay could kick in while it should not, resulting in bad video or desktop pictures);
-
- Fixed K8M800 video overlay: apparantly the engine was modified for this revision of the Unichrome video chipset: at least the 'V1' engine doesn't work here, while ' V3' does (using V3 now on K8M800).
+
- Fixed K8M800 video overlay: apparantly the engine was modified for this revision of the Unichrome video chipset: at least the 'V1' engine doesn't work here, while ' V3' does (using V3 now on K8M800);
+
- Added overlay support on system memory types DDR 166 and DDR 200. Before on these memory types overlay would block.
Still todo:
@@ -34,7 +35,7 @@
-Rudolf Cornelissen.
-(Page last updated on January 28, 2016)
+Rudolf Cornelissen.
+(Page last updated on February 7, 2016)