Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sticore: don't activate unsupported GSC STI cards on HPPA

On HPPA there exists some older GSC graphics cards, which need special
graphic-card-BIOS patching to become supported. Since we don't have yet
implemented the patching, it's better to detect such cards in advance,
inform to the user that there are known problems and to not activate the
card.

Problematic GSC cards and BIOS versions are:
* Hyperdrive/Hyperbowl (A4071A) graphics card series:
* ID = 0x2BCB015A (Version 8.04/8)
* ID = 0x2BCB015A (Version 8.04/11)
* Thunder 1 VISUALIZE 48 card:
* ID = 0x2F23E5FC (Version 8.05/9)
* Thunder 2 VISUALIZE 48 XP card:
* ID = 0x2F8D570E (Version 8.05/12)
* Some Hyperion and ThunderHawk GSC cards

Further details are described here:
http://parisc-linux.org/faq/graphics-howto.html

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Helge Deller and committed by
Linus Torvalds
fdac4e69 9b67c5d4

+29 -1
+29 -1
drivers/video/console/sticore.c
··· 24 24 #include <asm/hardware.h> 25 25 #include <asm/parisc-device.h> 26 26 #include <asm/cacheflush.h> 27 + #include <asm/grfioctl.h> 27 28 28 29 #include "../sticore.h" 29 30 ··· 726 725 { 727 726 struct sti_cooked_rom *cooked; 728 727 struct sti_rom *raw = NULL; 728 + unsigned long revno; 729 729 730 730 cooked = kmalloc(sizeof *cooked, GFP_KERNEL); 731 731 if (!cooked) ··· 769 767 sti->graphics_id[1] = raw->graphics_id[1]; 770 768 771 769 sti_dump_rom(raw); 772 - 770 + 771 + /* check if the ROM routines in this card are compatible */ 772 + if (wordmode || sti->graphics_id[1] != 0x09A02587) 773 + goto ok; 774 + 775 + revno = (raw->revno[0] << 8) | raw->revno[1]; 776 + 777 + switch (sti->graphics_id[0]) { 778 + case S9000_ID_HCRX: 779 + /* HyperA or HyperB ? */ 780 + if (revno == 0x8408 || revno == 0x840b) 781 + goto msg_not_supported; 782 + break; 783 + case CRT_ID_THUNDER: 784 + if (revno == 0x8509) 785 + goto msg_not_supported; 786 + break; 787 + case CRT_ID_THUNDER2: 788 + if (revno == 0x850c) 789 + goto msg_not_supported; 790 + } 791 + ok: 773 792 return 1; 774 793 794 + msg_not_supported: 795 + printk(KERN_ERR "Sorry, this GSC/STI card is not yet supported.\n"); 796 + printk(KERN_ERR "Please see http://parisc-linux.org/faq/" 797 + "graphics-howto.html for more info.\n"); 798 + /* fall through */ 775 799 out_err: 776 800 kfree(raw); 777 801 kfree(cooked);