From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
linux-fbdev@vger.kernel.org, linux-m68k@vger.kernel.org,
"Christian T. Steigies" <cts@debian.org>
Cc: linux-kernel@vger.kernel.org,
"Ingo Jürgensmann" <ij@2011.bluespice.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>
Subject: [PATCH 4/4] fbdev/cirrusfb: Add support for "64 MiB" version of Picasso IV
Date: Thu, 20 Oct 2011 11:42:25 +0000 [thread overview]
Message-ID: <1319110945-25684-4-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1319110945-25684-1-git-send-email-geert@linux-m68k.org>
Some Village Tronic Picasso IV graphics cards identify as a 64 MiB Zorro
device in Zorro III mode.
While the total graphics memory size is the same on such cards, the offset
of the graphics memory differs. Add a quirk to handle this.
Based on src/sys/arch/amiga/dev/grf_cl.c from NetBSD.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
--
Untested, due to lack of hardware
---
drivers/video/cirrusfb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 816433f..6ea505c 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -314,7 +314,7 @@ static const struct zorrocl zcl_picasso4_z3 __devinitconst = {
.type = BT_PICASSO4,
.regoffset = 0x00600000,
.ramsize = 4 * MB_,
- .ramoffset = 0x01000000,
+ .ramoffset = 0x01000000, /* 0x02000000 for 64 MiB boards */
};
static const struct zorrocl zcl_picasso4_z2 __devinitconst = {
@@ -2259,6 +2259,10 @@ static int __devinit cirrusfb_zorro_register(struct zorro_dev *z,
ramsize = zcl->ramsize;
if (ramsize) {
rambase = zorro_resource_start(z) + zcl->ramoffset;
+ if (zorro_resource_len(z) = 64 * MB_) {
+ /* Quirk for 64 MiB Picasso IV */
+ rambase += zcl->ramoffset;
+ }
} else {
struct zorro_dev *ram = zorro_find_device(zcl->ramid, NULL);
if (!ram || !zorro_resource_len(ram)) {
--
1.7.0.4
next prev parent reply other threads:[~2011-10-20 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 11:42 [PATCH 1/4] zorro: Rename Picasso IV Z2 "MEM" to "RAM" for consistency Geert Uytterhoeven
2011-10-20 11:42 ` [PATCH 2/4] fbdev/cirrusfb: Rewrite Zorro graphics card probing Geert Uytterhoeven
2011-10-20 17:03 ` Jeff Garzik
2011-10-20 11:42 ` [PATCH 3/4] fbdev/cirrusfb: Add support for Picasso IV in Zorro II mode Geert Uytterhoeven
2011-10-20 17:03 ` [PATCH 3/4] fbdev/cirrusfb: Add support for Picasso IV in Zorro Jeff Garzik
2011-10-20 11:42 ` Geert Uytterhoeven [this message]
2011-10-20 17:03 ` [PATCH 4/4] fbdev/cirrusfb: Add support for "64 MiB" version Jeff Garzik
2011-11-12 0:20 ` [PATCH 1/4] zorro: Rename Picasso IV Z2 "MEM" to "RAM" for consistency Florian Tobias Schandinat
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=1319110945-25684-4-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=FlorianSchandinat@gmx.de \
--cc=cts@debian.org \
--cc=ij@2011.bluespice.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.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 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).