]>
Commit | Line | Data |
---|---|---|
3d715510 JB |
1 | --- XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cirrus/cir_driver.c.5480mem Sat Jan 8 13:26:49 2000 |
2 | +++ XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cirrus/cir_driver.c Mon Feb 21 21:53:18 2000 | |
3 | @@ -1553,17 +1553,18 @@ | |
4 | /* Use the DRAM bandwidth bit and the DRAM bank switching */ | |
5 | /* bit to figure out the amount of memory. */ | |
6 | unsigned char SRF; | |
7 | + unsigned char SR17; | |
8 | + | |
9 | vga256InfoRec.videoRam = 512; | |
10 | outb(0x3c4, 0x0f); | |
11 | SRF = inb(0x3c5); | |
12 | + outb(0x3c4, 0x17); | |
13 | + SR17 = inb(0x3c5); | |
14 | if (cirrusChip == CLGD5446) { | |
15 | /* | |
16 | * The CL-GD5446 has many different DRAM | |
17 | * configurations. | |
18 | */ | |
19 | - unsigned char SR17; | |
20 | - outb(0x3c4, 0x17); | |
21 | - SR17 = inb(0x3c5); | |
22 | vga256InfoRec.videoRam = 1024; | |
23 | if ((SRF & 0x18) == 0x18) { | |
24 | /* 64-bit DRAM bus. */ | |
25 | @@ -1617,6 +1618,13 @@ | |
26 | /* must be twice as much memory installed. */ | |
27 | /* (4MB on the 5434) */ | |
28 | vga256InfoRec.videoRam *= 2; | |
29 | + if (cirrusChip == CLGD5480 && (SR17 & 0x80)) | |
30 | + /* 5480's with one 2MB chip show up as 1MB | |
31 | + because they have a 32-bit DRAM bus, but | |
32 | + this seems to fix it. This is experimental | |
33 | + black magic; if it breaks anything for | |
34 | + you, please help find a better trigger... */ | |
35 | + vga256InfoRec.videoRam *= 2; | |
36 | } | |
37 | } | |
38 | else |