* 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; 17+ 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] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-15 17:05 controlfb.c bug in VRAM bank2 check if bank1 Kevin_Hendricks
@ 1999-09-15 18:26 ` Kevin Puetz
0 siblings, 0 replies; 17+ messages in thread
From: Kevin Puetz @ 1999-09-15 18:26 UTC (permalink / raw)
To: Kevin_Hendricks; +Cc: mlan, ldl, linuxppc-dev
khendricks@admin.ivey.uwo.ca said:
> 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.
If you use 'no video driver' Linux will see the amount of VRAM that was
actually in use by MacOS when booting. You should probably look into a newer
kernel with aty128fb
> Any fixes along these lines would be greatly appreciated (this is with
> Paul's 2.2.10 stable kernel available from his website).
Which is probably just old enough not to have the correct driver.
> Just thought someone in the know should be told :-)
> Kevin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* 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; 17+ 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] 17+ messages in thread* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 15:55 Lou Langholtz
@ 1999-09-10 17:08 ` Lou Langholtz
1999-09-10 18:33 ` Michel Lanners
1999-09-11 10:51 ` Brad Boyer
2 siblings, 0 replies; 17+ messages in thread
From: Lou Langholtz @ 1999-09-10 17:08 UTC (permalink / raw)
To: linuxppc-dev
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/
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 15:55 Lou Langholtz
1999-09-10 17:08 ` Lou Langholtz
@ 1999-09-10 18:33 ` Michel Lanners
1999-09-12 16:58 ` Lou Langholtz
1999-10-12 6:49 ` Lou Langholtz
1999-09-11 10:51 ` Brad Boyer
2 siblings, 2 replies; 17+ messages in thread
From: Michel Lanners @ 1999-09-10 18:33 UTC (permalink / raw)
To: ldl; +Cc: linuxppc-dev
On 10 Sep, this message from Lou Langholtz echoed through cyberspace:
> 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:
> < out_8(&p->frame_buffer[0x600000], 0xa5);
> < out_8(&p->frame_buffer[0x600001], 0x38);
> ---
>> out_8(&p->frame_buffer[0x200000], 0xa5);
>> out_8(&p->frame_buffer[0x200001], 0x38);
Hmm, if I remember right, there have been half a dozen patch pairs that
changed 0x600000 to 0x200000 and back over the years ;-)
I guess it's time to clear thgis up once and for all. By the way, I do
have 4 MB of VRAM, and all of it is detected with the current version
of controlfb.....
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. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 18:33 ` Michel Lanners
@ 1999-09-12 16:58 ` Lou Langholtz
1999-09-13 18:13 ` Michel Lanners
1999-10-12 6:49 ` Lou Langholtz
1 sibling, 1 reply; 17+ messages in thread
From: Lou Langholtz @ 1999-09-12 16:58 UTC (permalink / raw)
To: mlan; +Cc: linuxppc-dev
Michel Lanners wrote:
> On 10 Sep, this message from Lou Langholtz echoed through cyberspace:
> > 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:
>
> > < out_8(&p->frame_buffer[0x600000], 0xa5);
> > < out_8(&p->frame_buffer[0x600001], 0x38);
> > ---
> >> out_8(&p->frame_buffer[0x200000], 0xa5);
> >> out_8(&p->frame_buffer[0x200001], 0x38);
>
> Hmm, if I remember right, there have been half a dozen patch pairs that
> changed 0x600000 to 0x200000 and back over the years ;-)
>
> I guess it's time to clear thgis up once and for all. By the way, I do
> have 4 MB of VRAM, and all of it is detected with the current version
> of controlfb.....
If I had a spare PowerMac 7500 I'd love to test every combo and see what gets
detected where. Unfortunately I don't, but hope someone else can do this
instead and get conclusive info that we need. It concerns me too that people
with 8500's (that seem to have the same graphics card) seem to observe
different behavior in detection.
What version of controlfb are you using? Current from the 2.2 kernel tree,
2.3 kernel tree, or 2.2 or 2.3 from vger, or even somewhere else. 2.2.12
wouldn't detect all 4MB VRAM in my 7500 box. I'm sorry but I haven't kept up
very well with all the different distributions of source. Let me know which
release then you use and I'll eagerely check it out ;-)
> Michel . . .
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
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
0 siblings, 2 replies; 17+ messages in thread
From: Michel Lanners @ 1999-09-13 18:13 UTC (permalink / raw)
To: ldl; +Cc: linuxppc-dev
On 12 Sep, this message from Lou Langholtz echoed through cyberspace:
> If I had a spare PowerMac 7500 I'd love to test every combo and see what gets
> detected where. Unfortunately I don't, but hope someone else can do this
> instead and get conclusive info that we need. It concerns me too that people
> with 8500's (that seem to have the same graphics card) seem to observe
> different behavior in detection.
Yeah; might prove interesting to compare the results on a 7500 with
those on a 8500...
> What version of controlfb are you using? Current from the 2.2 kernel tree,
> 2.3 kernel tree, or 2.2 or 2.3 from vger, or even somewhere else. 2.2.12
> wouldn't detect all 4MB VRAM in my 7500 box. I'm sorry but I haven't kept up
> very well with all the different distributions of source. Let me know which
> release then you use and I'll eagerely check it out ;-)
Hmm... official 2.2.12 does detect my 4 MB... and this is a 7600, so
the same motherboard as the 7500...
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. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-13 18:13 ` Michel Lanners
@ 1999-09-15 15:14 ` Lou Langholtz
1999-10-12 7:07 ` Lou Langholtz
1 sibling, 0 replies; 17+ messages in thread
From: Lou Langholtz @ 1999-09-15 15:14 UTC (permalink / raw)
To: mlan; +Cc: linuxppc-dev
Michel Lanners wrote:
> 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.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-13 18:13 ` Michel Lanners
1999-09-15 15:14 ` Lou Langholtz
@ 1999-10-12 7:07 ` Lou Langholtz
1 sibling, 0 replies; 17+ messages in thread
From: Lou Langholtz @ 1999-10-12 7:07 UTC (permalink / raw)
To: mlan; +Cc: linuxppc-dev
Michel Lanners wrote:
> Hmm... official 2.2.12 does detect my 4 MB... and this is a 7600, so the same
> motherboard as the 7500...
> Michel
Something is wrong then. Using AC's 2.2.13pre15 on my 7500 the driver just doesn't
recognize 4MB of VRAM unless I hack the bank2 check. So either you're not really
getting all 4MB VRAM detected or the 7600 uses a different hardware configuration
than my 7500/100. What does "fbset -i" tell you for size of the frame buffer
device? That the 8500 operates as Andrew Fyfe <bandr@best.com> claimed according
to the comments in one of the patches that someone sent out make sense. The
relevant part of that patch reads:
+ /* According to Andrew Fyfe <bandr@best.com>, the VRAM behaves like so: */
+ /* afyfe: observations from an 8500:
+ * - with 2M vram in bank 1, it appears at offsets 0, 2M and 4M
+ * - with 2M vram in bank 2, it appears only at offset 6M
+ * - with 4M vram, it appears only as a 4M block at offset 0.
+ */
What you're seeing with your 7600 then just doesn't make sense unless it's video
hardware is somehow different than the 7500/100 that I have. The 7500/100 that
I have has only four slots where each slot holds a 1MB VRAM memory module. Is that
the same on the 7600? If the 7600 really has the control video card and yours
really has 4MB VRAM then according to sources the memory must be detectable at
both offset 0, and 6M where the second VRAM bank can actually also handle itself
in a contiguous 4MB block from offset 0. That seems very odd indeed.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 18:33 ` Michel Lanners
1999-09-12 16:58 ` Lou Langholtz
@ 1999-10-12 6:49 ` Lou Langholtz
1999-10-12 14:50 ` Daniel Jacobowitz
1 sibling, 1 reply; 17+ messages in thread
From: Lou Langholtz @ 1999-10-12 6:49 UTC (permalink / raw)
To: linuxppc-dev
Michel Lanners wrote:
> On 10 Sep, this message from Lou Langholtz echoed through cyberspace:
> > 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:
> . . .
>
> I guess it's time to clear thgis up once and for all. By the way, I do
> have 4 MB of VRAM, and all of it is detected with the current version
> of controlfb.....
Update:
Even with 2.2.13pre15, the stock controlfb.c still doesn't detect the
4MB VRAM in my 7500 (I just tried it). I have to hack controlfb.c to get it
to use all 4MB. This is perhaps a bug specific only to the PowerMac 7500/100
as others have reported that all VRAM was detected on their PowerMac's
without making any changes like I've had to do.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-10-12 6:49 ` Lou Langholtz
@ 1999-10-12 14:50 ` Daniel Jacobowitz
1999-10-12 15:36 ` Lou Langholtz
0 siblings, 1 reply; 17+ messages in thread
From: Daniel Jacobowitz @ 1999-10-12 14:50 UTC (permalink / raw)
To: Lou Langholtz; +Cc: linuxppc-dev
Could you check whether that kernel has the patch I posted to this list
last month applied?
The patch was in Message-ID: <19990912141014.A17732@them.org>.
On Tue, Oct 12, 1999 at 12:49:34AM -0600, Lou Langholtz wrote:
>
> Michel Lanners wrote:
>
> > On 10 Sep, this message from Lou Langholtz echoed through cyberspace:
> > > 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:
> > . . .
> >
> > I guess it's time to clear thgis up once and for all. By the way, I do
> > have 4 MB of VRAM, and all of it is detected with the current version
> > of controlfb.....
>
> Update:
>
> Even with 2.2.13pre15, the stock controlfb.c still doesn't detect the
> 4MB VRAM in my 7500 (I just tried it). I have to hack controlfb.c to get it
> to use all 4MB. This is perhaps a bug specific only to the PowerMac 7500/100
> as others have reported that all VRAM was detected on their PowerMac's
> without making any changes like I've had to do.
>
>
>
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-10-12 14:50 ` Daniel Jacobowitz
@ 1999-10-12 15:36 ` Lou Langholtz
1999-10-13 6:30 ` Geert Uytterhoeven
0 siblings, 1 reply; 17+ messages in thread
From: Lou Langholtz @ 1999-10-12 15:36 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: linuxppc-dev
Daniel Jacobowitz wrote:
> Could you check whether that kernel has the patch I posted to this list
> last month applied?
As you suspect, 2.2.13pre15 does not have your patch. AC's 2.2.13pre15 doesn't
have any changes at all to it's controlfb.c code. It's still the same as even in
the kernel distro of 2.2.6 (which is the earliest kernel I still have a copy of
source for on hand). Given a number of different behavioral characteristics
people have been describing of kernel's from vger I'd say there's been other
changes as well that still haven't made it into the Linus or AC distributed
kernel sources either unfortunately. I'm not in the privvy as far as I know
however to push these changes into the main stream kernel sources but if you or
someone else on this lilst is I say: "please, please get the in!". ;-) I guess in
the meantime I'm going to have to try sucking down the sources from vger but
given that I've been badly afflicted by the PPP/TCP death march that I and others
have been discussing I'm unsure I'll succeed at getting the whole thing from
vger.
> The patch was in Message-ID: <19990912141014.A17732@them.org>.
> On Tue, Oct 12, 1999 at 12:49:34AM -0600, Lou Langholtz wrote:
> > Michel Lanners wrote:
> > > On 10 Sep, this message from Lou Langholtz echoed through cyberspace:
> > > > 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:
> > > . . .
> > Even with 2.2.13pre15, the stock controlfb.c still doesn't detect the
> > 4MB VRAM in my 7500 (I just tried it). . . .
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-10-12 15:36 ` Lou Langholtz
@ 1999-10-13 6:30 ` Geert Uytterhoeven
0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 1999-10-13 6:30 UTC (permalink / raw)
To: Lou Langholtz; +Cc: Daniel Jacobowitz, linuxppc-dev
On Tue, 12 Oct 1999, Lou Langholtz wrote:
> Daniel Jacobowitz wrote:
>
> > Could you check whether that kernel has the patch I posted to this list
> > last month applied?
>
> As you suspect, 2.2.13pre15 does not have your patch. AC's 2.2.13pre15 doesn't
> have any changes at all to it's controlfb.c code. It's still the same as even in
> the kernel distro of 2.2.6 (which is the earliest kernel I still have a copy of
> source for on hand). Given a number of different behavioral characteristics
> people have been describing of kernel's from vger I'd say there's been other
> changes as well that still haven't made it into the Linus or AC distributed
> kernel sources either unfortunately. I'm not in the privvy as far as I know
> however to push these changes into the main stream kernel sources but if you or
> someone else on this lilst is I say: "please, please get the in!". ;-) I guess in
> the meantime I'm going to have to try sucking down the sources from vger but
> given that I've been badly afflicted by the PPP/TCP death march that I and others
> have been discussing I'm unsure I'll succeed at getting the whole thing from
> vger.
Linus accepted all video patches I sent him for 2.3.20.
Note that I assume no responsabilities for the video stuff in 2.2.x. I barely
have time to take care of 2.3.x.
That's the problem with anything besides ia32: we hardly have enough manpower
to work on 2.3.x, so who's taking care of 2.2.x?
Greetings,
Geert
--
Geert Uytterhoeven ----------------- Sony Suprastructure Center Europe (SUPC-E)
Geert.Uytterhoeven@sonycom.com ------------------- Sint Stevens Woluwestraat 55
Phone +32-2-7248632 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 15:55 Lou Langholtz
1999-09-10 17:08 ` Lou Langholtz
1999-09-10 18:33 ` Michel Lanners
@ 1999-09-11 10:51 ` Brad Boyer
1999-09-10 20:13 ` Daniel Jacobowitz
2 siblings, 1 reply; 17+ messages in thread
From: Brad Boyer @ 1999-09-11 10:51 UTC (permalink / raw)
To: Lou Langholtz; +Cc: linuxppc-dev
Lou Langholtz wrote:
> 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:
Just remember when making changes like this that the old code works fine
for some people. I've had 4M in my 7600 for a long time, and never once
had a problem with Linux saying I only had 2M. I don't often have the
time to do kernel hacking, but I'll try to get a kernel with this patch
up and running on my computer to see if it breaks things. I suspect it
will, since it seems that the old way of detecting is removed.
Hopefully I can get back to you on this in a few days.
Brad Boyer
flar@pants.nu
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-11 10:51 ` Brad Boyer
@ 1999-09-10 20:13 ` Daniel Jacobowitz
1999-09-11 9:23 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 17+ messages in thread
From: Daniel Jacobowitz @ 1999-09-10 20:13 UTC (permalink / raw)
To: linuxppc-dev
On Sat, Sep 11, 1999 at 03:51:25AM -0700, Brad Boyer wrote:
>
> Lou Langholtz wrote:
> > 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:
>
> Just remember when making changes like this that the old code works fine
> for some people. I've had 4M in my 7600 for a long time, and never once
> had a problem with Linux saying I only had 2M. I don't often have the
> time to do kernel hacking, but I'll try to get a kernel with this patch
> up and running on my computer to see if it breaks things. I suspect it
> will, since it seems that the old way of detecting is removed.
>
> Hopefully I can get back to you on this in a few days.
I have a bunch of information on this lying around, and most of my
other kernel problems seem to be resolved now. I'm in the process of
upgrading to current vger; if it succeeds, I'll try to merge all
pending controlfb stuff tomorrow.
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-10 20:13 ` Daniel Jacobowitz
@ 1999-09-11 9:23 ` Benjamin Herrenschmidt
1999-09-12 18:10 ` Daniel Jacobowitz
0 siblings, 1 reply; 17+ messages in thread
From: Benjamin Herrenschmidt @ 1999-09-11 9:23 UTC (permalink / raw)
To: Daniel Jacobowitz, linuxppc-dev
>I have a bunch of information on this lying around, and most of my
>other kernel problems seem to be resolved now. I'm in the process of
>upgrading to current vger; if it succeeds, I'll try to merge all
>pending controlfb stuff tomorrow.
I also have a pair of crazy 8500 who have 2Mb of VRAM but in bank2 (they
don't work if the VRAM is moved to bank1, even under MacOS). The current
controlfb appears to work well. Send me your merge results, I'll test on
one of those weird machines Monday.
--
E-Mail: <mailto:bh40@calva.net>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: controlfb.c bug in VRAM bank2 check if bank1
1999-09-11 9:23 ` Benjamin Herrenschmidt
@ 1999-09-12 18:10 ` Daniel Jacobowitz
0 siblings, 0 replies; 17+ messages in thread
From: Daniel Jacobowitz @ 1999-09-12 18:10 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Geert Uytterhoeven; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
OK, this patch should d the trick.
On Sat, Sep 11, 1999 at 11:23:23AM +0200, Benjamin Herrenschmidt wrote:
> >I have a bunch of information on this lying around, and most of my
> >other kernel problems seem to be resolved now. I'm in the process of
> >upgrading to current vger; if it succeeds, I'll try to merge all
> >pending controlfb stuff tomorrow.
>
> I also have a pair of crazy 8500 who have 2Mb of VRAM but in bank2 (they
> don't work if the VRAM is moved to bank1, even under MacOS). The current
> controlfb appears to work well. Send me your merge results, I'll test on
> one of those weird machines Monday.
>
>
> --
> E-Mail: <mailto:bh40@calva.net>
> BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
>
>
>
>
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
[-- Attachment #2: control.diff --]
[-- Type: text/plain, Size: 2778 bytes --]
Index: controlfb.c
===================================================================
RCS file: /cvs/linux/linux/drivers/video/controlfb.c,v
retrieving revision 1.20
diff -u -r1.20 controlfb.c
--- controlfb.c 1999/09/10 07:04:03 1.20
+++ controlfb.c 1999/09/12 18:03:57
@@ -702,26 +702,48 @@
p->cmap_regs = ioremap(p->cmap_regs_phys, 0x1000);
/* Work out which banks of VRAM we have installed. */
- /* danj: I guess the card just ignores writes to nonexistant VRAM... */
+ /* According to Andrew Fyfe <bandr@best.com>, the VRAM behaves like so: */
+ /* afyfe: observations from an 8500:
+ * - with 2M vram in bank 1, it appears at offsets 0, 2M and 4M
+ * - with 2M vram in bank 2, it appears only at offset 6M
+ * - with 4M vram, it appears only as a 4M block at offset 0.
+ */
+
+ /* 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);
+ 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[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);
-
- p->total_vram = (bank1 + bank2) * 0x200000;
- /* If we don't have bank 1 installed, we hope we have bank 2 :-) */
- p->control_use_bank2 = !bank1;
- if (p->control_use_bank2) {
+ 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);
+
+ if(bank2 && !bank1)
+ printk(KERN_INFO "controlfb: Found memory at 2MB but not at 0! Please contact dan@debian.org\n");
+
+ if(!bank1) {
+ 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);
+ /* If we don't have bank 1 installed, we hope we have bank 2 :-) */
+ p->control_use_bank2 = 1;
p->frame_buffer += 0x600000;
p->frame_buffer_phys += 0x600000;
}
+ p->total_vram = (bank1 + bank2) * 0x200000;
+
+ printk(KERN_INFO "controlfb: Memory bank 1 %s, bank 2 %s, total VRAM %dMB\n",
+ bank1 ? "present" : "absent", bank2 ? "present" : "absent",
+ 2 * (bank1 + bank2));
+
init_control(p);
}
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~1999-10-13 6:30 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-15 17:05 controlfb.c bug in VRAM bank2 check if bank1 Kevin_Hendricks
1999-09-15 18:26 ` Kevin Puetz
-- strict thread matches above, loose matches on Subject: below --
1999-09-10 15:55 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 6:49 ` 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
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).