aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/sisusbvga/sisusb.h
diff options
context:
space:
mode:
authorThomas Winischhofer <thomas@winischhofer.net>2005-08-29 11:01:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-12 15:23:38 -0400
commit1bbb4f2035d94d86e52e9b5341c142dcb39bb879 (patch)
treee18f11ede42f0876bdf9bcf54881e5ef4f6bbfe0 /drivers/usb/misc/sisusbvga/sisusb.h
parent80908309ce44677a07763e24e6ec9371cfa3ab5f (diff)
[PATCH] USB: sisusb[vga] update
here is a new and extended version of the sisusbvga (previously: sisusb) driver. The patch is against 2.6.13 and updates the driver to version 0.0.8. Additions include complete VGA/EGA text console support and a build-in display mode infrastructure for userland applications that don't know about the graphics internals. Fixes include some BE/LE issues and a get/put_dev bug in the previous version. Other changes include a change of the module name from "sisusb" to "sisusbvga". The previous one was too generic IMHO. Please note that the patch also affects the Makefile in drivers/video/console as the driver requires the VGA 8x16 font in case the text console part is selected. Heavily tested, as usual. Please apply. One thing though: I already prepared for removal of the "mode" field and the changed "name" field in the usb_class_driver structure. This will perhaps need some refinement depending on whether you/Linus merge the respective core changes before or after 2.6.14. Signed-off-by: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga/sisusb.h')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.h73
1 files changed, 61 insertions, 12 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h
index 1306d006a25a..401ff21d7881 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.h
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -46,15 +46,36 @@
46#endif 46#endif
47#endif 47#endif
48 48
49/* For older kernels, support for text consoles is by default
50 * off. To ensable text console support, change the following:
51 */
52#if 0
53#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13)
54#define CONFIG_USB_SISUSBVGA_CON
55#endif
56#endif
57
49/* Version Information */ 58/* Version Information */
50 59
51#define SISUSB_VERSION 0 60#define SISUSB_VERSION 0
52#define SISUSB_REVISION 0 61#define SISUSB_REVISION 0
53#define SISUSB_PATCHLEVEL 7 62#define SISUSB_PATCHLEVEL 8
63
64/* Include console and mode switching code? */
65
66#ifdef CONFIG_USB_SISUSBVGA_CON
67#define INCL_SISUSB_CON 1
68#endif
69
70#ifdef INCL_SISUSB_CON
71#include <linux/console.h>
72#include <linux/vt_kern.h>
73#include "sisusb_struct.h"
74#endif
54 75
55/* USB related */ 76/* USB related */
56 77
57#define SISUSB_MINOR 133 /* FIXME */ 78#define SISUSB_MINOR 133 /* official */
58 79
59/* Size of the sisusb input/output buffers */ 80/* Size of the sisusb input/output buffers */
60#define SISUSB_IBUF_SIZE 0x01000 81#define SISUSB_IBUF_SIZE 0x01000
@@ -131,6 +152,26 @@ struct sisusb_usb_data {
131 unsigned char gfxinit; /* graphics core initialized? */ 152 unsigned char gfxinit; /* graphics core initialized? */
132 unsigned short chipid, chipvendor; 153 unsigned short chipid, chipvendor;
133 unsigned short chiprevision; 154 unsigned short chiprevision;
155#ifdef INCL_SISUSB_CON
156 struct SiS_Private *SiS_Pr;
157 unsigned long scrbuf;
158 unsigned int scrbuf_size;
159 int haveconsole, con_first, con_last;
160 int havethisconsole[MAX_NR_CONSOLES];
161 int textmodedestroyed;
162 unsigned int sisusb_num_columns; /* real number, not vt's idea */
163 int cur_start_addr, con_rolled_over;
164 int sisusb_cursor_loc, bad_cursor_pos;
165 int sisusb_cursor_size_from;
166 int sisusb_cursor_size_to;
167 int current_font_height, current_font_512;
168 int font_backup_size, font_backup_height, font_backup_512;
169 char *font_backup;
170 int font_slot;
171 struct vc_data *sisusb_display_fg;
172 int is_gfx;
173 int con_blanked;
174#endif
134}; 175};
135 176
136#define to_sisusb_dev(d) container_of(d, struct sisusb_usb_data, kref) 177#define to_sisusb_dev(d) container_of(d, struct sisusb_usb_data, kref)
@@ -249,7 +290,9 @@ struct sisusb_info {
249 290
250 __u32 sisusb_fbdevactive; /* != 0 if framebuffer device active */ 291 __u32 sisusb_fbdevactive; /* != 0 if framebuffer device active */
251 292
252 __u8 sisusb_reserved[32]; /* for future use */ 293 __u32 sisusb_conactive; /* != 0 if console driver active */
294
295 __u8 sisusb_reserved[28]; /* for future use */
253}; 296};
254 297
255struct sisusb_command { 298struct sisusb_command {
@@ -261,18 +304,24 @@ struct sisusb_command {
261 __u32 data4; /* for future use */ 304 __u32 data4; /* for future use */
262}; 305};
263 306
264#define SUCMD_GET 0x01 /* for all: data0 = index, data3 = port */ 307#define SUCMD_GET 0x01 /* for all: data0 = index, data3 = port */
265#define SUCMD_SET 0x02 /* data1 = value */ 308#define SUCMD_SET 0x02 /* data1 = value */
266#define SUCMD_SETOR 0x03 /* data1 = or */ 309#define SUCMD_SETOR 0x03 /* data1 = or */
267#define SUCMD_SETAND 0x04 /* data1 = and */ 310#define SUCMD_SETAND 0x04 /* data1 = and */
268#define SUCMD_SETANDOR 0x05 /* data1 = and, data2 = or */ 311#define SUCMD_SETANDOR 0x05 /* data1 = and, data2 = or */
269#define SUCMD_SETMASK 0x06 /* data1 = data, data2 = mask */ 312#define SUCMD_SETMASK 0x06 /* data1 = data, data2 = mask */
270 313
271#define SUCMD_CLRSCR 0x07 /* data0:1:2 = length, data3 = address */ 314#define SUCMD_CLRSCR 0x07 /* data0:1:2 = length, data3 = address */
315
316#define SUCMD_HANDLETEXTMODE 0x08 /* Reset/destroy text mode */
317
318#define SUCMD_SETMODE 0x09 /* Set a display mode (data3 = SiS mode) */
319#define SUCMD_SETVESAMODE 0x0a /* Set a display mode (data3 = VESA mode) */
272 320
273#define SISUSB_COMMAND _IOWR(0xF3,0x3D,struct sisusb_command) 321#define SISUSB_COMMAND _IOWR(0xF3,0x3D,struct sisusb_command)
274#define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32) 322#define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32)
275#define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info) 323#define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info)
324
276 325
277#endif /* SISUSB_H */ 326#endif /* SISUSB_H */
278 327