linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* controlfb.c bug in VRAM bank2 check if bank1
@ 1999-09-10 15:55 Lou Langholtz
  1999-09-10 17:08 ` Lou Langholtz
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Lou Langholtz @ 1999-09-10 15:55 UTC (permalink / raw)
  To: linuxppc-dev


I've posted before about this problem but to a different audience. As
I'm hoping to get this resolved (fixed) though in the main source tree
but don't have the chance to test this entirely myself I'm resending
here hoping someone else can test things out...

After getting an extra 2MB VRAM for my PowerMac7500 and seeing that only
2MB were still being recognized (despite having just added the 2MB to
total to 4MB VRAM), I dug into the controlfb.c code from 2.2.11 and
2.2.12 and made the following changes to get all 4MB VRAM recognized:

diff controlfb.c.orig controlfb.c
714,719c714,719
<  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);
>
720a721
>  printk(KERN_INFO "Total VRAM = %dMB\n", (int) (p->total_vram / 1024 /
1024));
724,725c725,726
<   p->frame_buffer += 0x600000;
<   p->frame_buffer_phys += 0x600000;
---
>   p->frame_buffer += 0x200000;
>   p->frame_buffer_phys += 0x200000;

What I've heard though is that bank2 is indeed found at 0x600000 at
least when bank1 is not there. That seems pretty strange to me but this
info was from a reputable source. If I had the time I'd just add some
code to check in 1MB increments to confirm this and try rebooting with
various VRAM cards in and figure out exactly where things are
recognized. Unfortunately I don't have the time and as the above changes
makes 4MB VRAM work now that's good enough for me. But it'd be a shame
if this didn't get fixed once and for all for everyone with the control
graphics card found on PowerMac 7500's (and perhaps some others too).

So hopefully someone else on this list has a spare 7500 to check this
out on and get the fix into the main tree.

Cheers ;-)


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
@ 1999-09-15 17:05 Kevin_Hendricks
  1999-09-15 18:26 ` Kevin Puetz
  0 siblings, 1 reply; 18+ messages in thread
From: Kevin_Hendricks @ 1999-09-15 17:05 UTC (permalink / raw)
  To: mlan, ldl; +Cc: linuxppc-dev


Hi,

Just to add fuel to the fire (although I am not sure if this is related or not)

My B+W G3 rev2 with 16MB of vram has never ever detected the correct amount.  In 
fact, if I run Xconfigurator, it tells me I have less then 1MB of vram and 
therefore won't let me use any of the higher resolutions that should work.

The interesting thing is that if I change my bpp via the MacOS, Xconfigurator 
reports completely different amounts of vram available and not in any logical 
way that I can see.

Any fixes along these lines would be greatly appreciated (this is with Paul's 
2.2.10 stable kernel available from his website).

Just thought someone in the know should be told :-)

Kevin



>> Hmm... official 2.2.12 does detect my 4 MB... and this is a 7600, so the same
>> motherboard as the 7500...
>>
>> Michel . . .
>
>Odd. I thought I tried stock 2.2.12 and it didn't detect the 4MB VRAM in my
>PowerMac 7500. Now I'm not so sure. A quick diff of the kernel controlfb.c 
sources
>between 2.2.6 and 2.2.12 reveal no difference though in the VRAM bank check 
code
>though so it also seems to me that if people had this problem in 2.2.6 then 
2.2.12
>should also be unable to detect the full 4MB VRAM. If you're saying that the
>hardware should be identical then could some other software be responsible such 
as
>the OF software be perhaps different and causing this different behavior? I'd
>really like some confirmation now that others with 7500 don't get all
>4MB VRAM detected even using stock 2.2.12. I've read postings from others that
>they didn't get 4MB VRAM detected but I don't think that was with 2.2.12 at 
that
>time.
>

--
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario  N6A-3K7  CANADA   
khendricks@ivey.uwo.ca, (519) 661-3874, fax: 519-661-3959


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~1999-10-13  6:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-10 15:55 controlfb.c bug in VRAM bank2 check if bank1 Lou Langholtz
1999-09-10 17:08 ` Lou Langholtz
1999-09-10 18:33 ` Michel Lanners
1999-09-12 16:58   ` Lou Langholtz
1999-09-13 18:13     ` Michel Lanners
1999-09-15 15:14       ` Lou Langholtz
1999-10-12  7:07       ` Lou Langholtz
1999-10-12  7:23         ` Bizarre g++ problem Patrik Jonsson
1999-10-12  6:49   ` controlfb.c bug in VRAM bank2 check if bank1 Lou Langholtz
1999-10-12 14:50     ` Daniel Jacobowitz
1999-10-12 15:36       ` Lou Langholtz
1999-10-13  6:30         ` Geert Uytterhoeven
1999-09-11 10:51 ` Brad Boyer
1999-09-10 20:13   ` Daniel Jacobowitz
1999-09-11  9:23     ` Benjamin Herrenschmidt
1999-09-12 18:10       ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
1999-09-15 17:05 Kevin_Hendricks
1999-09-15 18:26 ` Kevin Puetz

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).