X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fvideo%2Fsstfb.h;h=baa163f770abd7ceba1d7aa273b8b5450bd4916d;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=8dade38a78b4394cefab757d007a1d4fffcbf0c0;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/include/video/sstfb.h b/include/video/sstfb.h index 8dade38a7..baa163f77 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h @@ -18,11 +18,14 @@ #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) @@ -65,10 +68,6 @@ # 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)) @@ -120,7 +119,7 @@ #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 */ @@ -252,7 +251,7 @@ # 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 \ ( \ @@ -297,6 +296,11 @@ * */ +/* 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_ */