summaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
Diffstat (limited to 'include/video')
-rw-r--r--include/video/fbcon-afb.h32
-rw-r--r--include/video/fbcon-cfb16.h34
-rw-r--r--include/video/fbcon-cfb2.h32
-rw-r--r--include/video/fbcon-cfb24.h34
-rw-r--r--include/video/fbcon-cfb32.h34
-rw-r--r--include/video/fbcon-cfb4.h32
-rw-r--r--include/video/fbcon-cfb8.h34
-rw-r--r--include/video/fbcon-ilbm.h32
-rw-r--r--include/video/fbcon-iplan2p2.h32
-rw-r--r--include/video/fbcon-iplan2p4.h32
-rw-r--r--include/video/fbcon-iplan2p8.h32
-rw-r--r--include/video/fbcon-mac.h32
-rw-r--r--include/video/fbcon-mfb.h32
-rw-r--r--include/video/fbcon-vga.h32
-rw-r--r--include/video/fbcon.h501
-rw-r--r--include/video/font.h66
-rw-r--r--include/video/macmodes.h64
-rw-r--r--include/video/s3blit.h79
-rw-r--r--include/video/sbusfb.h138
19 files changed, 1304 insertions, 0 deletions
diff --git a/include/video/fbcon-afb.h b/include/video/fbcon-afb.h
new file mode 100644
index 000000000..cbbcf0019
--- /dev/null
+++ b/include/video/fbcon-afb.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Amiga bitplanes (afb)
+ */
+
+#ifndef _VIDEO_FBCON_AFB_H
+#define _VIDEO_FBCON_AFB_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_AFB_MODULE)
+#define FBCON_HAS_AFB
+#endif
+#else
+#if defined(CONFIG_FBCON_AFB)
+#define FBCON_HAS_AFB
+#endif
+#endif
+
+extern struct display_switch fbcon_afb;
+extern void fbcon_afb_setup(struct display *p);
+extern void fbcon_afb_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_afb_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_afb_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_afb_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_afb_revc(struct display *p, int xx, int yy);
+
+#endif
diff --git a/include/video/fbcon-cfb16.h b/include/video/fbcon-cfb16.h
new file mode 100644
index 000000000..3ccc7d7cd
--- /dev/null
+++ b/include/video/fbcon-cfb16.h
@@ -0,0 +1,34 @@
+/*
+ * FBcon low-level driver for 16 bpp packed pixel (cfb16)
+ */
+
+#ifndef _VIDEO_FBCON_CFB16_H
+#define _VIDEO_FBCON_CFB16_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB16_MODULE)
+#define FBCON_HAS_CFB16
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB16)
+#define FBCON_HAS_CFB16
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb16;
+extern void fbcon_cfb16_setup(struct display *p);
+extern void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_cfb16_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb16_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb16_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb16_revc(struct display *p, int xx, int yy);
+extern void fbcon_cfb16_clear_margins(struct vc_data *conp, struct display *p,
+ int bottom_only);
+
+#endif /* _VIDEO_FBCON_CFB16_H */
diff --git a/include/video/fbcon-cfb2.h b/include/video/fbcon-cfb2.h
new file mode 100644
index 000000000..5ba68a5f0
--- /dev/null
+++ b/include/video/fbcon-cfb2.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for 2 bpp packed pixel (cfb2)
+ */
+
+#ifndef _VIDEO_FBCON_CFB2_H
+#define _VIDEO_FBCON_CFB2_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB2) || defined(CONFIG_FBCON_CFB2_MODULE)
+#define FBCON_HAS_CFB2
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB2)
+#define FBCON_HAS_CFB2
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb2;
+extern void fbcon_cfb2_setup(struct display *p);
+extern void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_cfb2_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb2_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb2_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb2_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_CFB2_H */
diff --git a/include/video/fbcon-cfb24.h b/include/video/fbcon-cfb24.h
new file mode 100644
index 000000000..77442e22d
--- /dev/null
+++ b/include/video/fbcon-cfb24.h
@@ -0,0 +1,34 @@
+/*
+ * FBcon low-level driver for 24 bpp packed pixel (cfb24)
+ */
+
+#ifndef _VIDEO_FBCON_CFB24_H
+#define _VIDEO_FBCON_CFB24_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB24) || defined(CONFIG_FBCON_CFB24_MODULE)
+#define FBCON_HAS_CFB24
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB24)
+#define FBCON_HAS_CFB24
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb24;
+extern void fbcon_cfb24_setup(struct display *p);
+extern void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_cfb24_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb24_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb24_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb24_revc(struct display *p, int xx, int yy);
+extern void fbcon_cfb24_clear_margins(struct vc_data *conp, struct display *p,
+ int bottom_only);
+
+#endif /* _VIDEO_FBCON_CFB24_H */
diff --git a/include/video/fbcon-cfb32.h b/include/video/fbcon-cfb32.h
new file mode 100644
index 000000000..abac3baa2
--- /dev/null
+++ b/include/video/fbcon-cfb32.h
@@ -0,0 +1,34 @@
+/*
+ * FBcon low-level driver for 32 bpp packed pixel (cfb32)
+ */
+
+#ifndef _VIDEO_FBCON_CFB32_H
+#define _VIDEO_FBCON_CFB32_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FBCON_CFB32_MODULE)
+#define FBCON_HAS_CFB32
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB32)
+#define FBCON_HAS_CFB32
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb32;
+extern void fbcon_cfb32_setup(struct display *p);
+extern void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_cfb32_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb32_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb32_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb32_revc(struct display *p, int xx, int yy);
+extern void fbcon_cfb32_clear_margins(struct vc_data *conp, struct display *p,
+ int bottom_only);
+
+#endif /* _VIDEO_FBCON_CFB32_H */
diff --git a/include/video/fbcon-cfb4.h b/include/video/fbcon-cfb4.h
new file mode 100644
index 000000000..963befe5c
--- /dev/null
+++ b/include/video/fbcon-cfb4.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for 4 bpp packed pixel (cfb4)
+ */
+
+#ifndef _VIDEO_FBCON_CFB4_H
+#define _VIDEO_FBCON_CFB4_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB4) || defined(CONFIG_FBCON_CFB4_MODULE)
+#define FBCON_HAS_CFB4
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB4)
+#define FBCON_HAS_CFB4
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb4;
+extern void fbcon_cfb4_setup(struct display *p);
+extern void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_cfb4_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb4_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb4_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_CFB4_H */
diff --git a/include/video/fbcon-cfb8.h b/include/video/fbcon-cfb8.h
new file mode 100644
index 000000000..96189d0ac
--- /dev/null
+++ b/include/video/fbcon-cfb8.h
@@ -0,0 +1,34 @@
+/*
+ * FBcon low-level driver for 8 bpp packed pixel (cfb8)
+ */
+
+#ifndef _VIDEO_FBCON_CFB8_H
+#define _VIDEO_FBCON_CFB8_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FBCON_CFB8_MODULE)
+#define FBCON_HAS_CFB8
+#endif
+#else
+#if defined(CONFIG_FBCON_CFB8)
+#define FBCON_HAS_CFB8
+#endif
+#endif
+
+extern struct display_switch fbcon_cfb8;
+extern void fbcon_cfb8_setup(struct display *p);
+extern void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_cfb8_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_cfb8_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_cfb8_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_cfb8_revc(struct display *p, int xx, int yy);
+extern void fbcon_cfb8_clear_margins(struct vc_data *conp, struct display *p,
+ int bottom_only);
+
+#endif /* _VIDEO_FBCON_CFB8_H */
diff --git a/include/video/fbcon-ilbm.h b/include/video/fbcon-ilbm.h
new file mode 100644
index 000000000..80f9707f6
--- /dev/null
+++ b/include/video/fbcon-ilbm.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Amiga interleaved bitplanes (ilbm)
+ */
+
+#ifndef _VIDEO_FBCON_ILBM_H
+#define _VIDEO_FBCON_ILBM_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_ILBM_MODULE)
+#define FBCON_HAS_ILBM
+#endif
+#else
+#if defined(CONFIG_FBCON_ILBM)
+#define FBCON_HAS_ILBM
+#endif
+#endif
+
+extern struct display_switch fbcon_ilbm;
+extern void fbcon_ilbm_setup(struct display *p);
+extern void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_ilbm_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_ILBM_H */
diff --git a/include/video/fbcon-iplan2p2.h b/include/video/fbcon-iplan2p2.h
new file mode 100644
index 000000000..b72868035
--- /dev/null
+++ b/include/video/fbcon-iplan2p2.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Atari interleaved bitplanes (2 planes) (iplan2p2)
+ */
+
+#ifndef _VIDEO_FBCON_IPLAN2P2_H
+#define _VIDEO_FBCON_IPLAN2P2_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P2_MODULE)
+#define FBCON_HAS_IPLAN2P2
+#endif
+#else
+#if defined(CONFIG_FBCON_IPLAN2P2)
+#define FBCON_HAS_IPLAN2P2
+#endif
+#endif
+
+extern struct display_switch fbcon_iplan2p2;
+extern void fbcon_iplan2p2_setup(struct display *p);
+extern void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p,
+ int sy, int sx, int height, int width);
+extern void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_iplan2p2_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_IPLAN2P2_H */
diff --git a/include/video/fbcon-iplan2p4.h b/include/video/fbcon-iplan2p4.h
new file mode 100644
index 000000000..a70120204
--- /dev/null
+++ b/include/video/fbcon-iplan2p4.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Atari interleaved bitplanes (4 planes) (iplan2p4)
+ */
+
+#ifndef _VIDEO_FBCON_IPLAN2P4_H
+#define _VIDEO_FBCON_IPLAN2P4_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_IPLAN2P4) || defined(CONFIG_FBCON_IPLAN2P4_MODULE)
+#define FBCON_HAS_IPLAN2P4
+#endif
+#else
+#if defined(CONFIG_FBCON_IPLAN2P4)
+#define FBCON_HAS_IPLAN2P4
+#endif
+#endif
+
+extern struct display_switch fbcon_iplan2p4;
+extern void fbcon_iplan2p4_setup(struct display *p);
+extern void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p,
+ int sy, int sx, int height, int width);
+extern void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_iplan2p4_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_IPLAN2P4_H */
diff --git a/include/video/fbcon-iplan2p8.h b/include/video/fbcon-iplan2p8.h
new file mode 100644
index 000000000..6691e18d6
--- /dev/null
+++ b/include/video/fbcon-iplan2p8.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Atari interleaved bitplanes (8 planes) (iplan2p8)
+ */
+
+#ifndef _VIDEO_FBCON_IPLAN2P8_H
+#define _VIDEO_FBCON_IPLAN2P8_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_IPLAN2P8) || defined(CONFIG_FBCON_IPLAN2P8_MODULE)
+#define FBCON_HAS_IPLAN2P8
+#endif
+#else
+#if defined(CONFIG_FBCON_IPLAN2P8)
+#define FBCON_HAS_IPLAN2P8
+#endif
+#endif
+
+extern struct display_switch fbcon_iplan2p8;
+extern void fbcon_iplan2p8_setup(struct display *p);
+extern void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy,
+ int dx, int height, int width);
+extern void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p,
+ int sy, int sx, int height, int width);
+extern void fbcon_iplan2p8_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_iplan2p8_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_IPLAN2P8_H */
diff --git a/include/video/fbcon-mac.h b/include/video/fbcon-mac.h
new file mode 100644
index 000000000..b275ff91b
--- /dev/null
+++ b/include/video/fbcon-mac.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Mac variable bpp packed pixels (mac)
+ */
+
+#ifndef _VIDEO_FBCON_MAC_H
+#define _VIDEO_FBCON_MAC_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_MAC) || defined(CONFIG_FBCON_MAC_MODULE)
+#define FBCON_HAS_MAC
+#endif
+#else
+#if defined(CONFIG_FBCON_MAC)
+#define FBCON_HAS_MAC
+#endif
+#endif
+
+extern struct display_switch fbcon_mac;
+extern void fbcon_mac_setup(struct display *p);
+extern void fbcon_mac_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_mac_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_mac_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_mac_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_mac_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_MAC_H */
diff --git a/include/video/fbcon-mfb.h b/include/video/fbcon-mfb.h
new file mode 100644
index 000000000..f74e63da2
--- /dev/null
+++ b/include/video/fbcon-mfb.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for Monochrome (mfb)
+ */
+
+#ifndef _VIDEO_FBCON_MFB_H
+#define _VIDEO_FBCON_MFB_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_MFB) || defined(CONFIG_FBCON_MFB_MODULE)
+#define FBCON_HAS_MFB
+#endif
+#else
+#if defined(CONFIG_FBCON_MFB)
+#define FBCON_HAS_MFB
+#endif
+#endif
+
+extern struct display_switch fbcon_mfb;
+extern void fbcon_mfb_setup(struct display *p);
+extern void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_mfb_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_mfb_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_mfb_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_MFB_H */
diff --git a/include/video/fbcon-vga.h b/include/video/fbcon-vga.h
new file mode 100644
index 000000000..e7c7b2db0
--- /dev/null
+++ b/include/video/fbcon-vga.h
@@ -0,0 +1,32 @@
+/*
+ * FBcon low-level driver for VGA characters/attributes
+ */
+
+#ifndef _VIDEO_FBCON_VGA_H
+#define _VIDEO_FBCON_VGA_H
+
+#include <linux/config.h>
+
+#ifdef MODULE
+#if defined(CONFIG_FBCON_VGA) || defined(CONFIG_FBCON_VGA_MODULE)
+#define FBCON_HAS_VGA
+#endif
+#else
+#if defined(CONFIG_FBCON_VGA)
+#define FBCON_HAS_VGA
+#endif
+#endif
+
+extern struct display_switch fbcon_vga;
+extern void fbcon_vga_setup(struct display *p);
+extern void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+extern void fbcon_vga_clear(struct vc_data *conp, struct display *p, int sy,
+ int sx, int height, int width);
+extern void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c,
+ int yy, int xx);
+extern void fbcon_vga_putcs(struct vc_data *conp, struct display *p,
+ const unsigned short *s, int count, int yy, int xx);
+extern void fbcon_vga_revc(struct display *p, int xx, int yy);
+
+#endif /* _VIDEO_FBCON_VGA_H */
diff --git a/include/video/fbcon.h b/include/video/fbcon.h
new file mode 100644
index 000000000..4145f56e3
--- /dev/null
+++ b/include/video/fbcon.h
@@ -0,0 +1,501 @@
+/*
+ * linux/drivers/video/fbcon.h -- Low level frame buffer based console driver
+ *
+ * Copyright (C) 1997 Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _VIDEO_FBCON_H
+#define _VIDEO_FBCON_H
+
+#include <linux/config.h>
+#include <linux/console_struct.h>
+
+
+ /*
+ * `switch' for the Low Level Operations
+ */
+
+struct display_switch {
+ void (*setup)(struct display *p);
+ void (*bmove)(struct display *p, int sy, int sx, int dy, int dx,
+ int height, int width);
+ /* for clear, conp may be NULL, which means use a blanking (black) color */
+ void (*clear)(struct vc_data *conp, struct display *p, int sy, int sx,
+ int height, int width);
+ void (*putc)(struct vc_data *conp, struct display *p, int c, int yy,
+ int xx);
+ void (*putcs)(struct vc_data *conp, struct display *p, const unsigned short *s,
+ int count, int yy, int xx);
+ void (*revc)(struct display *p, int xx, int yy);
+ void (*cursor)(struct display *p, int mode, int xx, int yy);
+ int (*set_font)(struct display *p, int width, int height);
+ void (*clear_margins)(struct vc_data *conp, struct display *p,
+ int bottom_only);
+ unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */
+};
+
+extern struct display_switch fbcon_dummy;
+
+#define fontheight(p) ((p)->_fontheight)
+#define fontheightlog(p) ((p)->_fontheightlog)
+
+#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY
+
+/* fontwidth w is supported by dispsw */
+#define FONTWIDTH(w) (1 << ((8) - 1))
+/* fontwidths w1-w2 inclusive are supported by dispsw */
+#define FONTWIDTHRANGE(w1,w2) FONTWIDTH(8)
+
+#define fontwidth(p) (8)
+#define fontwidthlog(p) (0)
+
+#else
+
+/* fontwidth w is supported by dispsw */
+#define FONTWIDTH(w) (1 << ((w) - 1))
+/* fontwidths w1-w2 inclusive are supported by dispsw */
+#define FONTWIDTHRANGE(w1,w2) (FONTWIDTH(w2+1) - FONTWIDTH(w1))
+
+#define fontwidth(p) ((p)->_fontwidth)
+#define fontwidthlog(p) ((p)->_fontwidthlog)
+
+#endif
+
+ /*
+ * Attribute Decoding
+ */
+
+/* Color */
+#define attr_fgcol(p,s) \
+ (((s) >> ((p)->fgshift)) & 0x0f)
+#define attr_bgcol(p,s) \
+ (((s) >> ((p)->bgshift)) & 0x0f)
+#define attr_bgcol_ec(p,conp) \
+ ((conp) ? (((conp)->vc_video_erase_char >> ((p)->bgshift)) & 0x0f) : 0)
+
+/* Monochrome */
+#define attr_bold(p,s) \
+ ((s) & 0x200)
+#define attr_reverse(p,s) \
+ (((s) & 0x800) ^ ((p)->inverse ? 0x800 : 0))
+#define attr_underline(p,s) \
+ ((s) & 0x400)
+#define attr_blink(p,s) \
+ ((s) & 0x8000)
+
+ /*
+ * Scroll Method
+ */
+
+/* Internal flags */
+#define __SCROLL_YPAN 0x001
+#define __SCROLL_YWRAP 0x002
+#define __SCROLL_YMOVE 0x003
+#define __SCROLL_YREDRAW 0x004
+#define __SCROLL_YMASK 0x00f
+#define __SCROLL_YFIXED 0x010
+#define __SCROLL_YNOMOVE 0x020
+#define __SCROLL_YPANREDRAW 0x040
+
+/* Only these should be used by the drivers */
+/* Which one should you use? If you have a fast card and slow bus,
+ then probably just 0 to indicate fbcon should choose between
+ YWRAP/YPAN+MOVE/YMOVE. On the other side, if you have a fast bus
+ and even better if your card can do fonting (1->8/32bit painting),
+ you should consider either SCROLL_YREDRAW (if your card is
+ able to do neither YPAN/YWRAP), or SCROLL_YNOMOVE.
+ The best is to test it with some real life scrolling (usually, not
+ all lines on the screen are filled completely with non-space characters,
+ and REDRAW performs much better on such lines, so don't cat a file
+ with every line covering all screen columns, it would not be the right
+ benchmark).
+ */
+#define SCROLL_YREDRAW (__SCROLL_YFIXED|__SCROLL_YREDRAW)
+#define SCROLL_YNOMOVE (__SCROLL_YNOMOVE|__SCROLL_YPANREDRAW)
+
+extern void fbcon_redraw_bmove(struct display *, int, int, int, int, int, int);
+
+
+/* ================================================================= */
+/* Utility Assembler Functions */
+/* ================================================================= */
+
+
+#if defined(__mc68000__)
+
+/* ====================================================================== */
+
+/* Those of a delicate disposition might like to skip the next couple of
+ * pages.
+ *
+ * These functions are drop in replacements for memmove and
+ * memset(_, 0, _). However their five instances add at least a kilobyte
+ * to the object file. You have been warned.
+ *
+ * Not a great fan of assembler for the sake of it, but I think
+ * that these routines are at least 10 times faster than their C
+ * equivalents for large blits, and that's important to the lowest level of
+ * a graphics driver. Question is whether some scheme with the blitter
+ * would be faster. I suspect not for simple text system - not much
+ * asynchrony.
+ *
+ * Code is very simple, just gruesome expansion. Basic strategy is to
+ * increase data moved/cleared at each step to 16 bytes to reduce
+ * instruction per data move overhead. movem might be faster still
+ * For more than 15 bytes, we try to align the write direction on a
+ * longword boundary to get maximum speed. This is even more gruesome.
+ * Unaligned read/write used requires 68020+ - think this is a problem?
+ *
+ * Sorry!
+ */
+
+
+/* ++roman: I've optimized Robert's original versions in some minor
+ * aspects, e.g. moveq instead of movel, let gcc choose the registers,
+ * use movem in some places...
+ * For other modes than 1 plane, lots of more such assembler functions
+ * were needed (e.g. the ones using movep or expanding color values).
+ */
+
+/* ++andreas: more optimizations:
+ subl #65536,d0 replaced by clrw d0; subql #1,d0 for dbcc
+ addal is faster than addaw
+ movep is rather expensive compared to ordinary move's
+ some functions rewritten in C for clarity, no speed loss */
+
+static __inline__ void *mymemclear_small(void *s, size_t count)
+{
+ if (!count)
+ return(0);
+
+ __asm__ __volatile__(
+ "lsrl #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
+ "1: subql #1,%1 ; jcs 3f\n\t"
+ "2: moveml %2/%3/%4/%5,%0@-\n\t"
+ "dbra %1,2b\n\t"
+ "3:"
+ : "=a" (s), "=d" (count)
+ : "d" (0), "d" (0), "d" (0), "d" (0),
+ "0" ((char *)s+count), "1" (count)
+ );
+
+ return(0);
+}
+
+
+static __inline__ void *mymemclear(void *s, size_t count)
+{
+ if (!count)
+ return(0);
+
+ if (count < 16) {
+ __asm__ __volatile__(
+ "lsrl #1,%1 ; jcc 1f ; clrb %0@+\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; clrw %0@+\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; clrl %0@+\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; clrl %0@+ ; clrl %0@+\n\t"
+ "1:"
+ : "=a" (s), "=d" (count)
+ : "0" (s), "1" (count)
+ );
+ } else {
+ long tmp;
+ __asm__ __volatile__(
+ "movel %1,%2\n\t"
+ "lsrl #1,%2 ; jcc 1f ; clrb %0@+ ; subqw #1,%1\n\t"
+ "lsrl #1,%2 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/
+ "clrw %0@+ ; subqw #2,%1 ; jra 2f\n\t"
+ "1: lsrl #1,%2 ; jcc 2f\n\t"
+ "clrw %0@+ ; subqw #2,%1\n\t"
+ "2: movew %1,%2; lsrl #2,%1 ; jeq 6f\n\t"
+ "lsrl #1,%1 ; jcc 3f ; clrl %0@+\n\t"
+ "3: lsrl #1,%1 ; jcc 4f ; clrl %0@+ ; clrl %0@+\n\t"
+ "4: subql #1,%1 ; jcs 6f\n\t"
+ "5: clrl %0@+; clrl %0@+ ; clrl %0@+ ; clrl %0@+\n\t"
+ "dbra %1,5b ; clrw %1; subql #1,%1; jcc 5b\n\t"
+ "6: movew %2,%1; btst #1,%1 ; jeq 7f ; clrw %0@+\n\t"
+ "7: ; btst #0,%1 ; jeq 8f ; clrb %0@+\n\t"
+ "8:"
+ : "=a" (s), "=d" (count), "=d" (tmp)
+ : "0" (s), "1" (count)
+ );
+ }
+
+ return(0);
+}
+
+
+static __inline__ void *mymemset(void *s, size_t count)
+{
+ if (!count)
+ return(0);
+
+ __asm__ __volatile__(
+ "lsrl #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movew %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@-\n\t"
+ "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t"
+ "1: subql #1,%1 ; jcs 3f\n\t"
+ "2: moveml %2/%3/%4/%5,%0@-\n\t"
+ "dbra %1,2b\n\t"
+ "3:"
+ : "=a" (s), "=d" (count)
+ : "d" (-1), "d" (-1), "d" (-1), "d" (-1),
+ "0" ((char *) s + count), "1" (count)
+ );
+
+ return(0);
+}
+
+
+static __inline__ void *mymemmove(void *d, const void *s, size_t count)
+{
+ if (d < s) {
+ if (count < 16) {
+ __asm__ __volatile__(
+ "lsrl #1,%2 ; jcc 1f ; moveb %1@+,%0@+\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movew %1@+,%0@+\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movel %1@+,%0@+\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
+ "1:"
+ : "=a" (d), "=a" (s), "=d" (count)
+ : "0" (d), "1" (s), "2" (count)
+ );
+ } else {
+ long tmp;
+ __asm__ __volatile__(
+ "movel %0,%3\n\t"
+ "lsrl #1,%3 ; jcc 1f ; moveb %1@+,%0@+ ; subqw #1,%2\n\t"
+ "lsrl #1,%3 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/
+ "movew %1@+,%0@+ ; subqw #2,%2 ; jra 2f\n\t"
+ "1: lsrl #1,%3 ; jcc 2f\n\t"
+ "movew %1@+,%0@+ ; subqw #2,%2\n\t"
+ "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
+ "lsrl #1,%2 ; jcc 3f ; movel %1@+,%0@+\n\t"
+ "3: lsrl #1,%2 ; jcc 4f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t"
+ "4: subql #1,%2 ; jcs 6f\n\t"
+ "5: movel %1@+,%0@+;movel %1@+,%0@+\n\t"
+ "movel %1@+,%0@+;movel %1@+,%0@+\n\t"
+ "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
+ "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@+,%0@+\n\t"
+ "7: ; btst #0,%2 ; jeq 8f ; moveb %1@+,%0@+\n\t"
+ "8:"
+ : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
+ : "0" (d), "1" (s), "2" (count)
+ );
+ }
+ } else {
+ if (count < 16) {
+ __asm__ __volatile__(
+ "lsrl #1,%2 ; jcc 1f ; moveb %1@-,%0@-\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movew %1@-,%0@-\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movel %1@-,%0@-\n\t"
+ "1: lsrl #1,%2 ; jcc 1f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
+ "1:"
+ : "=a" (d), "=a" (s), "=d" (count)
+ : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
+ );
+ } else {
+ long tmp;
+ __asm__ __volatile__(
+ "movel %0,%3\n\t"
+ "lsrl #1,%3 ; jcc 1f ; moveb %1@-,%0@- ; subqw #1,%2\n\t"
+ "lsrl #1,%3 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/
+ "movew %1@-,%0@- ; subqw #2,%2 ; jra 2f\n\t"
+ "1: lsrl #1,%3 ; jcc 2f\n\t"
+ "movew %1@-,%0@- ; subqw #2,%2\n\t"
+ "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t"
+ "lsrl #1,%2 ; jcc 3f ; movel %1@-,%0@-\n\t"
+ "3: lsrl #1,%2 ; jcc 4f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t"
+ "4: subql #1,%2 ; jcs 6f\n\t"
+ "5: movel %1@-,%0@-;movel %1@-,%0@-\n\t"
+ "movel %1@-,%0@-;movel %1@-,%0@-\n\t"
+ "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t"
+ "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@-,%0@-\n\t"
+ "7: ; btst #0,%2 ; jeq 8f ; moveb %1@-,%0@-\n\t"
+ "8:"
+ : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp)
+ : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count)
+ );
+ }
+ }
+
+ return(0);
+}
+
+
+/* ++andreas: Simple and fast version of memmove, assumes size is
+ divisible by 16, suitable for moving the whole screen bitplane */
+static __inline__ void fast_memmove(char *dst, const char *src, size_t size)
+{
+ if (!size)
+ return;
+ if (dst < src)
+ __asm__ __volatile__
+ ("1:"
+ " moveml %0@+,%/d0/%/d1/%/a0/%/a1\n"
+ " moveml %/d0/%/d1/%/a0/%/a1,%1@\n"
+ " addql #8,%1; addql #8,%1\n"
+ " dbra %2,1b\n"
+ " clrw %2; subql #1,%2\n"
+ " jcc 1b"
+ : "=a" (src), "=a" (dst), "=d" (size)
+ : "0" (src), "1" (dst), "2" (size / 16 - 1)
+ : "d0", "d1", "a0", "a1", "memory");
+ else
+ __asm__ __volatile__
+ ("1:"
+ " subql #8,%0; subql #8,%0\n"
+ " moveml %0@,%/d0/%/d1/%/a0/%/a1\n"
+ " moveml %/d0/%/d1/%/a0/%/a1,%1@-\n"
+ " dbra %2,1b\n"
+ " clrw %2; subql #1,%2\n"
+ " jcc 1b"
+ : "=a" (src), "=a" (dst), "=d" (size)
+ : "0" (src + size), "1" (dst + size), "2" (size / 16 - 1)
+ : "d0", "d1", "a0", "a1", "memory");
+}
+
+#elif defined(CONFIG_SUN4)
+
+/* You may think that I'm crazy and that I should use generic
+ routines. No, I'm not: sun4's framebuffer crashes if we std
+ into it, so we cannot use memset. */
+
+static __inline__ void *sun4_memset(void *s, char val, size_t count)
+{
+ int i;
+ for(i=0; i<count;i++)
+ ((char *) s) [i] = val;
+ return s;
+}
+
+static __inline__ void *mymemset(void *s, size_t count)
+{
+ return sun4_memset(s, 255, count);
+}
+
+static __inline__ void *mymemclear(void *s, size_t count)
+{
+ return sun4_memset(s, 0, count);
+}
+
+static __inline__ void *mymemclear_small(void *s, size_t count)
+{
+ return sun4_memset(s, 0, count);
+}
+
+/* To be honest, this is slow_memmove :). But sun4 is crappy, so what we can do. */
+static __inline__ void fast_memmove(void *d, const void *s, size_t count)
+{
+ int i;
+ if (d<s) {
+ for (i=0; i<count; i++)
+ ((char *) d)[i] = ((char *) s)[i];
+ } else
+ for (i=0; i<count; i++)
+ ((char *) d)[count-i-1] = ((char *) s)[count-i-1];
+}
+
+static __inline__ void *mymemmove(char *dst, const char *src, size_t size)
+{
+ fast_memmove(dst, src, size);
+ return dst;
+}
+
+#else
+
+static __inline__ void *mymemclear_small(void *s, size_t count)
+{
+ return(memset(s, 0, count));
+}
+
+static __inline__ void *mymemclear(void *s, size_t count)
+{
+ return(memset(s, 0, count));
+}
+
+static __inline__ void *mymemset(void *s, size_t count)
+{
+ return(memset(s, 255, count));
+}
+
+#if defined(__i386__)
+
+static __inline__ void fast_memmove(void *d, const void *s, size_t count)
+{
+ if (d < s) {
+__asm__ __volatile__ (
+ "cld\n\t"
+ "shrl $1,%%ecx\n\t"
+ "jnc 1f\n\t"
+ "movsb\n"
+ "1:\tshrl $1,%%ecx\n\t"
+ "jnc 2f\n\t"
+ "movsw\n"
+ "2:\trep\n\t"
+ "movsl"
+ : /* no output */
+ :"c"(count),"D"((long)d),"S"((long)s)
+ :"cx","di","si","memory");
+ } else {
+__asm__ __volatile__ (
+ "std\n\t"
+ "shrl $1,%%ecx\n\t"
+ "jnc 1f\n\t"
+ "movb 3(%%esi),%%al\n\t"
+ "movb %%al,3(%%edi)\n\t"
+ "decl %%esi\n\t"
+ "decl %%edi\n"
+ "1:\tshrl $1,%%ecx\n\t"
+ "jnc 2f\n\t"
+ "movw 2(%%esi),%%ax\n\t"
+ "movw %%ax,2(%%edi)\n\t"
+ "decl %%esi\n\t"
+ "decl %%edi\n\t"
+ "decl %%esi\n\t"
+ "decl %%edi\n"
+ "2:\trep\n\t"
+ "movsl\n\t"
+ "cld"
+ : /* no output */
+ :"c"(count),"D"(count-4+(long)d),"S"(count-4+(long)s)
+ :"ax","cx","di","si","memory");
+ }
+}
+
+static __inline__ void *mymemmove(char *dst, const char *src, size_t size)
+{
+ fast_memmove(dst, src, size);
+ return dst;
+}
+
+#else /* !i386 */
+
+ /*
+ * Anyone who'd like to write asm functions for other CPUs?
+ * (Why are these functions better than those from include/asm/string.h?)
+ */
+
+static __inline__ void *mymemmove(void *d, const void *s, size_t count)
+{
+ return(memmove(d, s, count));
+}
+
+static __inline__ void fast_memmove(char *dst, const char *src, size_t size)
+{
+ memmove(dst, src, size);
+}
+
+#endif /* !i386 */
+
+#endif
+
+#endif /* _VIDEO_FBCON_H */
diff --git a/include/video/font.h b/include/video/font.h
new file mode 100644
index 000000000..bdb7fc4bf
--- /dev/null
+++ b/include/video/font.h
@@ -0,0 +1,66 @@
+/*
+ * font.h -- `Soft' font definitions
+ *
+ * Created 1995 by Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _VIDEO_FONT_H
+#define _VIDEO_FONT_H
+
+#ifdef __ASSEMBLY__
+
+#ifdef __mc68000__
+#define FBCON_FONT_DESC_idx 0
+#define FBCON_FONT_DESC_name (FBCON_FONT_DESC_idx +4)
+#define FBCON_FONT_DESC_width (FBCON_FONT_DESC_name +4)
+#define FBCON_FONT_DESC_height (FBCON_FONT_DESC_width +4)
+#define FBCON_FONT_DESC_data (FBCON_FONT_DESC_height+4)
+#define FBCON_FONT_DESC_pref (FBCON_FONT_DESC_data +4)
+#endif
+
+#else /* __ASSEMBLY__ */
+
+#include <linux/types.h>
+
+struct fbcon_font_desc {
+ int idx;
+ char *name;
+ int width, height;
+ void *data;
+ int pref;
+};
+
+#define VGA8x8_IDX 0
+#define VGA8x16_IDX 1
+#define PEARL8x8_IDX 2
+#define VGA6x11_IDX 3
+#define SUN8x16_IDX 4
+#define SUN12x22_IDX 5
+#define ACORN8x8_IDX 6
+
+extern struct fbcon_font_desc font_vga_8x8,
+ font_vga_8x16,
+ font_pearl_8x8,
+ font_vga_6x11,
+ font_sun_8x16,
+ font_sun_12x22,
+ font_acorn_8x8;
+
+/* Find a font with a specific name */
+
+extern struct fbcon_font_desc *fbcon_find_font(char *name);
+
+/* Get the default font for a specific screen size */
+
+extern struct fbcon_font_desc *fbcon_get_default_font(int xres, int yres);
+
+/* Max. length for the name of a predefined font */
+#define MAX_FONT_NAME 32
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _VIDEO_FONT_H */
diff --git a/include/video/macmodes.h b/include/video/macmodes.h
new file mode 100644
index 000000000..c459987e3
--- /dev/null
+++ b/include/video/macmodes.h
@@ -0,0 +1,64 @@
+/*
+ * linux/drivers/video/macmodes.h -- Standard MacOS video modes
+ *
+ * Copyright (C) 1998 Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#ifndef _VIDEO_MACMODES_H
+#define _VIDEO_MACMODES_H
+
+ /*
+ * Video mode values.
+ * These are supposed to be the same as the values that Apple uses in
+ * MacOS.
+ */
+
+#define VMODE_NVRAM 0
+#define VMODE_512_384_60I 1 /* 512x384, 60Hz interlaced (NTSC) */
+#define VMODE_512_384_60 2 /* 512x384, 60Hz */
+#define VMODE_640_480_50I 3 /* 640x480, 50Hz interlaced (PAL) */
+#define VMODE_640_480_60I 4 /* 640x480, 60Hz interlaced (NTSC) */
+#define VMODE_640_480_60 5 /* 640x480, 60Hz (VGA) */
+#define VMODE_640_480_67 6 /* 640x480, 67Hz */
+#define VMODE_640_870_75P 7 /* 640x870, 75Hz (portrait) */
+#define VMODE_768_576_50I 8 /* 768x576, 50Hz (PAL full frame) */
+#define VMODE_800_600_56 9 /* 800x600, 56Hz */
+#define VMODE_800_600_60 10 /* 800x600, 60Hz */
+#define VMODE_800_600_72 11 /* 800x600, 72Hz */
+#define VMODE_800_600_75 12 /* 800x600, 75Hz */
+#define VMODE_832_624_75 13 /* 832x624, 75Hz */
+#define VMODE_1024_768_60 14 /* 1024x768, 60Hz */
+#define VMODE_1024_768_70 15 /* 1024x768, 70Hz (or 72Hz?) */
+#define VMODE_1024_768_75V 16 /* 1024x768, 75Hz (VESA) */
+#define VMODE_1024_768_75 17 /* 1024x768, 75Hz */
+#define VMODE_1152_870_75 18 /* 1152x870, 75Hz */
+#define VMODE_1280_960_75 19 /* 1280x960, 75Hz */
+#define VMODE_1280_1024_75 20 /* 1280x1024, 75Hz */
+#define VMODE_MAX 20
+#define VMODE_CHOOSE 99
+
+#define CMODE_NVRAM -1
+#define CMODE_8 0 /* 8 bits/pixel */
+#define CMODE_16 1 /* 16 (actually 15) bits/pixel */
+#define CMODE_32 2 /* 32 (actually 24) bits/pixel */
+
+
+extern int mac_vmode_to_var(int vmode, int cmode,
+ struct fb_var_screeninfo *var);
+extern int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
+ int *cmode);
+extern int mac_map_monitor_sense(int sense);
+
+
+ /*
+ * Addresses in NVRAM where video mode and pixel size are stored.
+ */
+
+#define NV_VMODE 0x140f
+#define NV_CMODE 0x1410
+
+#endif /* _VIDEO_MACMODES_H */
diff --git a/include/video/s3blit.h b/include/video/s3blit.h
new file mode 100644
index 000000000..b1db63187
--- /dev/null
+++ b/include/video/s3blit.h
@@ -0,0 +1,79 @@
+#ifndef _VIDEO_S3BLIT_H
+#define _VIDEO_S3BLIT_H
+
+/* s3 commands */
+#define S3_BITBLT 0xc011
+#define S3_TWOPOINTLINE 0x2811
+#define S3_FILLEDRECT 0x40b1
+
+#define S3_FIFO_EMPTY 0x0400
+#define S3_HDW_BUSY 0x0200
+
+/* Enhanced register mapping (MMIO mode) */
+
+#define S3_READ_SEL 0xbee8 /* offset f */
+#define S3_MULT_MISC 0xbee8 /* offset e */
+#define S3_ERR_TERM 0x92e8
+#define S3_FRGD_COLOR 0xa6e8
+#define S3_BKGD_COLOR 0xa2e8
+#define S3_PIXEL_CNTL 0xbee8 /* offset a */
+#define S3_FRGD_MIX 0xbae8
+#define S3_BKGD_MIX 0xb6e8
+#define S3_CUR_Y 0x82e8
+#define S3_CUR_X 0x86e8
+#define S3_DESTY_AXSTP 0x8ae8
+#define S3_DESTX_DIASTP 0x8ee8
+#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
+#define S3_MAJ_AXIS_PCNT 0x96e8
+#define S3_CMD 0x9ae8
+#define S3_GP_STAT 0x9ae8
+#define S3_ADVFUNC_CNTL 0x4ae8
+#define S3_WRT_MASK 0xaae8
+#define S3_RD_MASK 0xaee8
+
+/* Enhanced register mapping (Packed MMIO mode, write only) */
+#define S3_ALT_CURXY 0x8100
+#define S3_ALT_CURXY2 0x8104
+#define S3_ALT_STEP 0x8108
+#define S3_ALT_STEP2 0x810c
+#define S3_ALT_ERR 0x8110
+#define S3_ALT_CMD 0x8118
+#define S3_ALT_MIX 0x8134
+#define S3_ALT_PCNT 0x8148
+#define S3_ALT_PAT 0x8168
+
+/* Drawing modes */
+#define S3_NOTCUR 0x0000
+#define S3_LOGICALZERO 0x0001
+#define S3_LOGICALONE 0x0002
+#define S3_LEAVEASIS 0x0003
+#define S3_NOTNEW 0x0004
+#define S3_CURXORNEW 0x0005
+#define S3_NOT_CURXORNEW 0x0006
+#define S3_NEW 0x0007
+#define S3_NOTCURORNOTNEW 0x0008
+#define S3_CURORNOTNEW 0x0009
+#define S3_NOTCURORNEW 0x000a
+#define S3_CURORNEW 0x000b
+#define S3_CURANDNEW 0x000c
+#define S3_NOTCURANDNEW 0x000d
+#define S3_CURANDNOTNEW 0x000e
+#define S3_NOTCURANDNOTNEW 0x000f
+
+#define S3_CRTC_ADR 0x03d4
+#define S3_CRTC_DATA 0x03d5
+
+#define S3_REG_LOCK2 0x39
+#define S3_HGC_MODE 0x45
+
+#define S3_HWGC_ORGX_H 0x46
+#define S3_HWGC_ORGX_L 0x47
+#define S3_HWGC_ORGY_H 0x48
+#define S3_HWGC_ORGY_L 0x49
+#define S3_HWGC_DX 0x4e
+#define S3_HWGC_DY 0x4f
+
+
+#define S3_LAW_CTL 0x58
+
+#endif /* _VIDEO_S3BLIT_H */
diff --git a/include/video/sbusfb.h b/include/video/sbusfb.h
new file mode 100644
index 000000000..2a6d91215
--- /dev/null
+++ b/include/video/sbusfb.h
@@ -0,0 +1,138 @@
+#include <linux/timer.h>
+#include <asm/sbus.h>
+#include <asm/oplib.h>
+#include <asm/fbio.h>
+
+#include <video/fbcon.h>
+
+struct bt_regs {
+ volatile unsigned int addr; /* address register */
+ volatile unsigned int color_map; /* color map */
+ volatile unsigned int control; /* control register */
+ volatile unsigned int cursor; /* cursor map register */
+};
+
+struct fb_info_creator {
+ struct ffb_fbc *fbc;
+ struct ffb_dac *dac;
+ int dac_rev;
+ int xy_margin;
+};
+struct fb_info_cgsix {
+ struct bt_regs *bt;
+ struct cg6_fbc *fbc;
+ struct cg6_thc *thc;
+ struct cg6_tec *tec;
+ volatile u32 *fhc;
+};
+struct fb_info_bwtwo {
+ struct bw2_regs *regs;
+};
+struct fb_info_cgthree {
+ struct cg3_regs *regs;
+};
+struct fb_info_tcx {
+ struct bt_regs *bt;
+ struct tcx_thc *thc;
+ struct tcx_tec *tec;
+ u32 *cplane;
+};
+struct fb_info_leo {
+ struct leo_lx_krn *lx_krn;
+ struct leo_lc_ss0_usr *lc_ss0_usr;
+ struct leo_ld_ss0 *ld_ss0;
+ struct leo_ld_ss1 *ld_ss1;
+ struct leo_cursor *cursor;
+ unsigned int extent;
+};
+struct fb_info_cgfourteen {
+ struct cg14_regs *regs;
+ struct cg14_cursor *cursor;
+ struct cg14_clut *clut;
+ int ramsize;
+ int mode;
+};
+
+struct cg_cursor {
+ char enable; /* cursor is enabled */
+ char mode; /* cursor mode */
+ struct fbcurpos cpos; /* position */
+ struct fbcurpos chot; /* hot-spot */
+ struct fbcurpos size; /* size of mask & image fields */
+ struct fbcurpos hwsize; /* hw max size */
+ int bits[2][128]; /* space for mask & image bits */
+ char color [6]; /* cursor colors */
+ struct timer_list timer; /* cursor timer */
+ int blink_rate; /* cursor blink rate */
+};
+
+struct sbus_mmap_map {
+ unsigned long voff;
+ unsigned long poff;
+ unsigned long size;
+};
+
+#define SBUS_MMAP_FBSIZE(n) (-n)
+#define SBUS_MMAP_EMPTY 0x80000000
+
+struct fb_info_sbusfb {
+ struct fb_info info;
+ struct fb_fix_screeninfo fix;
+ struct fb_var_screeninfo var;
+ struct display disp;
+ struct display_switch dispsw;
+ struct fbtype type;
+ struct linux_sbus_device *sbdp;
+ int prom_node, prom_parent;
+ union {
+ struct fb_info_creator ffb;
+ struct fb_info_cgsix cg6;
+ struct fb_info_bwtwo bw2;
+ struct fb_info_cgthree cg3;
+ struct fb_info_tcx tcx;
+ struct fb_info_leo leo;
+ struct fb_info_cgfourteen cg14;
+ } s;
+ unsigned char *color_map;
+ struct cg_cursor cursor;
+ unsigned char open;
+ unsigned char mmaped;
+ unsigned char blanked;
+ int x_margin;
+ int y_margin;
+ int vtconsole;
+ int consolecnt;
+ int graphmode;
+ int emulations[4];
+ struct sbus_mmap_map *mmap_map;
+ unsigned long physbase;
+ int iospace;
+ /* Methods */
+ void (*setup)(struct display *);
+ void (*setcursor)(struct fb_info_sbusfb *);
+ void (*setcurshape)(struct fb_info_sbusfb *);
+ void (*setcursormap)(struct fb_info_sbusfb *, unsigned char *, unsigned char *, unsigned char *);
+ void (*loadcmap)(struct fb_info_sbusfb *, struct display *, int, int);
+ void (*blank)(struct fb_info_sbusfb *);
+ void (*unblank)(struct fb_info_sbusfb *);
+ void (*margins)(struct fb_info_sbusfb *, struct display *, int, int);
+ void (*reset)(struct fb_info_sbusfb *);
+ void (*fill)(struct fb_info_sbusfb *, struct display *, int, int, unsigned short *);
+ void (*switch_from_graph)(struct fb_info_sbusfb *);
+ void (*restore_palette)(struct fb_info_sbusfb *);
+ int (*ioctl)(struct fb_info_sbusfb *, unsigned int, unsigned long);
+};
+
+extern char *creatorfb_init(struct fb_info_sbusfb *);
+extern char *cgsixfb_init(struct fb_info_sbusfb *);
+extern char *cgthreefb_init(struct fb_info_sbusfb *);
+extern char *tcxfb_init(struct fb_info_sbusfb *);
+extern char *leofb_init(struct fb_info_sbusfb *);
+extern char *bwtwofb_init(struct fb_info_sbusfb *);
+extern char *cgfourteenfb_init(struct fb_info_sbusfb *);
+
+#define sbusfbinfod(disp) ((struct fb_info_sbusfb *)(disp->fb_info))
+#define sbusfbinfo(info) ((struct fb_info_sbusfb *)(info))
+#define CM(i, j) [3*(i)+(j)]
+
+#define SBUSFBINIT_SIZECHANGE ((char *)-1)