linux/drivers/video/fbdev/s3fb.c

/*
 * linux/drivers/video/s3fb.c -- Frame buffer device driver for S3 Trio/Virge
 *
 * Copyright (c) 2006-2007 Ondrej Zajicek <[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.
 *
 * Code is based on David Boucher's viafb (http://davesdomain.org.uk/viafb/)
 * which is based on the code of neofb.
 */

#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> /* Why should fb driver call console functions? because console_lock() */
#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

/* CRT timing register sets */

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[]         =; /* set 0x43 bit 2 to 0 */

static const struct vga_regset s3_dtpc_regs[]		=;

static const struct svga_timing_regs s3_timing_regs     =;


/* ------------------------------------------------------------------------- */

/* Module parameters */


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 /* CONFIG_FB_S3_DDC */


/* ------------------------------------------------------------------------- */

/* Set font in S3 fast text mode */

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 =;


/* ------------------------------------------------------------------------- */

/* image data is MSB-first, fb structure is MSB-first too */
static inline u32 expand_color(u32 c)
{}

/* s3fb_iplan_imageblit silently assumes that almost everything is 8-pixel aligned */
static void s3fb_iplan_imageblit(struct fb_info *info, const struct fb_image *image)
{}

/* s3fb_iplan_fillrect silently assumes that almost everything is 8-pixel aligned */
static void s3fb_iplan_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{}


/* image data is MSB-first, fb structure is high-nibble-in-low-byte-first */
static inline u32 expand_pixel(u32 c)
{}

/* s3fb_cfb4_imageblit silently assumes that almost everything is 8-pixel aligned */
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)
{}


/* Open framebuffer */

static int s3fb_open(struct fb_info *info, int user)
{}

/* Close framebuffer */

static int s3fb_release(struct fb_info *info, int user)
{}

/* Validate passed in var */

static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{}

/* Set video mode from par */

static int s3fb_set_par(struct fb_info *info)
{}

/* Set a colour register */

static int s3fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
				u_int transp, struct fb_info *fb)
{}


/* Set the display blanking state */

static int s3fb_blank(int blank_mode, struct fb_info *info)
{}


/* Pan the display */

static int s3fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{}

/* ------------------------------------------------------------------------- */

/* Frame buffer operations */

static const struct fb_ops s3fb_ops =;

/* ------------------------------------------------------------------------- */

static int s3_identification(struct s3fb_info *par)
{}


/* PCI probe */

static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
{}


/* PCI remove */

static void s3_pci_remove(struct pci_dev *dev)
{}

/* PCI suspend */

static int __maybe_unused s3_pci_suspend(struct device *dev)
{}


/* PCI resume */

static int __maybe_unused s3_pci_resume(struct device *dev)
{}

static const struct dev_pm_ops s3_pci_pm_ops =;

/* List of boards that we are trying to support */

static const struct pci_device_id s3_devices[] =;


MODULE_DEVICE_TABLE(pci, s3_devices);

static struct pci_driver s3fb_pci_driver =;

/* Parse user specified options */

#ifndef MODULE
static int  __init s3fb_setup(char *options)
{}
#endif

/* Cleanup */

static void __exit s3fb_cleanup(void)
{}

/* Driver Initialisation */

static int __init s3fb_init(void)
{}

/* ------------------------------------------------------------------------- */

/* Modularization */

module_init();
module_exit(s3fb_cleanup);