linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* controlfb: please test!
@ 2000-03-18  9:03 Michel Lanners
  2000-03-18 19:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Lanners @ 2000-03-18  9:03 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: TEXT/plain, Size: 1302 bytes --]

Hi list,

You may remeber my problems (and the many other problems reported over
the years ;-) with controlfb's detection of the amount of VRAM
installed.

Well, it seems control has some bugs, which makes detection less easy,
and until now, only one of two possible schemes for the memory layout
was correctly detected.

Well, I think it's time to clean this mess up, so I want _all_
developers with any machine that has the control hardware
(PowerMacs 7300, 7500, 7600, 8500, 8600, clones?) to try the following
patch on a 2.3 kernel, and report the results to me.

Mine look like this, with 2 MB in bank2:
....
control: mem at 0x000000: no
control: mem at 0x200000: no
control: mem at 0x400000: no
control: mem at 0x600000: yes
controlfb: Memory bank 1 absent, bank 2 present, total VRAM 2MB
....

Please include yur VRAM configuration, and if you have the time, please
try all possible combinations (2MB in either bank1 or bank2, and 4MB).

Thanks

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "

[-- Attachment #2: memtest.patch --]
[-- Type: TEXT/plain, Size: 1825 bytes --]

--- linux-2.3.paul/drivers/video/controlfb.c	Fri Feb 11 00:20:08 2000
+++ linux-2.3.paul-work/drivers/video/controlfb.c	Sat Mar 18 09:48:38 2000
@@ -715,6 +715,39 @@
 	 * - with 4M vram, it appears only as a 4M block at offset 0.
 	 */

+	/* Let's do the mem test... */
+	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" );
+
+	out_8(&p->frame_buffer[0], 0x5a);
+	out_8(&p->frame_buffer[1], 0xc7);
+	asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0]) : "memory" );
+
+	bank1 =  (in_8(&p->frame_buffer[0x000000]) == 0x5a)
+		&& (in_8(&p->frame_buffer[0x000001]) == 0xc7);
+	bank2 =  (in_8(&p->frame_buffer[0x200000]) == 0xa5)
+		&& (in_8(&p->frame_buffer[0x200001]) == 0x38);
+
+	printk(KERN_INFO "control: mem at 0x000000: %s\n", bank1 ? "yes" : "no");
+	printk(KERN_INFO "control: mem at 0x200000: %s\n", bank2 ? "yes" : "no");
+
+	out_8(&p->frame_buffer[0x400000], 0xc1);
+	out_8(&p->frame_buffer[0x400001], 0x02);
+	asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x400000]) : "memory" );
+
+	out_8(&p->frame_buffer[0x600000], 0xb3);
+	out_8(&p->frame_buffer[0x600001], 0x71);
+	asm volatile("eieio; dcbi 0,%0" : : "r" (&p->frame_buffer[0x600000]) : "memory" );
+
+	bank1 =  (in_8(&p->frame_buffer[0x400000]) == 0xc1)
+		&& (in_8(&p->frame_buffer[0x400001]) == 0x02);
+	bank2 =  (in_8(&p->frame_buffer[0x600000]) == 0xb3)
+		&& (in_8(&p->frame_buffer[0x600001]) == 0x71);
+
+	printk(KERN_INFO "control: mem at 0x400000: %s\n", bank1 ? "yes" : "no");
+	printk(KERN_INFO "control: mem at 0x600000: %s\n", bank2 ? "yes" : "no");
+
 	/* We know there is something at 2M if there is something at 0M. */
 	out_8(&p->frame_buffer[0x200000], 0xa5);
 	out_8(&p->frame_buffer[0x200001], 0x38);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-03-19 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-18  9:03 controlfb: please test! Michel Lanners
2000-03-18 19:32 ` Daniel Jacobowitz
2000-03-19  8:30   ` Michel Lanners
2000-03-19  8:46     ` Daniel Jacobowitz
2000-03-19 11:41       ` Michel Lanners
2000-03-19 18:24         ` Michel Lanners
2000-03-19 21:53           ` Michael R. Zucca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).