aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/console')
-rw-r--r--drivers/video/console/.gitignore2
-rw-r--r--drivers/video/console/Kconfig16
-rw-r--r--drivers/video/console/fbcon.c13
-rw-r--r--drivers/video/console/fbcon.h4
-rw-r--r--drivers/video/console/sticon.c2
-rw-r--r--drivers/video/console/sticore.c63
6 files changed, 59 insertions, 41 deletions
diff --git a/drivers/video/console/.gitignore b/drivers/video/console/.gitignore
new file mode 100644
index 000000000000..0c258b45439c
--- /dev/null
+++ b/drivers/video/console/.gitignore
@@ -0,0 +1,2 @@
1# conmakehash generated file
2promcon_tbl.c
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 06f87b04f207..2f50a80b413e 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -43,22 +43,6 @@ config VGACON_SOFT_SCROLLBACK_SIZE
43 buffer. Each 64KB will give you approximately 16 80x25 43 buffer. Each 64KB will give you approximately 16 80x25
44 screenfuls of scrollback buffer 44 screenfuls of scrollback buffer
45 45
46config VIDEO_SELECT
47 bool "Video mode selection support"
48 depends on X86 && VGA_CONSOLE
49 ---help---
50 This enables support for text mode selection on kernel startup. If
51 you want to take advantage of some high-resolution text mode your
52 card's BIOS offers, but the traditional Linux utilities like
53 SVGATextMode don't, you can say Y here and set the mode using the
54 "vga=" option from your boot loader (lilo or loadlin) or set
55 "vga=ask" which brings up a video mode menu on kernel startup. (Try
56 "man bootparam" or see the documentation of your boot loader about
57 how to pass options to the kernel.)
58
59 Read the file <file:Documentation/svga.txt> for more information
60 about the Video mode selection support. If unsure, say N.
61
62config MDA_CONSOLE 46config MDA_CONSOLE
63 depends on !M68K && !PARISC && ISA 47 depends on !M68K && !PARISC && ISA
64 tristate "MDA text console (dual-headed) (EXPERIMENTAL)" 48 tristate "MDA text console (dual-headed) (EXPERIMENTAL)"
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 3ccfa76d9b2a..9cbff84b787d 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1311,6 +1311,9 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
1311 if (!height || !width) 1311 if (!height || !width)
1312 return; 1312 return;
1313 1313
1314 if (sy < vc->vc_top && vc->vc_top == logo_lines)
1315 vc->vc_top = 0;
1316
1314 /* Split blits that cross physical y_wrap boundary */ 1317 /* Split blits that cross physical y_wrap boundary */
1315 1318
1316 y_break = p->vrows - p->yscroll; 1319 y_break = p->vrows - p->yscroll;
@@ -2397,11 +2400,15 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
2397 2400
2398 if (!fbcon_is_inactive(vc, info)) { 2401 if (!fbcon_is_inactive(vc, info)) {
2399 if (ops->blank_state != blank) { 2402 if (ops->blank_state != blank) {
2403 int ret = 1;
2404
2400 ops->blank_state = blank; 2405 ops->blank_state = blank;
2401 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); 2406 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
2402 ops->cursor_flash = (!blank); 2407 ops->cursor_flash = (!blank);
2403 2408
2404 if (fb_blank(info, blank)) 2409 if (info->fbops->fb_blank)
2410 ret = info->fbops->fb_blank(blank, info);
2411 if (ret)
2405 fbcon_generic_blank(vc, info, blank); 2412 fbcon_generic_blank(vc, info, blank);
2406 } 2413 }
2407 2414
@@ -2515,7 +2522,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
2515 c = vc->vc_video_erase_char; 2522 c = vc->vc_video_erase_char;
2516 vc->vc_video_erase_char = 2523 vc->vc_video_erase_char =
2517 ((c & 0xfe00) >> 1) | (c & 0xff); 2524 ((c & 0xfe00) >> 1) | (c & 0xff);
2518 c = vc->vc_def_color; 2525 c = vc->vc_scrl_erase_char;
2519 vc->vc_scrl_erase_char = 2526 vc->vc_scrl_erase_char =
2520 ((c & 0xFE00) >> 1) | (c & 0xFF); 2527 ((c & 0xFE00) >> 1) | (c & 0xFF);
2521 vc->vc_attr >>= 1; 2528 vc->vc_attr >>= 1;
@@ -2548,7 +2555,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
2548 if (vc->vc_can_do_color) { 2555 if (vc->vc_can_do_color) {
2549 vc->vc_video_erase_char = 2556 vc->vc_video_erase_char =
2550 ((c & 0xff00) << 1) | (c & 0xff); 2557 ((c & 0xff00) << 1) | (c & 0xff);
2551 c = vc->vc_def_color; 2558 c = vc->vc_scrl_erase_char;
2552 vc->vc_scrl_erase_char = 2559 vc->vc_scrl_erase_char =
2553 ((c & 0xFF00) << 1) | (c & 0xFF); 2560 ((c & 0xFF00) << 1) | (c & 0xFF);
2554 vc->vc_attr <<= 1; 2561 vc->vc_attr <<= 1;
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index de1b1365279b..89a346880ec0 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -92,7 +92,7 @@ struct fbcon_ops {
92#define attr_fgcol(fgshift,s) \ 92#define attr_fgcol(fgshift,s) \
93 (((s) >> (fgshift)) & 0x0f) 93 (((s) >> (fgshift)) & 0x0f)
94#define attr_bgcol(bgshift,s) \ 94#define attr_bgcol(bgshift,s) \
95 (((s) >> (bgshift)) & 0x07) 95 (((s) >> (bgshift)) & 0x0f)
96 96
97/* Monochrome */ 97/* Monochrome */
98#define attr_bold(s) \ 98#define attr_bold(s) \
@@ -110,7 +110,7 @@ static inline int mono_col(const struct fb_info *info)
110 __u32 max_len; 110 __u32 max_len;
111 max_len = max(info->var.green.length, info->var.red.length); 111 max_len = max(info->var.green.length, info->var.red.length);
112 max_len = max(info->var.blue.length, max_len); 112 max_len = max(info->var.blue.length, max_len);
113 return ~(0xfff << (max_len & 0xff)); 113 return (~(0xfff << max_len)) & 0xff;
114} 114}
115 115
116static inline int attr_col_ec(int shift, struct vc_data *vc, 116static inline int attr_col_ec(int shift, struct vc_data *vc,
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index a11cc2fdd4cd..4055dbdd1b42 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -370,7 +370,7 @@ static const struct consw sti_con = {
370 370
371 371
372 372
373int __init sticonsole_init(void) 373static int __init sticonsole_init(void)
374{ 374{
375 /* already initialized ? */ 375 /* already initialized ? */
376 if (sticon_sti) 376 if (sticon_sti)
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index e9ab657f0bb7..ef7870f5ea08 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -24,12 +24,13 @@
24#include <asm/hardware.h> 24#include <asm/hardware.h>
25#include <asm/parisc-device.h> 25#include <asm/parisc-device.h>
26#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
27#include <asm/grfioctl.h>
27 28
28#include "../sticore.h" 29#include "../sticore.h"
29 30
30#define STI_DRIVERVERSION "Version 0.9a" 31#define STI_DRIVERVERSION "Version 0.9a"
31 32
32struct sti_struct *default_sti __read_mostly; 33static struct sti_struct *default_sti __read_mostly;
33 34
34/* number of STI ROMS found and their ptrs to each struct */ 35/* number of STI ROMS found and their ptrs to each struct */
35static int num_sti_roms __read_mostly; 36static int num_sti_roms __read_mostly;
@@ -68,8 +69,7 @@ static const struct sti_init_flags default_init_flags = {
68 .init_cmap_tx = 1, 69 .init_cmap_tx = 1,
69}; 70};
70 71
71int 72static int sti_init_graph(struct sti_struct *sti)
72sti_init_graph(struct sti_struct *sti)
73{ 73{
74 struct sti_init_inptr_ext inptr_ext = { 0, }; 74 struct sti_init_inptr_ext inptr_ext = { 0, };
75 struct sti_init_inptr inptr = { 75 struct sti_init_inptr inptr = {
@@ -100,8 +100,7 @@ static const struct sti_conf_flags default_conf_flags = {
100 .wait = STI_WAIT, 100 .wait = STI_WAIT,
101}; 101};
102 102
103void 103static void sti_inq_conf(struct sti_struct *sti)
104sti_inq_conf(struct sti_struct *sti)
105{ 104{
106 struct sti_conf_inptr inptr = { 0, }; 105 struct sti_conf_inptr inptr = { 0, };
107 unsigned long flags; 106 unsigned long flags;
@@ -237,8 +236,8 @@ static void sti_flush(unsigned long start, unsigned long end)
237 flush_icache_range(start, end); 236 flush_icache_range(start, end);
238} 237}
239 238
240void __devinit 239static void __devinit sti_rom_copy(unsigned long base, unsigned long count,
241sti_rom_copy(unsigned long base, unsigned long count, void *dest) 240 void *dest)
242{ 241{
243 unsigned long dest_start = (unsigned long) dest; 242 unsigned long dest_start = (unsigned long) dest;
244 243
@@ -478,8 +477,8 @@ sti_init_glob_cfg(struct sti_struct *sti,
478} 477}
479 478
480#ifdef CONFIG_FB 479#ifdef CONFIG_FB
481struct sti_cooked_font * __devinit 480static struct sti_cooked_font __devinit
482sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) 481*sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
483{ 482{
484 const struct font_desc *fbfont; 483 const struct font_desc *fbfont;
485 unsigned int size, bpc; 484 unsigned int size, bpc;
@@ -534,16 +533,16 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
534 return cooked_font; 533 return cooked_font;
535} 534}
536#else 535#else
537struct sti_cooked_font * __devinit 536static struct sti_cooked_font __devinit
538sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) 537*sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
539{ 538{
540 return NULL; 539 return NULL;
541} 540}
542#endif 541#endif
543 542
544struct sti_cooked_font * __devinit 543static struct sti_cooked_font __devinit
545sti_select_font(struct sti_cooked_rom *rom, 544*sti_select_font(struct sti_cooked_rom *rom,
546 int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) 545 int (*search_font_fnc)(struct sti_cooked_rom *, int, int))
547{ 546{
548 struct sti_cooked_font *font; 547 struct sti_cooked_font *font;
549 int i; 548 int i;
@@ -707,8 +706,7 @@ sti_get_bmode_rom (unsigned long address)
707 return raw; 706 return raw;
708} 707}
709 708
710struct sti_rom * __devinit 709static struct sti_rom __devinit *sti_get_wmode_rom(unsigned long address)
711sti_get_wmode_rom (unsigned long address)
712{ 710{
713 struct sti_rom *raw; 711 struct sti_rom *raw;
714 unsigned long size; 712 unsigned long size;
@@ -723,11 +721,12 @@ sti_get_wmode_rom (unsigned long address)
723 return raw; 721 return raw;
724} 722}
725 723
726int __devinit 724static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti,
727sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) 725 unsigned long address)
728{ 726{
729 struct sti_cooked_rom *cooked; 727 struct sti_cooked_rom *cooked;
730 struct sti_rom *raw = NULL; 728 struct sti_rom *raw = NULL;
729 unsigned long revno;
731 730
732 cooked = kmalloc(sizeof *cooked, GFP_KERNEL); 731 cooked = kmalloc(sizeof *cooked, GFP_KERNEL);
733 if (!cooked) 732 if (!cooked)
@@ -770,9 +769,35 @@ sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address)
770 sti->graphics_id[1] = raw->graphics_id[1]; 769 sti->graphics_id[1] = raw->graphics_id[1];
771 770
772 sti_dump_rom(raw); 771 sti_dump_rom(raw);
773 772
773 /* check if the ROM routines in this card are compatible */
774 if (wordmode || sti->graphics_id[1] != 0x09A02587)
775 goto ok;
776
777 revno = (raw->revno[0] << 8) | raw->revno[1];
778
779 switch (sti->graphics_id[0]) {
780 case S9000_ID_HCRX:
781 /* HyperA or HyperB ? */
782 if (revno == 0x8408 || revno == 0x840b)
783 goto msg_not_supported;
784 break;
785 case CRT_ID_THUNDER:
786 if (revno == 0x8509)
787 goto msg_not_supported;
788 break;
789 case CRT_ID_THUNDER2:
790 if (revno == 0x850c)
791 goto msg_not_supported;
792 }
793ok:
774 return 1; 794 return 1;
775 795
796msg_not_supported:
797 printk(KERN_ERR "Sorry, this GSC/STI card is not yet supported.\n");
798 printk(KERN_ERR "Please see http://parisc-linux.org/faq/"
799 "graphics-howto.html for more info.\n");
800 /* fall through */
776out_err: 801out_err:
777 kfree(raw); 802 kfree(raw);
778 kfree(cooked); 803 kfree(cooked);