#include <linux/aperture.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/svga.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/console.h>
#include <video/vga.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
struct s3fb_info { … };
static const struct svga_fb_format s3fb_formats[] = …;
static const struct svga_pll s3_pll = …;
static const struct svga_pll s3_trio3d_pll = …;
static const int s3_memsizes[] = …;
static const char * const s3_names[] = …;
#define CHIP_UNKNOWN …
#define CHIP_732_TRIO32 …
#define CHIP_764_TRIO64 …
#define CHIP_765_TRIO64VP …
#define CHIP_767_TRIO64UVP …
#define CHIP_775_TRIO64V2_DX …
#define CHIP_785_TRIO64V2_GX …
#define CHIP_551_PLATO_PX …
#define CHIP_M65_AURORA64VP …
#define CHIP_325_VIRGE …
#define CHIP_988_VIRGE_VX …
#define CHIP_375_VIRGE_DX …
#define CHIP_385_VIRGE_GX …
#define CHIP_357_VIRGE_GX2 …
#define CHIP_359_VIRGE_GX2P …
#define CHIP_360_TRIO3D_1X …
#define CHIP_362_TRIO3D_2X …
#define CHIP_368_TRIO3D_2X …
#define CHIP_365_TRIO3D …
#define CHIP_260_VIRGE_MX …
#define CHIP_XXX_TRIO …
#define CHIP_XXX_TRIO64V2_DXGX …
#define CHIP_XXX_VIRGE_DXGX …
#define CHIP_36X_TRIO3D_1X_2X …
#define CHIP_UNDECIDED_FLAG …
#define CHIP_MASK …
#define MMIO_OFFSET …
#define MMIO_SIZE …
static const struct vga_regset s3_h_total_regs[] = …;
static const struct vga_regset s3_h_display_regs[] = …;
static const struct vga_regset s3_h_blank_start_regs[] = …;
static const struct vga_regset s3_h_blank_end_regs[] = …;
static const struct vga_regset s3_h_sync_start_regs[] = …;
static const struct vga_regset s3_h_sync_end_regs[] = …;
static const struct vga_regset s3_v_total_regs[] = …;
static const struct vga_regset s3_v_display_regs[] = …;
static const struct vga_regset s3_v_blank_start_regs[] = …;
static const struct vga_regset s3_v_blank_end_regs[] = …;
static const struct vga_regset s3_v_sync_start_regs[] = …;
static const struct vga_regset s3_v_sync_end_regs[] = …;
static const struct vga_regset s3_line_compare_regs[] = …;
static const struct vga_regset s3_start_address_regs[] = …;
static const struct vga_regset s3_offset_regs[] = …;
static const struct vga_regset s3_dtpc_regs[] = …;
static const struct svga_timing_regs s3_timing_regs = …;
static char *mode_option;
static int mtrr = …;
static int fasttext = …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
module_param(mode_option, charp, 0444);
MODULE_PARM_DESC(…) …;
module_param_named(mode, mode_option, charp, 0444);
MODULE_PARM_DESC(…) …;
module_param(mtrr, int, 0444);
MODULE_PARM_DESC(…) …;
module_param(fasttext, int, 0644);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_FB_S3_DDC
#define DDC_REG …
#define DDC_MMIO_REG …
#define DDC_SCL_OUT …
#define DDC_SDA_OUT …
#define DDC_SCL_IN …
#define DDC_SDA_IN …
#define DDC_DRIVE_EN …
static bool s3fb_ddc_needs_mmio(int chip)
{ … }
static u8 s3fb_ddc_read(struct s3fb_info *par)
{ … }
static void s3fb_ddc_write(struct s3fb_info *par, u8 val)
{ … }
static void s3fb_ddc_setscl(void *data, int val)
{ … }
static void s3fb_ddc_setsda(void *data, int val)
{ … }
static int s3fb_ddc_getscl(void *data)
{ … }
static int s3fb_ddc_getsda(void *data)
{ … }
static int s3fb_setup_ddc_bus(struct fb_info *info)
{ … }
#endif
static void s3fb_settile_fast(struct fb_info *info, struct fb_tilemap *map)
{ … }
static void s3fb_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor)
{ … }
static struct fb_tile_ops s3fb_tile_ops = …;
static struct fb_tile_ops s3fb_fast_tile_ops = …;
static inline u32 expand_color(u32 c)
{ … }
static void s3fb_iplan_imageblit(struct fb_info *info, const struct fb_image *image)
{ … }
static void s3fb_iplan_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ … }
static inline u32 expand_pixel(u32 c)
{ … }
static void s3fb_cfb4_imageblit(struct fb_info *info, const struct fb_image *image)
{ … }
static void s3fb_imageblit(struct fb_info *info, const struct fb_image *image)
{ … }
static void s3fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ … }
static void s3_set_pixclock(struct fb_info *info, u32 pixclock)
{ … }
static int s3fb_open(struct fb_info *info, int user)
{ … }
static int s3fb_release(struct fb_info *info, int user)
{ … }
static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{ … }
static int s3fb_set_par(struct fb_info *info)
{ … }
static int s3fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *fb)
{ … }
static int s3fb_blank(int blank_mode, struct fb_info *info)
{ … }
static int s3fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{ … }
static const struct fb_ops s3fb_ops = …;
static int s3_identification(struct s3fb_info *par)
{ … }
static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ … }
static void s3_pci_remove(struct pci_dev *dev)
{ … }
static int __maybe_unused s3_pci_suspend(struct device *dev)
{ … }
static int __maybe_unused s3_pci_resume(struct device *dev)
{ … }
static const struct dev_pm_ops s3_pci_pm_ops = …;
static const struct pci_device_id s3_devices[] = …;
MODULE_DEVICE_TABLE(pci, s3_devices);
static struct pci_driver s3fb_pci_driver = …;
#ifndef MODULE
static int __init s3fb_setup(char *options)
{ … }
#endif
static void __exit s3fb_cleanup(void)
{ … }
static int __init s3fb_init(void)
{ … }
module_init(…) …;
module_exit(s3fb_cleanup);