From ca459671044d2587b2e2dcd4f48bc343e39d2ae6 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Thu, 2 Jun 2005 12:38:16 +0000 Subject: [PATCH] FIX FOR NV18cd obos_svn/trunk/src/add-ons/accelerants/nvidia/ We now have a new winner for 3D. Quake2 runs at 91.5fps in 640x480x16. I can hardly believe this.. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12925 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c b/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c index 6bda1569fd..d051d52097 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_acc_dma.c @@ -1,7 +1,7 @@ /* NV Acceleration functions */ /* Author: - Rudolf Cornelissen 8/2003-5/2005. + Rudolf Cornelissen 8/2003-6/2005. This code was possible thanks to: - the Linux XFree86 NV driver, @@ -74,7 +74,7 @@ status_t nv_acc_wait_idle_dma() * Engine required init. */ status_t nv_acc_init_dma() { - uint16 cnt; + uint32 cnt; uint32 surf_depth, cmd_depth; /* reset the engine DMA stalls counter */ err = 0; @@ -84,6 +84,12 @@ status_t nv_acc_init_dma() snooze(1000); NV_REG32(NV32_PWRUPCTRL) = 0x13111111; + /* actively reset the PGRAPH registerset (acceleration engine) */ + for (cnt = 0x00400000; cnt < 0x00402000; cnt +=4) + { + NV_REG32(cnt) = 0x00000000; + } + /* setup PTIMER: */ //fixme? how about NV28 setup as just after coldstarting? (see nv_info.c) /* set timer numerator to 8 (in b0-15) */