patch-2.3.99-pre8 linux/drivers/video/cyber2000fb.h
Next file: linux/fs/binfmt_misc.c
Previous file: linux/drivers/video/cyber2000fb.c
Back to the patch index
Back to the overall index
- Lines: 96
- Date:
Fri May 12 11:21:20 2000
- Orig file:
v2.3.99-pre7/linux/drivers/video/cyber2000fb.h
- Orig date:
Wed Apr 26 16:34:08 2000
diff -u --recursive --new-file v2.3.99-pre7/linux/drivers/video/cyber2000fb.h linux/drivers/video/cyber2000fb.h
@@ -4,8 +4,6 @@
* Integraphics Cyber2000 frame buffer device
*/
-#define arraysize(x) (sizeof(x)/sizeof(*(x)))
-
#define cyber2000_outb(dat,reg) writeb(dat, CyberRegs + reg)
#define cyber2000_outw(dat,reg) writew(dat, CyberRegs + reg)
#define cyber2000_outl(dat,reg) writel(dat, CyberRegs + reg)
@@ -14,6 +12,30 @@
#define cyber2000_inw(reg) readw(CyberRegs + reg)
#define cyber2000_inl(reg) readl(CyberRegs + reg)
+/*
+ * Internal CyberPro sizes and offsets.
+ */
+#define MMIO_OFFSET 0x00800000
+#define MMIO_SIZE 0x000c0000
+
+#define NR_PALETTE 256
+
+#if defined(DEBUG) && defined(CONFIG_DEBUG_LL)
+static void debug_printf(char *fmt, ...)
+{
+ char buffer[128];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buffer, fmt, ap);
+ va_end(ap);
+
+ printascii(buffer);
+}
+#else
+#define debug_printf(x...) do { } while (0)
+#endif
+
static inline void cyber2000_crtcw(int reg, int val)
{
cyber2000_outb(reg, 0x3d4);
@@ -46,42 +68,6 @@
cyber2000_outb(val, 0x3c5);
}
-struct cyber2000fb_par {
- char * screen_base;
- unsigned long screen_base_p;
- unsigned long regs_base;
- unsigned long regs_base_p;
- unsigned long screen_end;
- unsigned long screen_size;
- unsigned int palette_size;
- signed int currcon;
- char dev_name[32];
- struct pci_dev *dev;
- unsigned int dev_id;
- unsigned int initialised:1;
- unsigned int bus_64bit:1;
-
- /*
- * palette
- */
- struct {
- u8 red;
- u8 green;
- u8 blue;
- } palette[256];
- /*
- * colour mapping table
- */
- union {
-#ifdef FBCON_HAS_CFB16
- u16 cfb16[16];
-#endif
-#ifdef FBCON_HAS_CFB24
- u32 cfb24[16];
-#endif
- } c_table;
-};
-
#define PIXFORMAT_8BPP 0
#define PIXFORMAT_16BPP 1
#define PIXFORMAT_24BPP 2
@@ -139,6 +125,12 @@
#define CAP_DDA_X_INC 0x6a
#define CAP_DDA_Y_INIT 0x6c
#define CAP_DDA_Y_INC 0x6e
+
+#define MEM_CTL2 0x72
+#define MEM_CTL2_SIZE_2MB 0x01
+#define MEM_CTL2_SIZE_4MB 0x02
+#define MEM_CTL2_SIZE_MASK 0x03
+#define MEM_CTL2_64BIT 0x04
#define EXT_FIFO_CTL 0x74
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)