summaryrefslogtreecommitdiffstats
path: root/drivers/video/riva/rivafb.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
commit116674acc97ba75a720329996877077d988443a2 (patch)
tree6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /drivers/video/riva/rivafb.h
parent71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff)
Merge with Linux 2.4.2.
Diffstat (limited to 'drivers/video/riva/rivafb.h')
-rw-r--r--drivers/video/riva/rivafb.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/drivers/video/riva/rivafb.h b/drivers/video/riva/rivafb.h
new file mode 100644
index 000000000..7134ed233
--- /dev/null
+++ b/drivers/video/riva/rivafb.h
@@ -0,0 +1,85 @@
+#ifndef __RIVAFB_H
+#define __RIVAFB_H
+
+#include <linux/config.h>
+#include <linux/fb.h>
+#include <video/fbcon.h>
+#include <video/fbcon-cfb4.h>
+#include <video/fbcon-cfb8.h>
+#include <video/fbcon-cfb16.h>
+#include <video/fbcon-cfb32.h>
+#include "riva_hw.h"
+
+/* GGI compatibility macros */
+#define NUM_SEQ_REGS 0x05
+#define NUM_CRT_REGS 0x41
+#define NUM_GRC_REGS 0x09
+#define NUM_ATC_REGS 0x15
+
+/* holds the state of the VGA core and extended Riva hw state from riva_hw.c.
+ * From KGI originally. */
+struct riva_regs {
+ u8 attr[NUM_ATC_REGS];
+ u8 crtc[NUM_CRT_REGS];
+ u8 gra[NUM_GRC_REGS];
+ u8 seq[NUM_SEQ_REGS];
+ u8 misc_output;
+ RIVA_HW_STATE ext;
+};
+
+typedef struct {
+ unsigned char red, green, blue, transp;
+} riva_cfb8_cmap_t;
+
+struct rivafb_info;
+struct rivafb_info {
+ struct fb_info info; /* kernel framebuffer info */
+
+ RIVA_HW_INST riva; /* interface to riva_hw.c */
+
+ const char *drvr_name; /* Riva hardware board type */
+
+ unsigned long ctrl_base_phys; /* physical control register base addr */
+ unsigned long fb_base_phys; /* physical framebuffer base addr */
+
+ caddr_t ctrl_base; /* virtual control register base addr */
+ caddr_t fb_base; /* virtual framebuffer base addr */
+
+ unsigned ram_amount; /* amount of RAM on card, in bytes */
+ unsigned dclk_max; /* max DCLK */
+
+ struct riva_regs initial_state; /* initial startup video mode */
+ struct riva_regs current_state;
+
+ struct display disp;
+ int currcon;
+ struct display *currcon_display;
+
+ struct rivafb_info *next;
+
+ struct pci_dev *pd; /* pointer to board's pci info */
+ unsigned base0_region_size; /* size of control register region */
+ unsigned base1_region_size; /* size of framebuffer region */
+
+ struct riva_cursor *cursor;
+
+ struct display_switch dispsw;
+
+ riva_cfb8_cmap_t palette[256]; /* VGA DAC palette cache */
+
+#if defined(FBCON_HAS_CFB16) || defined(FBCON_HAS_CFB32)
+ union {
+#ifdef FBCON_HAS_CFB16
+ u_int16_t cfb16[16];
+#endif
+#ifdef FBCON_HAS_CFB32
+ u_int32_t cfb32[16];
+#endif
+ } con_cmap;
+#endif /* FBCON_HAS_CFB16 | FBCON_HAS_CFB32 */
+#ifdef CONFIG_MTRR
+ struct { int vram; int vram_valid; } mtrr;
+#endif
+};
+
+#endif /* __RIVAFB_H */ \ No newline at end of file