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:
@@ -38,8 +38,8 @@ static status_t init_common(int the_fd) {
|
|||||||
goto error0;
|
goto error0;
|
||||||
}
|
}
|
||||||
// LOG is now available, si !NULL
|
// LOG is now available, si !NULL
|
||||||
LOG(4,("init_common: logmask 0x%08x, memory %dMB, hardcursor %d, usebios %d, switchhead %d\n",
|
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.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*/
|
/*Check for R4.5.0 and if it is running, use work around*/
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#define MODULE_BIT 0x00008000
|
#define MODULE_BIT 0x00008000
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include "nv_std.h"
|
#include "nv_std.h"
|
||||||
|
|
||||||
static status_t test_ram(void);
|
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. */
|
* Should work from VGA BIOS POST init state. */
|
||||||
static status_t nv_general_bios_to_powergraphics()
|
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"));
|
LOG(2, ("INIT: Skipping card coldstart!\n"));
|
||||||
|
|
||||||
/* let acc engine make power off/power on cycle to start 'fresh' */
|
/* 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"));
|
LOG(4,("INIT: host bridge failed to respond correctly, aborting AGP setup!\n"));
|
||||||
/* close host bridge driver */
|
/* close host bridge driver */
|
||||||
// close(agp_fd);
|
close(agp_fd);
|
||||||
/* program card for PCI access */
|
/* program card for PCI access */
|
||||||
CFGW(AGPCMD, 0x00000000);
|
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)));
|
((ai_bridge.config.agp_cap_id & AGP_rev_minor) >> AGP_rev_minor_shift)));
|
||||||
nv_general_list_AGP_caps(ai_bridge);
|
nv_general_list_AGP_caps(ai_bridge);
|
||||||
|
|
||||||
//fixme: abort if specified by user in nv.settings!
|
/* abort if specified by user in nv.settings */
|
||||||
if (0)
|
if (si->settings.force_pci)
|
||||||
{
|
{
|
||||||
/* user specified not to use AGP */
|
/* user specified not to use AGP */
|
||||||
LOG(4,("INIT: forcing PCI mode (specified in nv.settings).\n"));
|
LOG(4,("INIT: forcing PCI mode (specified in nv.settings).\n"));
|
||||||
/* close host bridge driver */
|
/* close host bridge driver */
|
||||||
// close(agp_fd);
|
close(agp_fd);
|
||||||
/* program card for PCI access */
|
/* program card for PCI access */
|
||||||
CFGW(AGPCMD, 0x00000000);
|
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"));
|
LOG(4,("INIT: compatibility problem detected, aborting AGP setup!\n"));
|
||||||
/* close host bridge driver */
|
/* close host bridge driver */
|
||||||
// close(agp_fd);
|
close(agp_fd);
|
||||||
/* program card for PCI access */
|
/* program card for PCI access */
|
||||||
CFGW(AGPCMD, 0x00000000);
|
CFGW(AGPCMD, 0x00000000);
|
||||||
|
|
||||||
@@ -1314,6 +1311,10 @@ static status_t nv_general_setup_agp(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set the enable AGP bits */
|
/* 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_card.config.agp_cmd |= AGP_enable;
|
||||||
ai_bridge.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)));
|
LOG(4,("INIT: graphics card AGPCMD register readback $%08x\n", CFGR(AGPCMD)));
|
||||||
|
|
||||||
/* close host bridge driver */
|
/* close host bridge driver */
|
||||||
// close(agp_fd);
|
close(agp_fd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user