controlfb.c bug in VRAM bank2 check if bank1
Lou Langholtz
ldl at chpc.utah.edu
Sat Sep 11 03:08:02 EST 1999
Someone requested a re-post of the diff I'm using to get 4MB VRAM suport
using the "-u" option to diff...
diff -u linux/drivers/video/controlfb.c.orig
linux/drivers/video/controlfb.c
--- linux/drivers/video/controlfb.c.orig Mon Aug 9 13:04:57 1999
+++ linux/drivers/video/controlfb.c Wed Sep 1 12:58:19 1999
@@ -711,18 +711,19 @@
asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0]) : "memory"
);
bank1 = (in_8(&p->frame_buffer[0]) == 0x5a) && (in_8(&p->frame_buffer[1])
== 0xc7);
- out_8(&p->frame_buffer[0x600000], 0xa5);
- out_8(&p->frame_buffer[0x600001], 0x38);
- asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x600000]) :
"memory" );
- bank2 = (in_8(&p->frame_buffer[0x600000]) == 0xa5)
- && (in_8(&p->frame_buffer[0x600001]) == 0x38);
-
+ out_8(&p->frame_buffer[0x200000], 0xa5);
+ out_8(&p->frame_buffer[0x200001], 0x38);
+ asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x200000]) :
"memory" );
+ bank2 = (in_8(&p->frame_buffer[0x200000]) == 0xa5)
+ && (in_8(&p->frame_buffer[0x200001]) == 0x38);
p->total_vram = (bank1 + bank2) * 0x200000;
+ printk(KERN_INFO "Total VRAM = %dMB\n", (int) (p->total_vram / 1024 /
1024));
/* If we don't have bank 1 installed, we hope we have bank 2 :-) */
p->control_use_bank2 = !bank1;
if (p->control_use_bank2) {
- p->frame_buffer += 0x600000;
- p->frame_buffer_phys += 0x600000;
+ p->frame_buffer += 0x200000;
+ p->frame_buffer_phys += 0x200000;
}
init_control(p);
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list