]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/video/fbdev/aty/atyfb_base.c
video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()
[mirror_ubuntu-artful-kernel.git] / drivers / video / fbdev / aty / atyfb_base.c
CommitLineData
1da177e4
LT
1/*
2 * ATI Frame Buffer Device Driver Core
3 *
4 * Copyright (C) 2004 Alex Kern <alex.kern@gmx.de>
5 * Copyright (C) 1997-2001 Geert Uytterhoeven
6 * Copyright (C) 1998 Bernd Harries
7 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
8 *
9 * This driver supports the following ATI graphics chips:
10 * - ATI Mach64
11 *
12 * To do: add support for
13 * - ATI Rage128 (from aty128fb.c)
14 * - ATI Radeon (from radeonfb.c)
15 *
16 * This driver is partly based on the PowerMac console driver:
17 *
18 * Copyright (C) 1996 Paul Mackerras
19 *
20 * and on the PowerMac ATI/mach64 display driver:
21 *
22 * Copyright (C) 1997 Michael AK Tesch
23 *
24 * with work by Jon Howell
25 * Harry AC Eaton
26 * Anthony Tong <atong@uiuc.edu>
27 *
28 * Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern
96de0e25 29 * Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug.
1da177e4
LT
30 *
31 * This file is subject to the terms and conditions of the GNU General Public
32 * License. See the file COPYING in the main directory of this archive for
33 * more details.
34 *
35 * Many thanks to Nitya from ATI devrel for support and patience !
36 */
37
38/******************************************************************************
39
40 TODO:
41
42 - cursor support on all cards and all ramdacs.
43 - cursor parameters controlable via ioctl()s.
44 - guess PLL and MCLK based on the original PLL register values initialized
45 by Open Firmware (if they are initialized). BIOS is done
46
47 (Anyone with Mac to help with this?)
48
49******************************************************************************/
50
51
1da177e4
LT
52#include <linux/module.h>
53#include <linux/moduleparam.h>
54#include <linux/kernel.h>
55#include <linux/errno.h>
56#include <linux/string.h>
57#include <linux/mm.h>
58#include <linux/slab.h>
59#include <linux/vmalloc.h>
60#include <linux/delay.h>
9abc907e 61#include <linux/compiler.h>
1da177e4
LT
62#include <linux/console.h>
63#include <linux/fb.h>
64#include <linux/init.h>
65#include <linux/pci.h>
66#include <linux/interrupt.h>
67#include <linux/spinlock.h>
68#include <linux/wait.h>
5474c120 69#include <linux/backlight.h>
eafad22a
VS
70#include <linux/reboot.h>
71#include <linux/dmi.h>
1da177e4
LT
72
73#include <asm/io.h>
84902b7a 74#include <linux/uaccess.h>
1da177e4
LT
75
76#include <video/mach64.h>
77#include "atyfb.h"
78#include "ati_ids.h"
79
80#ifdef __powerpc__
e8222502 81#include <asm/machdep.h>
1da177e4
LT
82#include <asm/prom.h>
83#include "../macmodes.h"
84#endif
85#ifdef __sparc__
1da177e4 86#include <asm/fbio.h>
63c3f460
DM
87#include <asm/oplib.h>
88#include <asm/prom.h>
1da177e4
LT
89#endif
90
91#ifdef CONFIG_ADB_PMU
92#include <linux/adb.h>
93#include <linux/pmu.h>
94#endif
95#ifdef CONFIG_BOOTX_TEXT
96#include <asm/btext.h>
97#endif
98#ifdef CONFIG_PMAC_BACKLIGHT
99#include <asm/backlight.h>
100#endif
1da177e4
LT
101
102/*
103 * Debug flags.
104 */
105#undef DEBUG
106/*#define DEBUG*/
107
108/* Make sure n * PAGE_SIZE is protected at end of Aperture for GUI-regs */
109/* - must be large enough to catch all GUI-Regs */
110/* - must be aligned to a PAGE boundary */
111#define GUI_RESERVE (1 * PAGE_SIZE)
112
113/* FIXME: remove the FAIL definition */