From 1bc91535b3acdcd6e382c035bed21027a50b730f Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 29 Jul 2008 22:33:01 -0700 Subject: [PATCH] --- yaml --- r: 106996 b: refs/heads/master c: fdac4e69a1fc181652b37ce6a32ab8a56b0f3bcf h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/console/sticore.c | 30 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a218f105d844..a15298255251 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b67c5d48f104aae6118bbb052dd79a15ab9794b +refs/heads/master: fdac4e69a1fc181652b37ce6a32ab8a56b0f3bcf diff --git a/trunk/drivers/video/console/sticore.c b/trunk/drivers/video/console/sticore.c index d7822af0e00a..ef7870f5ea08 100644 --- a/trunk/drivers/video/console/sticore.c +++ b/trunk/drivers/video/console/sticore.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "../sticore.h" @@ -725,6 +726,7 @@ static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti, { struct sti_cooked_rom *cooked; struct sti_rom *raw = NULL; + unsigned long revno; cooked = kmalloc(sizeof *cooked, GFP_KERNEL); if (!cooked) @@ -767,9 +769,35 @@ static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti, sti->graphics_id[1] = raw->graphics_id[1]; sti_dump_rom(raw); - + + /* check if the ROM routines in this card are compatible */ + if (wordmode || sti->graphics_id[1] != 0x09A02587) + goto ok; + + revno = (raw->revno[0] << 8) | raw->revno[1]; + + switch (sti->graphics_id[0]) { + case S9000_ID_HCRX: + /* HyperA or HyperB ? */ + if (revno == 0x8408 || revno == 0x840b) + goto msg_not_supported; + break; + case CRT_ID_THUNDER: + if (revno == 0x8509) + goto msg_not_supported; + break; + case CRT_ID_THUNDER2: + if (revno == 0x850c) + goto msg_not_supported; + } +ok: return 1; +msg_not_supported: + printk(KERN_ERR "Sorry, this GSC/STI card is not yet supported.\n"); + printk(KERN_ERR "Please see http://parisc-linux.org/faq/" + "graphics-howto.html for more info.\n"); + /* fall through */ out_err: kfree(raw); kfree(cooked);