linux/drivers/video/fbdev/vga16fb.c

/*
 * linux/drivers/video/vga16.c -- VGA 16-color framebuffer driver
 *
 * Copyright 1999 Ben Pfaff <[email protected]> and Petr Vandrovec <[email protected]>
 * Based on VGA info at http://www.goodnet.com/~tinara/FreeVGA/home.htm
 * Based on VESA framebuffer (c) 1998 Gerd Knorr <[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.
 */

#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/delay.h>
#include <linux/fb.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/screen_info.h>

#include <asm/io.h>
#include <video/vga.h>

#define MODE_SKIP4
#define MODE_8BPP
#define MODE_CFB
#define MODE_TEXT

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

/*
 * card parameters
 */

struct vga16fb_par {};

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

static struct fb_var_screeninfo vga16fb_defined =;

/* name should not depend on EGA/VGA */
static const struct fb_fix_screeninfo vga16fb_fix =;

/* The VGA's weird architecture often requires that we read a byte and
   write a byte to the same location.  It doesn't matter *what* byte
   we write, however.  This is because all the action goes on behind
   the scenes in the VGA's 32-bit latch register, and reading and writing
   video memory just invokes latch behavior.

   To avoid race conditions (is this necessary?), reading and writing
   the memory byte should be done with a single instruction.  One
   suitable instruction is the x86 bitwise OR.  The following
   read-modify-write routine should optimize to one such bitwise
   OR. */
static inline void rmw(volatile char __iomem *p)
{}

/* Set the Graphics Mode Register, and return its previous value.
   Bits 0-1 are write mode, bit 3 is read mode. */
static inline int setmode(int mode)
{}

/* Select the Bit Mask Register and return its value. */
static inline int selectmask(void)
{}

/* Set the value of the Bit Mask Register.  It must already have been
   selected with selectmask(). */
static inline void setmask(int mask)
{}

/* Set the Data Rotate Register and return its old value.
   Bits 0-2 are rotate count, bits 3-4 are logical operation
   (0=NOP, 1=AND, 2=OR, 3=XOR). */
static inline int setop(int op)
{}

/* Set the Enable Set/Reset Register and return its old value.
   The code here always uses value 0xf for this register. */
static inline int setsr(int sr)
{}

/* Set the Set/Reset Register and return its old value. */
static inline int setcolor(int color)
{}

/* Return the value in the Graphics Address Register. */
static inline int getindex(void)
{}

/* Set the value in the Graphics Address Register. */
static inline void setindex(int index)
{}

/* Check if the video mode is supported by the driver */
static inline int check_mode_supported(const struct screen_info *si)
{}

static void vga16fb_pan_var(struct fb_info *info,
			    struct fb_var_screeninfo *var)
{}

static void vga16fb_update_fix(struct fb_info *info)
{}

static void vga16fb_clock_chip(struct vga16fb_par *par,
			       unsigned int *pixclock,
			       const struct fb_info *info,
			       int mul, int div)
{}

#define FAIL

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

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

static int vga16fb_check_var(struct fb_var_screeninfo *var,
			     struct fb_info *info)
{}
#undef FAIL

static int vga16fb_set_par(struct fb_info *info)
{}

static void ega16_setpalette(int regno, unsigned red, unsigned green, unsigned blue)
{}

static void vga16_setpalette(int regno, unsigned red, unsigned green, unsigned blue)
{}

static int vga16fb_setcolreg(unsigned regno, unsigned red, unsigned green,
			     unsigned blue, unsigned transp,
			     struct fb_info *info)
{}

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

/* The following VESA blanking code is taken from vgacon.c.  The VGA
   blanking code was originally by Huang shi chao, and modified by
   Christoph Rimek ([email protected]) and todd j. derr
   ([email protected]) for Linux. */

static void vga_vesa_blank(struct vga16fb_par *par, int mode)
{}

static void vga_vesa_unblank(struct vga16fb_par *par)
{}

static void vga_pal_blank(void)
{}

/* 0 unblank, 1 blank, 2 no vsync, 3 no hsync, 4 off */
static int vga16fb_blank(int blank, struct fb_info *info)
{}

static void vga_8planes_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{}

static void vga16fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{}

static void vga_8planes_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{}

static void vga16fb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{}

#define TRANS_MASK_LOW
#define TRANS_MASK_HIGH

#if defined(__LITTLE_ENDIAN)
static const u16 transl_l[] =;
static const u16 transl_h[] =;
#elif defined(__BIG_ENDIAN)
static const u16 transl_l[] = TRANS_MASK_HIGH;
static const u16 transl_h[] = TRANS_MASK_LOW;
#else
#error "Only __BIG_ENDIAN and __LITTLE_ENDIAN are supported in vga-planes"
#endif

static void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *image)
{}

static void vga_imageblit_expand(struct fb_info *info, const struct fb_image *image)
{}

static void vga_imageblit_color(struct fb_info *info, const struct fb_image *image)
{}

static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image)
{}

static void vga16fb_destroy(struct fb_info *info)
{}

static const struct fb_ops vga16fb_ops =;

static int vga16fb_probe(struct platform_device *dev)
{}

static void vga16fb_remove(struct platform_device *dev)
{}

static const struct platform_device_id vga16fb_driver_id_table[] =;
MODULE_DEVICE_TABLE(platform, vga16fb_driver_id_table);

static struct platform_driver vga16fb_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();