aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2007-05-11 01:23:25 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:37 -0400
commitf23a06f076173c1f56572556169bf9e1793c5d59 (patch)
tree926f086ef9160fbe343e39f0bdcbc45b022028ac /include/video
parente98e267c6f76f509cea4b4022ca502b1aa221d77 (diff)
pm3fb: Preliminary 2.4 to 2.6 port
This is a basic port from 2.4 kernel to 2.6. Acceleration is lost and big endian support probably too. The driver works in 8, 16 and 32 bit mode. [adaplas] - change VESA_* to FB_BLANK_* constants - removed unused function clear_memory - fix uninitialized variable compiler warning - some whitespace cleaning [akpm@linux-foundation.org: Nuke pestiferous CVS string] Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/pm3fb.h110
1 files changed, 0 insertions, 110 deletions
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h
index 94c7d2da90ea..d52e45a1e9b8 100644
--- a/include/video/pm3fb.h
+++ b/include/video/pm3fb.h
@@ -7,9 +7,6 @@
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive for 8 * License. See the file COPYING in the main directory of this archive for
9 * more details. 9 * more details.
10 *
11 * $Header: /cvsroot/linux/drivers/video/pm3fb.h,v 1.1 2002/02/25 19:11:06 marcelo Exp $
12 *
13 */ 10 */
14 11
15#ifndef PM3FB_H 12#ifndef PM3FB_H
@@ -1119,117 +1116,10 @@
1119/* ***** pm3fb useful define and macro ***** */ 1116/* ***** pm3fb useful define and macro ***** */
1120/* ***************************************** */ 1117/* ***************************************** */
1121 1118
1122/* permedia3 -specific definitions */
1123#define PM3_SCALE_TO_CLOCK(pr, fe, po) ((2 * PM3_REF_CLOCK * fe) / (pr * (1 << (po))))
1124
1125/* in case it's not in linux/pci.h */
1126#ifndef PCI_DEVICE_ID_3DLABS_PERMEDIA3
1127#define PCI_DEVICE_ID_3DLABS_PERMEDIA3 0x000a
1128#endif
1129
1130/* max number of simultaneous board */
1131#define PM3_MAX_BOARD 4
1132
1133/* max size of options */ 1119/* max size of options */
1134#define PM3_OPTIONS_SIZE 256 1120#define PM3_OPTIONS_SIZE 256
1135 1121
1136/* max size of font name */ 1122/* max size of font name */
1137#define PM3_FONTNAME_SIZE 40 1123#define PM3_FONTNAME_SIZE 40
1138 1124
1139/* do we want accelerated console */
1140#define PM3FB_USE_ACCEL 1
1141
1142/* for driver debugging ONLY */
1143/* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */
1144/* define PM3FB_MASTER_DEBUG 1 */
1145#if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3)
1146#define PM3FB_TRACE
1147#endif /* defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 3) */
1148
1149#ifdef PM3FB_MASTER_DEBUG
1150#define DPRINTK(l,a,b...) do { if ((l) <= PM3FB_MASTER_DEBUG) printk("pm3fb: %s: " a, __FUNCTION__ , ## b); } while (0)
1151#define DASSERT(t,a,b...) do { if (!(t)) printk("pm3fb: _assert failed: %s: " a, __FUNCTION__ , ## b); } while (0)
1152#ifdef PM3FB_TRACE
1153#define DTRACE printk("pm3fb: _enter %s\n", __FUNCTION__)
1154#else /* PM3FB_TRACE */
1155#define DTRACE
1156#endif /* PM3FB_TRACE */
1157#else /* PM3FB_MASTER_DEBUG */
1158#define DPRINTK(l,a,b...)
1159#define DASSERT(t,a,b...)
1160#define DTRACE
1161#endif /* PM3FB_MASTER_DEBUG */
1162
1163#if defined(PM3FB_MASTER_DEBUG) && (PM3FB_MASTER_DEBUG >= 2)
1164#define PM3_SHOW_CUR_MODE pm3fb_show_cur_mode(l_fb_info)
1165#else
1166#define PM3_SHOW_CUR_MODE /* pm3fb_show_cur_mode() */
1167#endif
1168
1169/* ******************************************** */
1170/* ***** A bunch of register-access macro ***** */
1171/* ******************************************** */
1172
1173#define PM3_WRITE_REG(r, v) fb_writel(v, (l_fb_info->vIOBase + r))
1174#define PM3_READ_REG(r) fb_readl((l_fb_info->vIOBase + r))
1175
1176
1177#define depth2bpp(d) ((d + 7L) & ~7L)
1178#define depth2ByPP(d) (depth2bpp(d) / 8)
1179
1180#define depth_supported(d) ((d == 8) || (d == 12) || (d == 15) || (d == 16) || (d==32))
1181
1182
1183#define PM3_WAIT(n) \
1184do{ \
1185 while(PM3_READ_REG(PM3InFIFOSpace)<(n)); \
1186} while(0)
1187
1188#define PM3_DELAY(x) do { \
1189 int delay = x; \
1190 unsigned char tmp; \
1191 while(delay--){tmp = PM3_READ_REG(PM3InFIFOSpace);}; \
1192} while(0)
1193
1194#define PM3_SLOW_WRITE_REG(r,v) \
1195do{ \
1196 DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in slow write\n"); \
1197 mb(); \
1198 PM3_WAIT(1); \
1199 mb(); \
1200 PM3_WRITE_REG(r,v); \
1201} while(0)
1202
1203#define PM3_SET_INDEX(index) \
1204do{ \
1205 PM3_SLOW_WRITE_REG(PM3RD_IndexHigh,(((index)>>8)&0xff)); \
1206 PM3_SLOW_WRITE_REG(PM3RD_IndexLow,((index)&0xff)); \
1207} while(0)
1208
1209#define PM3_WRITE_DAC_REG(r, v) \
1210do { \
1211 DASSERT((l_fb_info->vIOBase != (unsigned char*)(-1)), "l_fb_info->vIOBase mapped in write dac reg\n"); \
1212 PM3_SET_INDEX(r); \
1213 mb(); \
1214 PM3_WRITE_REG(PM3RD_IndexedData, v); \
1215} while (0)
1216
1217/* next one is really a function, added as a macro to be consistent */
1218#define PM3_READ_DAC_REG(r) pm3fb_read_dac_reg(l_fb_info, r)
1219
1220
1221#define PM3_COLOR(c) \
1222do { \
1223 if (l_fb_info->current_par->depth == 8) \
1224 { \
1225 c = (c & 0xFF); \
1226 c = c | (c << 8); \
1227 } \
1228 if ((l_fb_info->current_par->depth == 8) || (depth2bpp(l_fb_info->current_par->depth) == 16)) \
1229 { \
1230 c = (c & 0xFFFF); \
1231 c = c | (c << 16); \
1232 } \
1233} while (0)
1234
1235#endif /* PM3FB_H */ 1125#endif /* PM3FB_H */