linux/drivers/video/fbdev/nvidia/nvidia.c

/*
 * linux/drivers/video/nvidia/nvidia.c - nVidia fb driver
 *
 * Copyright 2004 Antonino Daplas <[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/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/console.h>
#include <linux/backlight.h>
#ifdef CONFIG_BOOTX_TEXT
#include <asm/btext.h>
#endif

#include "nv_local.h"
#include "nv_type.h"
#include "nv_proto.h"
#include "nv_dma.h"

#ifdef CONFIG_FB_NVIDIA_DEBUG
#define NVTRACE
#else
#define NVTRACE
#endif

#define NVTRACE_ENTER(...)
#define NVTRACE_LEAVE(...)

#ifdef CONFIG_FB_NVIDIA_DEBUG
#define assert(expr)
#else
#define assert
#endif

#define PFX

/* HW cursor parameters */
#define MAX_CURS

static const struct pci_device_id nvidiafb_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl);

/* command line data, set in nvidiafb_setup() */
static int flatpanel =;	/* Autodetect later */
static int fpdither =;
static int forceCRTC =;
static int hwcur =;
static int noaccel =;
static int noscale =;
static int paneltweak =;
static int vram =;
static int bpp =;
static int reverse_i2c;
static bool nomtrr =;
static int backlight = IS_BUILTIN();

static char *mode_option =;

static struct fb_fix_screeninfo nvidiafb_fix =;

static struct fb_var_screeninfo nvidiafb_default_var =;

static void nvidiafb_load_cursor_image(struct nvidia_par *par, u8 * data8,
				       u16 bg, u16 fg, u32 w, u32 h)
{}

static void nvidia_write_clut(struct nvidia_par *par,
			      u8 regnum, u8 red, u8 green, u8 blue)
{}

static void nvidia_read_clut(struct nvidia_par *par,
			     u8 regnum, u8 * red, u8 * green, u8 * blue)
{}

static int nvidia_panel_tweak(struct nvidia_par *par,
			      struct _riva_hw_state *state)
{}

static void nvidia_screen_off(struct nvidia_par *par, int on)
{}

static void nvidia_save_vga(struct nvidia_par *par,
			    struct _riva_hw_state *state)
{}

#undef DUMP_REG

static void nvidia_write_regs(struct nvidia_par *par,
			      struct _riva_hw_state *state)
{}

static int nvidia_calc_regs(struct fb_info *info)
{}

static void nvidia_init_vga(struct fb_info *info)
{}

static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{}

static struct fb_ops nvidia_fb_ops;

static int nvidiafb_set_par(struct fb_info *info)
{}

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

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

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

static int nvidiafb_blank(int blank, struct fb_info *info)
{}

/*
 * Because the VGA registers are not mapped linearly in its MMIO space,
 * restrict VGA register saving and restore to x86 only, where legacy VGA IO
 * access is legal. Consequently, we must also check if the device is the
 * primary display.
 */
#ifdef CONFIG_X86
static void save_vga_x86(struct nvidia_par *par)
{}

static void restore_vga_x86(struct nvidia_par *par)
{}
#else
#define save_vga_x86
#define restore_vga_x86
#endif /* X86 */

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

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

static struct fb_ops nvidia_fb_ops =;

static int nvidiafb_suspend_late(struct device *dev, pm_message_t mesg)
{}

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

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

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

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

static const struct dev_pm_ops nvidiafb_pm_ops =;

static int nvidia_set_fbinfo(struct fb_info *info)
{}

static u32 nvidia_get_chipset(struct pci_dev *pci_dev,
			      volatile u32 __iomem *REGS)
{}

static u32 nvidia_get_arch(u32 Chipset)
{}

static int nvidiafb_probe(struct pci_dev *pd, const struct pci_device_id *ent)
{}

static void nvidiafb_remove(struct pci_dev *pd)
{}

/* ------------------------------------------------------------------------- *
 *
 * initialization
 *
 * ------------------------------------------------------------------------- */

#ifndef MODULE
static int nvidiafb_setup(char *options)
{}
#endif				/* !MODULE */

static struct pci_driver nvidiafb_driver =;

/* ------------------------------------------------------------------------- *
 *
 * modularization
 *
 * ------------------------------------------------------------------------- */

static int nvidiafb_init(void)
{}

module_init();

static void __exit nvidiafb_exit(void)
{}

module_exit(nvidiafb_exit);

module_param(flatpanel, int, 0);
MODULE_PARM_DESC();
module_param(fpdither, int, 0);
MODULE_PARM_DESC();
module_param(hwcur, int, 0);
MODULE_PARM_DESC();
module_param(noaccel, int, 0);
MODULE_PARM_DESC();
module_param(noscale, int, 0);
MODULE_PARM_DESC();
module_param(paneltweak, int, 0);
MODULE_PARM_DESC();
module_param(forceCRTC, int, 0);
MODULE_PARM_DESC();
module_param(vram, int, 0);
MODULE_PARM_DESC();
module_param(mode_option, charp, 0);
MODULE_PARM_DESC();
module_param(bpp, int, 0);
MODULE_PARM_DESC();
module_param(reverse_i2c, int, 0);
MODULE_PARM_DESC();
module_param(nomtrr, bool, false);
MODULE_PARM_DESC();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();