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

vgacon: remove prehistoric macros

These macros:
* CAN_LOAD_EGA_FONTS
* CAN_LOAD_PALETTE
* TRIDENT_GLITCH
* VGA_CAN_DO_64KB
* SLOW_VGA
are either always set or always unset. They come from the linux 2.1
times. And given nobody switched them to some configurable options, I
assume nobody actually uses them.

So remove the macros and leave in place appropriate branches of the
conditional code.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: <linux-fbdev@vger.kernel.org>
Cc: <linux-doc@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
b9c8b7fc 96fd9554

+5 -56
+5 -7
Documentation/VGA-softcursor.txt
··· 2 2 ======================= and Martin Mares <mj@atrey.karlin.mff.cuni.cz> 3 3 4 4 Linux now has some ability to manipulate cursor appearance. Normally, you 5 - can set the size of hardware cursor (and also work around some ugly bugs in 6 - those miserable Trident cards--see #define TRIDENT_GLITCH in drivers/video/ 7 - vgacon.c). You can now play a few new tricks: you can make your cursor look 8 - like a non-blinking red block, make it inverse background of the character it's 9 - over or to highlight that character and still choose whether the original 10 - hardware cursor should remain visible or not. There may be other things I have 11 - never thought of. 5 + can set the size of hardware cursor. You can now play a few new tricks: you 6 + can make your cursor look like a non-blinking red block, make it inverse 7 + background of the character it's over or to highlight that character and still 8 + choose whether the original hardware cursor should remain visible or not. 9 + There may be other things I have never thought of. 12 10 13 11 The cursor appearance is controlled by a "<ESC>[?1;2;3c" escape sequence 14 12 where 1, 2 and 3 are parameters described below. If you omit any of them,
-49
drivers/video/console/vgacon.c
··· 60 60 61 61 #define BLANK 0x0020 62 62 63 - #define CAN_LOAD_EGA_FONTS /* undefine if the user must not do this */ 64 - #define CAN_LOAD_PALETTE /* undefine if the user must not do this */ 65 - 66 - /* You really do _NOT_ want to define this, unless you have buggy 67 - * Trident VGA which will resize cursor when moving it between column 68 - * 15 & 16. If you define this and your VGA is OK, inverse bug will 69 - * appear. 70 - */ 71 - #undef TRIDENT_GLITCH 72 63 #define VGA_FONTWIDTH 8 /* VGA does not support fontwidths != 8 */ 73 64 /* 74 65 * Interface used by the world ··· 148 157 * handlers, thus the write has to be IRQ-atomic. 149 158 */ 150 159 raw_spin_lock_irqsave(&vga_lock, flags); 151 - 152 - #ifndef SLOW_VGA 153 160 v1 = reg + (val & 0xff00); 154 161 v2 = reg + 1 + ((val << 8) & 0xff00); 155 162 outw(v1, vga_video_port_reg); 156 163 outw(v2, vga_video_port_reg); 157 - #else 158 - outb_p(reg, vga_video_port_reg); 159 - outb_p(val >> 8, vga_video_port_val); 160 - outb_p(reg + 1, vga_video_port_reg); 161 - outb_p(val & 0xff, vga_video_port_val); 162 - #endif 163 164 raw_spin_unlock_irqrestore(&vga_lock, flags); 164 165 } 165 166 ··· 409 426 request_resource(&ioport_resource, 410 427 &vga_console_resource); 411 428 412 - #ifdef VGA_CAN_DO_64KB 413 - /* 414 - * get 64K rather than 32K of video RAM. 415 - * This doesn't actually work on all "VGA" 416 - * controllers (it seems like setting MM=01 417 - * and COE=1 isn't necessarily a good idea) 418 - */ 419 - vga_vram_base = 0xa0000; 420 - vga_vram_size = 0x10000; 421 - outb_p(6, VGA_GFX_I); 422 - outb_p(6, VGA_GFX_D); 423 - #endif 424 429 /* 425 430 * Normalise the palette registers, to point 426 431 * the 16 screen colours to the first 16 ··· 597 626 { 598 627 unsigned long flags; 599 628 int curs, cure; 600 - 601 - #ifdef TRIDENT_GLITCH 602 - if (xpos < 16) 603 - from--, to--; 604 - #endif 605 629 606 630 if ((from == cursor_size_lastfrom) && (to == cursor_size_lastto)) 607 631 return; ··· 799 833 800 834 static void vgacon_set_palette(struct vc_data *vc, const unsigned char *table) 801 835 { 802 - #ifdef CAN_LOAD_PALETTE 803 836 if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked 804 837 || !con_is_visible(vc)) 805 838 return; 806 839 vga_set_palette(vc, table); 807 - #endif 808 840 } 809 841 810 842 /* structure holding original VGA register settings */ ··· 985 1021 * (sizif@botik.yaroslavl.su). 986 1022 */ 987 1023 988 - #ifdef CAN_LOAD_EGA_FONTS 989 - 990 1024 #define colourmap 0xa0000 991 1025 /* Pauline Middelink <middelin@polyware.iaf.nl> reports that we 992 1026 should use 0xA0000 for the bwmap as well.. */ ··· 1001 1039 if (vga_video_type != VIDEO_TYPE_EGAM) { 1002 1040 charmap = (char *) VGA_MAP_MEM(colourmap, 0); 1003 1041 beg = 0x0e; 1004 - #ifdef VGA_CAN_DO_64KB 1005 - if (vga_video_type == VIDEO_TYPE_VGAC) 1006 - beg = 0x06; 1007 - #endif 1008 1042 } else { 1009 1043 charmap = (char *) VGA_MAP_MEM(blackwmap, 0); 1010 1044 beg = 0x0a; ··· 1228 1270 return 0; 1229 1271 return vgacon_do_font_op(&vgastate, font->data, 0, vga_512_chars); 1230 1272 } 1231 - 1232 - #else 1233 - 1234 - #define vgacon_font_set NULL 1235 - #define vgacon_font_get NULL 1236 - 1237 - #endif 1238 1273 1239 1274 static int vgacon_resize(struct vc_data *c, unsigned int width, 1240 1275 unsigned int height, unsigned int user)