fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / video / sstfb.h
index 8dade38..baa163f 100644 (file)
 
 #ifdef SST_DEBUG
 #  define dprintk(X...)                printk("sstfb: " X)
+#  define SST_DEBUG_REG  1
+#  define SST_DEBUG_FUNC 1
+#  define SST_DEBUG_VAR  1
 #else
 #  define dprintk(X...)
-#  undef SST_DEBUG_REG
-#  undef SST_DEBUG_FUNC
-#  undef SST_DEBUG_VAR
+#  define SST_DEBUG_REG  0
+#  define SST_DEBUG_FUNC 0
+#  define SST_DEBUG_VAR  0
 #endif
 
 #if (SST_DEBUG_REG > 0)
 #  define print_var(X,Y...)
 #endif
 
-#define eprintk(X...)  printk(KERN_ERR "sstfb: " X)
-#define iprintk(X...)  printk(KERN_INFO "sstfb: " X)
-#define wprintk(X...)  printk(KERN_WARNING "sstfb: " X)
-
 #define BIT(x)         (1ul<<(x))
 #define POW2(x)                (1ul<<(x))
 
 #define BACKPORCH              0x0208
 #define VIDEODIMENSIONS                0x020c
 #define FBIINIT0               0x0210          /* misc+fifo  controls */
-#  define EN_VGA_PASSTHROUGH     BIT(0)
+#  define DIS_VGA_PASSTHROUGH    BIT(0)
 #  define FBI_RESET              BIT(1)
 #  define FIFO_RESET             BIT(2)
 #define FBIINIT1               0x0214          /* PCI + video controls */
 #  define DACREG_ICS_CLK1_A      0     /* bit4 */
 
 /* sst default init registers */
-#define FBIINIT0_DEFAULT EN_VGA_PASSTHROUGH
+#define FBIINIT0_DEFAULT DIS_VGA_PASSTHROUGH
 
 #define FBIINIT1_DEFAULT       \
        (                       \
  *
  */
 
+/* ioctl to enable/disable VGA passthrough */
+#define SSTFB_SET_VGAPASS      _IOW('F', 0xdd, __u32)
+#define SSTFB_GET_VGAPASS      _IOR('F', 0xdd, __u32)
+
+
 /* used to know witch clock to set */
 enum {
        VID_CLOCK=0,
@@ -318,7 +322,7 @@ struct pll_timing {
 };
 
 struct dac_switch {
-       char * name;
+       const char *name;
        int (*detect) (struct fb_info *info);
        int (*set_pll) (struct fb_info *info, const struct pll_timing *t, const int clock);
        void (*set_vidmod) (struct fb_info *info, const int bpp);
@@ -331,6 +335,7 @@ struct sst_spec {
 };
 
 struct sstfb_par {
+       u32 palette[16];
        unsigned int yDim;
        unsigned int hSyncOn;   /* hsync_len */
        unsigned int hSyncOff;  /* left_margin + xres + right_margin */
@@ -340,12 +345,12 @@ struct sstfb_par {
        unsigned int vBackPorch;
        struct pll_timing pll;
        unsigned int tiles_in_X;/* num of tiles in X res */
-       unsigned long mmio_vbase;
+       u8 __iomem *mmio_vbase;
        struct dac_switch       dac_sw; /* dac specific functions */
        struct pci_dev          *dev;
        int     type;
        u8      revision;
-       int     gfx_clock;      /* status */
+       u8      vgapass;        /* VGA pass through: 1=enabled, 0=disabled */
 };
 
 #endif /* _SSTFB_H_ */