All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Lou Langholtz <ldl@chpc.utah.edu>
To: linuxppc-dev@lists.linuxppc.org
Subject: controlfb.c bug in VRAM bank2 check if bank1
Date: Fri, 10 Sep 1999 09:55:16 -0600	[thread overview]
Message-ID: <37D929E4.205A04B8@chpc.utah.edu> (raw)


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/

             reply	other threads:[~1999-09-10 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-10 15:55 Lou Langholtz [this message]
1999-09-10 17:08 ` controlfb.c bug in VRAM bank2 check if bank1 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37D929E4.205A04B8@chpc.utah.edu \
    --to=ldl@chpc.utah.edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.