linux/drivers/video/fbdev/savage/savagefb.h

/*
 * linux/drivers/video/savagefb.h -- S3 Savage Framebuffer Driver
 *
 * Copyright (c) 2001  Denis Oliver Kropp <[email protected]>
 *
 * 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 __SAVAGEFB_H__
#define __SAVAGEFB_H__

#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/mutex.h>
#include <video/vga.h>
#include "../edid.h"

#ifdef SAVAGEFB_DEBUG
#define DBG
#else
#define DBG(x)
#define SavagePrintRegs(...)
#endif


#define PCI_CHIP_SAVAGE4
#define PCI_CHIP_SAVAGE3D
#define PCI_CHIP_SAVAGE3D_MV
#define PCI_CHIP_SAVAGE2000
#define PCI_CHIP_SAVAGE_MX_MV
#define PCI_CHIP_SAVAGE_MX
#define PCI_CHIP_SAVAGE_IX_MV
#define PCI_CHIP_SAVAGE_IX
#define PCI_CHIP_PROSAVAGE_PM
#define PCI_CHIP_PROSAVAGE_KM
#define PCI_CHIP_S3TWISTER_P
#define PCI_CHIP_S3TWISTER_K
#define PCI_CHIP_PROSAVAGE_DDR
#define PCI_CHIP_PROSAVAGE_DDRK
#define PCI_CHIP_SUPSAV_MX128
#define PCI_CHIP_SUPSAV_MX64
#define PCI_CHIP_SUPSAV_MX64C
#define PCI_CHIP_SUPSAV_IX128SDR
#define PCI_CHIP_SUPSAV_IX128DDR
#define PCI_CHIP_SUPSAV_IX64SDR
#define PCI_CHIP_SUPSAV_IX64DDR
#define PCI_CHIP_SUPSAV_IXCSDR
#define PCI_CHIP_SUPSAV_IXCDDR


#define S3_SAVAGE_SERIES(chip)

#define S3_SAVAGE3D_SERIES(chip)

#define S3_SAVAGE4_SERIES(chip)

#define S3_SAVAGE_MOBILE_SERIES(chip)

#define S3_MOBILE_TWISTER_SERIES(chip)

/* Chip tags.  These are used to group the adapters into
 * related families.
 */

savage_chipset;

#define BIOS_BSIZE
#define BIOS_BASE

#define SAVAGE_NEWMMIO_REGBASE_S3
#define SAVAGE_NEWMMIO_REGBASE_S4
#define SAVAGE_NEWMMIO_REGSIZE
#define SAVAGE_NEWMMIO_VGABASE

#define BASE_FREQ
#define HALF_BASE_FREQ

#define FIFO_CONTROL_REG
#define MIU_CONTROL_REG
#define STREAMS_TIMEOUT_REG
#define MISC_TIMEOUT_REG

#define MONO_PAT_0
#define MONO_PAT_1

#define MAXFIFO

#define BCI_CMD_NOP
#define BCI_CMD_SETREG
#define BCI_CMD_RECT
#define BCI_CMD_RECT_XP
#define BCI_CMD_RECT_YP
#define BCI_CMD_SEND_COLOR
#define BCI_CMD_DEST_GBD
#define BCI_CMD_SRC_GBD
#define BCI_CMD_SRC_SOLID
#define BCI_CMD_SRC_MONO
#define BCI_CMD_CLIP_NEW
#define BCI_CMD_CLIP_LR

#define BCI_CLIP_LR(l, r)
#define BCI_CLIP_TL(t, l)
#define BCI_CLIP_BR(b, r)
#define BCI_W_H(w, h)
#define BCI_X_Y(x, y)

#define BCI_GBD1
#define BCI_GBD2

#define BCI_BUFFER_OFFSET
#define BCI_SIZE

#define BCI_SEND(dw)

#define BCI_CMD_GET_ROP(cmd)
#define BCI_CMD_SET_ROP(cmd, rop)
#define BCI_CMD_SEND_COLOR

#define DISP_CRT
#define DISP_LCD
#define DISP_DFP

struct xtimings {};

struct savage_reg {};
/* --------------------------------------------------------------------- */

#define NR_PALETTE


struct savagefb_par;

struct savagefb_i2c_chan {};

struct savagefb_par {};

#define BCI_BD_BW_DISABLE
#define BCI_BD_SET_BPP(bd, bpp)
#define BCI_BD_SET_STRIDE(bd, st)


/* IO functions */
static inline u8 savage_in8(u32 addr, struct savagefb_par *par)
{}

static inline u16 savage_in16(u32 addr, struct savagefb_par *par)
{}

static inline u32 savage_in32(u32 addr, struct savagefb_par *par)
{}

static inline void savage_out8(u32 addr, u8 val, struct savagefb_par *par)
{}

static inline void savage_out16(u32 addr, u16 val, struct savagefb_par *par)
{}

static inline void savage_out32(u32 addr, u32 val, struct savagefb_par *par)
{}

static inline u8 vga_in8(int addr, struct savagefb_par *par)
{}

static inline u16 vga_in16(int addr, struct savagefb_par *par)
{}

static inline u8 vga_in32(int addr, struct savagefb_par *par)
{}

static inline void vga_out8(int addr, u8 val, struct savagefb_par *par)
{}

static inline void vga_out16(int addr, u16 val, struct savagefb_par *par)
{}

static inline void vga_out32(int addr, u32 val, struct savagefb_par *par)
{}

static inline u8 VGArCR (u8 index, struct savagefb_par *par)
{}

static inline u8 VGArGR (u8 index, struct savagefb_par *par)
{}

static inline u8 VGArSEQ (u8 index, struct savagefb_par *par)
{}

static inline void VGAwCR(u8 index, u8 val, struct savagefb_par *par)
{}

static inline void VGAwGR(u8 index, u8 val, struct savagefb_par *par)
{}

static inline void VGAwSEQ(u8 index, u8 val, struct savagefb_par *par)
{}

static inline void VGAenablePalette(struct savagefb_par *par)
{}

static inline void VGAdisablePalette(struct savagefb_par *par)
{}

static inline void VGAwATTR(u8 index, u8 value, struct savagefb_par *par)
{}

static inline void VGAwMISC(u8 value, struct savagefb_par *par)
{}

#ifndef CONFIG_FB_SAVAGE_ACCEL
#define savagefb_set_clip
#endif

static inline void VerticalRetraceWait(struct savagefb_par *par)
{}

extern int savagefb_probe_i2c_connector(struct fb_info *info,
					u8 **out_edid);
extern void savagefb_create_i2c_busses(struct fb_info *info);
extern void savagefb_delete_i2c_busses(struct fb_info *info);
extern int  savagefb_sync(struct fb_info *info);
extern void savagefb_copyarea(struct fb_info *info,
			      const struct fb_copyarea *region);
extern void savagefb_fillrect(struct fb_info *info,
			      const struct fb_fillrect *rect);
extern void savagefb_imageblit(struct fb_info *info,
			       const struct fb_image *image);


#endif /* __SAVAGEFB_H__ */