From c9ae7f9cc904e8d692853e3dcabf7ab6fe9e3a01 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Fri, 22 Oct 2004 20:50:30 +0000 Subject: [PATCH] finally! NV28 up and running as secondary card over here: added some framebuffer access registerprogramming apparantly needed. Now all cards work as secondary card over here :-) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9449 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/nvidia/engine/nv_info.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c index 755e444ab4..2dd0887efe 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_info.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c @@ -296,9 +296,19 @@ static status_t coldstart_card_516_up(uint8* rom, PinsTables tabs, uint16 ram_ta { status_t result = B_OK; uint16 adress; + uint32 fb_mrs1 = 0; + uint32 fb_mrs2 = 0; LOG(8,("INFO: now executing coldstart...\n")); + /* get some strapinfo(?) for NV28 framebuffer access */ + //fixme?: works on at least one NV28... how about other cards? + if (si->ps.card_type == NV28) + { + fb_mrs2 = NV_REG32(NV32_FB_MRS2); + fb_mrs1 = NV_REG32(NV32_FB_MRS1); + } + /* select colormode CRTC registers base adresses */ NV_REG8(NV8_MISCW) = 0xcb; @@ -358,6 +368,14 @@ static status_t coldstart_card_516_up(uint8* rom, PinsTables tabs, uint16 ram_ta adress = *((uint16*)(&(rom[index]))); } + /* get NV28 RAM access up and running */ + //fixme?: works on at least one NV28... how about other cards? + if (si->ps.card_type == NV28) + { + NV_REG32(NV32_FB_MRS2) = fb_mrs2; + NV_REG32(NV32_FB_MRS1) = fb_mrs1; + } + /* now enable ROM shadow or the card will remain shut-off! */ CFGW(ROMSHADOW, (CFGR(ROMSHADOW) |= 0x00000001)); @@ -1421,6 +1439,9 @@ static status_t exec_type2_script_mode(uint8* rom, uint16* adress, int16* size, *exec = true; break; case 0x74: /* identical to type1 */ + //fixme? on at least NV28 this cmd hammers the CRTC PCI-timeout register + //'data' number of times instead of snoozing. + //Couldn't see any diff in behaviour though! *size -= 3; if (*size < 0) {