From b88fe980efe7d55c0030df57e7e88fcf8dfa546d Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Thu, 14 Oct 2004 15:06:06 +0000 Subject: [PATCH] updated AGP shutoff to be temporary during coldstarts: finally NV28 cooperates IF card is primary, fake_agp driver is installed and FW is enabled!! Apparantly something messes up PCI/AGP comms that does not get restored within the normal coldstart operating procedure. PCI mode is NOT operational when coldstarting(!) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9352 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/engine/nv_info.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/add-ons/accelerants/nvidia/engine/nv_info.c b/src/add-ons/accelerants/nvidia/engine/nv_info.c index a5f8254982..7eea116789 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_info.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_info.c @@ -225,6 +225,7 @@ static status_t coldstart_card(uint8* rom, uint16 init1, uint16 init2, uint16 in { status_t result = B_OK; int16 size = init_size; + uint32 agp_mode; LOG(8,("INFO: now executing coldstart...\n")); @@ -266,6 +267,7 @@ static status_t coldstart_card(uint8* rom, uint16 init1, uint16 init2, uint16 in /* note: * this _must_ be done _after_ the screens where shut-off as no * (memory) transactions may be in progress during this command. */ + agp_mode = CFGR(AGPCMD); CFGW(AGPCMD, 0x00000000); /* execute BIOS coldstart script(s) */ @@ -276,6 +278,9 @@ static status_t coldstart_card(uint8* rom, uint16 init1, uint16 init2, uint16 in if (init2 && (result == B_OK)) if (exec_type1_script(rom, init2, &size, ram_tab) != B_OK) result = B_ERROR; + /* reset bus mode to wat it was before */ + CFGW(AGPCMD, agp_mode); + /* now enable ROM shadow or the card will remain shut-off! */ CFGW(ROMSHADOW, (CFGR(ROMSHADOW) |= 0x00000001)); @@ -299,6 +304,7 @@ static status_t coldstart_card_516_up(uint8* rom, PinsTables tabs, uint16 ram_ta { status_t result = B_OK; uint16 adress; + uint32 agp_mode; LOG(8,("INFO: now executing coldstart...\n")); @@ -348,6 +354,7 @@ static status_t coldstart_card_516_up(uint8* rom, PinsTables tabs, uint16 ram_ta /* note: * this _must_ be done _after_ the screens where shut-off as no * (memory) transactions may be in progress during this command. */ + agp_mode = CFGR(AGPCMD); CFGW(AGPCMD, 0x00000000); /* execute all BIOS coldstart script(s) */ @@ -372,6 +379,9 @@ static status_t coldstart_card_516_up(uint8* rom, PinsTables tabs, uint16 ram_ta adress = *((uint16*)(&(rom[index]))); } + /* reset bus mode to wat it was before */ + CFGW(AGPCMD, agp_mode); + /* now enable ROM shadow or the card will remain shut-off! */ CFGW(ROMSHADOW, (CFGR(ROMSHADOW) |= 0x00000001));