completed AGP stuff; added force_pci setting in nv.settings

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8096 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2004-06-21 18:54:05 +00:00
parent c54d49c275
commit 921d8f5ffd
2 changed files with 13 additions and 12 deletions
@@ -38,8 +38,8 @@ static status_t init_common(int the_fd) {
goto error0;
}
// LOG is now available, si !NULL
LOG(4,("init_common: logmask 0x%08x, memory %dMB, hardcursor %d, usebios %d, switchhead %d\n",
si->settings.logmask, si->settings.memory, si->settings.hardcursor, si->settings.usebios, si->settings.switchhead));
LOG(4,("init_common: logmask 0x%08x, memory %dMB, hardcursor %d, usebios %d, switchhead %d, force_pci %d\n",
si->settings.logmask, si->settings.memory, si->settings.hardcursor, si->settings.usebios, si->settings.switchhead, si->settings.force_pci));
/*Check for R4.5.0 and if it is running, use work around*/
{
@@ -6,6 +6,7 @@
#define MODULE_BIT 0x00008000
#include <unistd.h>
#include "nv_std.h"
static status_t test_ram(void);
@@ -990,10 +991,6 @@ status_t nv_general_head_select(bool cross)
* Should work from VGA BIOS POST init state. */
static status_t nv_general_bios_to_powergraphics()
{
uint32 agp_ident, agp_stat, agp_cmd;
bool agp_1x, agp_2x, agp_4x, agp3_4x, agp3_8x;
uint8 agp_speed;
LOG(2, ("INIT: Skipping card coldstart!\n"));
/* let acc engine make power off/power on cycle to start 'fresh' */
@@ -1188,7 +1185,7 @@ static status_t nv_general_setup_agp(void)
{
LOG(4,("INIT: host bridge failed to respond correctly, aborting AGP setup!\n"));
/* close host bridge driver */
// close(agp_fd);
close(agp_fd);
/* program card for PCI access */
CFGW(AGPCMD, 0x00000000);
@@ -1201,13 +1198,13 @@ static status_t nv_general_setup_agp(void)
((ai_bridge.config.agp_cap_id & AGP_rev_minor) >> AGP_rev_minor_shift)));
nv_general_list_AGP_caps(ai_bridge);
//fixme: abort if specified by user in nv.settings!
if (0)
/* abort if specified by user in nv.settings */
if (si->settings.force_pci)
{
/* user specified not to use AGP */
LOG(4,("INIT: forcing PCI mode (specified in nv.settings).\n"));
/* close host bridge driver */
// close(agp_fd);
close(agp_fd);
/* program card for PCI access */
CFGW(AGPCMD, 0x00000000);
@@ -1220,7 +1217,7 @@ static status_t nv_general_setup_agp(void)
{
LOG(4,("INIT: compatibility problem detected, aborting AGP setup!\n"));
/* close host bridge driver */
// close(agp_fd);
close(agp_fd);
/* program card for PCI access */
CFGW(AGPCMD, 0x00000000);
@@ -1314,6 +1311,10 @@ static status_t nv_general_setup_agp(void)
}
/* set the enable AGP bits */
/* note:
* the AGP standard defines that this bit may be written to the AGPCMD
* registers simultanously with the other bits if a single 32bit write
* to each register is used. */
ai_card.config.agp_cmd |= AGP_enable;
ai_bridge.config.agp_cmd |= AGP_enable;
@@ -1326,7 +1327,7 @@ static status_t nv_general_setup_agp(void)
LOG(4,("INIT: graphics card AGPCMD register readback $%08x\n", CFGR(AGPCMD)));
/* close host bridge driver */
// close(agp_fd);
close(agp_fd);
}
else
{