Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 447 → Rev 448

/shark/trunk/drivers/grx/gd.c
62,31 → 62,11
struct pci_regs *r;
int dummy;
 
SYS_FLAGS f;
 
memset(&actualmode, 0, sizeof(struct gmode));
type = UNKNOWN;
 
if (pci_init() == 1) {
if ((r = pci_class((0x0300) << 8, 0, &bus, &dev)) != NULL) {
cprintf("PCI video card found!!!\n");
cprintf("Vendor: %x\n", r->VendorId);
cprintf("Card: %x\n", r->DeviceId);
/* flb = r->IoBaseAddress & 0xFF800000; */
 
dummy = pcibios_read_config_dword(bus, dev, 16, &flb);
flb = flb & 0xFF800000;
/* Err... Have to set type!!! */
 
cprintf("FLB @ %lx\n", flb);
if (flb < 32 * 1024 * 1024) {
/*flb = 32 * 0x1000000;*/
/*flb = 0xF3000000;*/
flb = 0x02000000;
cprintf("Wrong FLB!!! Forced to %lx\n", flb);
pcibios_write_config_dword(bus, dev, 16, flb);
}
}
}
/* VESA driver needs the V86 Mode... */
vm86_init();
 
101,6 → 81,26
return 1;
}
 
f = ll_fsave();
if (pci_init() == 1) {
if ((r = pci_class((0x0300) << 8, 0, &bus, &dev)) != NULL) {
cprintf("PCI video card found!!!\n");
cprintf("Vendor: %x\n", r->VendorId);
cprintf("Card: %x\n", r->DeviceId);
dummy = pcibios_read_config_dword(bus, dev, 16, &flb);
flb = flb & 0xFF800000;
cprintf("FLB @ %lx\n", flb);
if (flb < 32 * 1024 * 1024) {
flb = 0x02000000;
cprintf("Wrong FLB!!! Forced to %lx\n", flb);
pcibios_write_config_dword(bus, dev, 16, flb);
}
}
}
ll_frestore(f);
 
/* Then, the other graph cards... Override VESA!!! */
if (trident_test() == 1) {
type = TRIDENT;