This source file includes following definitions.
- scr_writew
- scr_readw
- scr_writeb
- scr_readb
- scr_writew
- scr_readw
- scr_writeb
- scr_readb
- scr_writew
- scr_readw
- memsetw
- memcpyw
1
2
3
4
5
6 extern int sel_cons;
7
8 extern void clear_selection(void);
9 extern int set_selection(const unsigned long arg, struct tty_struct *tty, int user);
10 extern int paste_selection(struct tty_struct *tty);
11 extern int sel_loadlut(const unsigned long arg);
12 extern int mouse_reporting(void);
13 extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);
14
15 extern unsigned long video_num_columns;
16 extern unsigned long video_num_lines;
17 extern unsigned long video_size_row;
18 extern unsigned char video_type;
19 extern unsigned long video_mem_base;
20 extern unsigned long video_mem_term;
21 extern unsigned long video_screen_size;
22 extern unsigned short video_port_reg;
23 extern unsigned short video_port_val;
24
25 extern int console_blanked;
26 extern int can_do_color;
27
28 extern unsigned long video_font_height;
29 extern unsigned long video_scan_lines;
30 extern unsigned long default_font_height;
31 extern int video_font_is_default;
32
33 extern unsigned char color_table[];
34 extern int default_red[];
35 extern int default_grn[];
36 extern int default_blu[];
37
38 extern unsigned short __real_origin;
39 extern unsigned short __origin;
40 extern unsigned char has_wrapped;
41
42 extern unsigned short *vc_scrbuf[MAX_NR_CONSOLES];
43
44 extern void do_unblank_screen(void);
45 extern unsigned short *screen_pos(int currcons, int w_offset, int viewed);
46 extern unsigned short screen_word(int currcons, int offset, int viewed);
47 extern int scrw2glyph(unsigned short scr_word);
48 extern void complement_pos(int currcons, int offset);
49 extern void invert_screen(int currcons, int offset, int count, int shift);
50
51 #define reverse_video_char(a) (((a) & 0x88) | ((((a) >> 4) | ((a) << 4)) & 0x77))
52 #define reverse_video_short(a) (((a) & 0x88ff) | \
53 (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4))
54
55
56
57 extern void getconsxy(int currcons, char *p);
58 extern void putconsxy(int currcons, char *p);
59
60
61
62
63 #include <linux/config.h>
64
65 #ifdef CONFIG_TGA_CONSOLE
66
67 extern int tga_blitc(unsigned int, unsigned long);
68 extern unsigned long video_mem_term;
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 static inline void scr_writew(unsigned short val, unsigned short * addr)
88 {
89
90
91
92
93 *addr = val;
94 if ((unsigned long)addr < video_mem_term &&
95 (unsigned long)addr >= video_mem_base) {
96 tga_blitc(val, (unsigned long) addr);
97 }
98 }
99
100 static inline unsigned short scr_readw(unsigned short * addr)
101 {
102 return *addr;
103 }
104 #else
105
106
107
108
109
110
111 #ifdef __alpha__
112
113 #include <asm/io.h>
114
115
116
117
118
119
120 static inline void scr_writeb(unsigned char val, unsigned char * addr)
121 {
122 if ((long) addr < 0)
123 *addr = val;
124 else
125 writeb(val, (unsigned long) addr);
126 }
127
128 static inline unsigned char scr_readb(unsigned char * addr)
129 {
130 if ((long) addr < 0)
131 return *addr;
132 return readb((unsigned long) addr);
133 }
134
135 static inline void scr_writew(unsigned short val, unsigned short * addr)
136 {
137 if ((long) addr < 0)
138 *addr = val;
139 else
140 writew(val, (unsigned long) addr);
141 }
142
143 static inline unsigned short scr_readw(unsigned short * addr)
144 {
145 if ((long) addr < 0)
146 return *addr;
147 return readw((unsigned long) addr);
148 }
149
150 #else
151
152
153
154
155
156 static inline void scr_writeb(unsigned char val, unsigned char * addr)
157 {
158 *addr = val;
159 }
160
161 static inline unsigned char scr_readb(unsigned char * addr)
162 {
163 return *addr;
164 }
165
166 static inline void scr_writew(unsigned short val, unsigned short * addr)
167 {
168 *addr = val;
169 }
170
171 static inline unsigned short scr_readw(unsigned short * addr)
172 {
173 return *addr;
174 }
175
176 #endif
177 #endif
178
179 static inline void memsetw(void * s, unsigned short c, unsigned int count)
180 {
181 unsigned short * addr = (unsigned short *) s;
182
183 count /= 2;
184 while (count) {
185 count--;
186 scr_writew(c, addr++);
187 }
188 }
189
190 static inline void memcpyw(unsigned short *to, unsigned short *from,
191 unsigned int count)
192 {
193 count /= 2;
194 while (count) {
195 count--;
196 scr_writew(scr_readw(from++), to++);
197 }
198 }