fixed acceleration engine crashes on at least G72 cards by powering up a new part of the engine. This fixes acc on Geforce 7300/7400/7500 cards, and closes tickets #927, #1535 and #3482. In order to test this you need to go back to Haiku R30277 at least since app_server nolonger uses acceleration. Acceleration code was synced to Xfree86 4.8.0. and no chances were found. Bumped version to 0.90, updated docs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2009-05-17 20:37:20 +00:00
parent 97970c5c26
commit fa0fea5f25
4 changed files with 15 additions and 13 deletions
@@ -1,6 +1,6 @@
/* NV Acceleration functions */ /* NV Acceleration functions */
/* Author: /* Author:
Rudolf Cornelissen 8/2003-5/2005. Rudolf Cornelissen 8/2003-5/2009.
This code was possible thanks to: This code was possible thanks to:
- the Linux XFree86 NV driver, - the Linux XFree86 NV driver,
@@ -85,9 +85,9 @@ status_t nv_acc_init()
uint16 cnt; uint16 cnt;
/* a hanging engine only recovers from a complete power-down/power-up cycle */ /* a hanging engine only recovers from a complete power-down/power-up cycle */
NV_REG32(NV32_PWRUPCTRL) = 0x13110011; NV_REG32(NV32_PWRUPCTRL) = 0xffff00ff;
snooze(1000); snooze(1000);
NV_REG32(NV32_PWRUPCTRL) = 0x13111111; NV_REG32(NV32_PWRUPCTRL) = 0xffffffff;
/* setup PTIMER: */ /* setup PTIMER: */
//fixme? how about NV28 setup as just after coldstarting? (see nv_info.c) //fixme? how about NV28 setup as just after coldstarting? (see nv_info.c)
@@ -1,7 +1,7 @@
/* NV Acceleration functions */ /* NV Acceleration functions */
/* Author: /* Author:
Rudolf Cornelissen 8/2003-9/2007. Rudolf Cornelissen 8/2003-5/2009.
This code was possible thanks to: This code was possible thanks to:
- the Linux XFree86 NV driver, - the Linux XFree86 NV driver,
@@ -80,9 +80,9 @@ status_t nv_acc_init_dma()
err = 0; err = 0;
/* a hanging engine only recovers from a complete power-down/power-up cycle */ /* a hanging engine only recovers from a complete power-down/power-up cycle */
NV_REG32(NV32_PWRUPCTRL) = 0x13110011; NV_REG32(NV32_PWRUPCTRL) = 0xffff00ff;
snooze(1000); snooze(1000);
NV_REG32(NV32_PWRUPCTRL) = 0x13111111; NV_REG32(NV32_PWRUPCTRL) = 0xffffffff;
/* don't try this on NV20 and later.. */ /* don't try this on NV20 and later.. */
/* note: /* note:
@@ -1,7 +1,7 @@
/* Authors: /* Authors:
Mark Watson 12/1999, Mark Watson 12/1999,
Apsed, Apsed,
Rudolf Cornelissen 10/2002-6/2008 Rudolf Cornelissen 10/2002-5/2009
tst.. tst..
*/ */
@@ -92,7 +92,7 @@ status_t nv_general_powerup()
{ {
status_t status; status_t status;
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.89 running.\n")); LOG(1,("POWERUP: Haiku nVidia Accelerant 0.90 running.\n"));
/* log VBLANK INT usability status */ /* log VBLANK INT usability status */
if (si->ps.int_assigned) if (si->ps.int_assigned)
@@ -1654,17 +1654,18 @@ status_t nv_general_head_select(bool cross)
static void unlock_card(void) static void unlock_card(void)
{ {
/* power-up all nvidia hardware function blocks */ /* make sure to power-up all nvidia hardware function blocks */
/* bit 28: OVERLAY ENGINE (BES), /* bit 28: OVERLAY ENGINE (BES),
* bit 25: CRTC2, (> NV04A) * bit 25: CRTC2, (> NV04A)
* bit 24: CRTC1, * bit 24: CRTC1,
* bit 20: framebuffer, * bit 20: framebuffer,
* bit 16: PPMI, * bit 16: PPMI,
* bit 13: some part of at least the G72 acceleration engine,
* bit 12: PGRAPH, * bit 12: PGRAPH,
* bit 8: PFIFO, * bit 8: PFIFO,
* bit 4: PMEDIA, * bit 4: PMEDIA,
* bit 0: TVOUT. (> NV04A) */ * bit 0: TVOUT. (> NV04A) */
NV_REG32(NV32_PWRUPCTRL) = 0x13111111; NV_REG32(NV32_PWRUPCTRL) = 0xffffffff;
/* select colormode CRTC registers base adresses */ /* select colormode CRTC registers base adresses */
NV_REG8(NV8_MISCW) = 0xcb; NV_REG8(NV8_MISCW) = 0xcb;
@@ -1689,9 +1690,9 @@ static void unlock_card(void)
static status_t nv_general_bios_to_powergraphics() static status_t nv_general_bios_to_powergraphics()
{ {
/* let acc engine make power off/power on cycle to start 'fresh' */ /* let acc engine make power off/power on cycle to start 'fresh' */
NV_REG32(NV32_PWRUPCTRL) = 0x13110011; NV_REG32(NV32_PWRUPCTRL) = 0xffff00ff;
snooze(1000); snooze(1000);
NV_REG32(NV32_PWRUPCTRL) = 0x13111111; NV_REG32(NV32_PWRUPCTRL) = 0xffffffff;
unlock_card(); unlock_card();
@@ -4,7 +4,7 @@
</head> </head>
<body> <body>
<p><h2>Changes done for each driverversion:</h2></p> <p><h2>Changes done for each driverversion:</h2></p>
<p><h1>head (SVN 0.89, Rudolf)</h1></p> <p><h1>head (SVN 0.90, Rudolf)</h1></p>
<ul> <ul>
<li>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. <li>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.
<li>Fixed shared_info struct problem occuring when 3D 'accelerant' is used (tested Alpha 4.1): the TVencoder type definition list apparantly gets some memory assigned these days when done inside the definition of shared_info. Moved encoder list outside the shared_info definition. <li>Fixed shared_info struct problem occuring when 3D 'accelerant' is used (tested Alpha 4.1): the TVencoder type definition list apparantly gets some memory assigned these days when done inside the definition of shared_info. Moved encoder list outside the shared_info definition.
@@ -20,6 +20,7 @@
<li>HDTV video upto/including 1920x1080p can now be played back using overlay on Geforce cards where overlay is supported. On TNT1/TNT2/TNT2-M64 this can't be done and bitmap output is used. <li>HDTV video upto/including 1920x1080p can now be played back using overlay on Geforce cards where overlay is supported. On TNT1/TNT2/TNT2-M64 this can't be done and bitmap output is used.
<li>Added partial DDC/EDID support: dumping monitor specs to logfile only for now. <li>Added partial DDC/EDID support: dumping monitor specs to logfile only for now.
<li>Added confirmed support for laptop card with ID 0x01d7: Quadro NVS 110M/GeForce 7300 Go. Also fixed support for laptop card with ID 0x01d8: GeForce 7400 Go: the 'laptop' definition was missing here. <li>Added confirmed support for laptop card with ID 0x01d7: Quadro NVS 110M/GeForce 7300 Go. Also fixed support for laptop card with ID 0x01d8: GeForce 7400 Go: the 'laptop' definition was missing here.
<li>Fixed acceleration engine crashes on at least G72 cards (Geforce 7300/7400/7500) by powering up new part(s) of the acceleration engines too..
</ul> </ul>
<p><h1>nv_driver 0.80 (Rudolf)</h1></p> <p><h1>nv_driver 0.80 (Rudolf)</h1></p>
<ul> <ul>