#include <linux/config.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/malloc.h>#include <linux/vmalloc.h>#include <linux/delay.h>#include <linux/interrupt.h>#include <linux/fb.h>#include <linux/selection.h>#include <linux/console.h>#include <linux/init.h>#include <linux/pci.h>#include <asm/system.h>#include <asm/io.h>#include <asm/uaccess.h>#include <video/fbcon.h>#include <video/fbcon-cfb8.h>#include <video/fbcon-cfb16.h>#include <video/fbcon-cfb24.h>#include <video/fbcon-cfb32.h>#include "pm2fb.h"#include "cvisionppc.h"Include dependency graph for pm2fb.c:

Go to the source code of this file.
Defines | |
| #define | DPRINTK(a, b...) |
| #define | PICOS2KHZ(a) (1000000000UL/(a)) |
| #define | KHZ2PICOS(a) (1000000000UL/(a)) |
| #define | MMAP(a, b) ioremap((unsigned long )(a), b) |
| #define | UNMAP(a, b) iounmap(a) |
| #define | DEFW() wmb() |
| #define | DEFR() rmb() |
| #define | DEFRW() mb() |
| #define | MIN(a, b) ((a)<(b)?(a):(b)) |
| #define | MAX(a, b) ((a)>(b)?(a):(b)) |
| #define | OPTF_OLD_MEM (1L<<0) |
| #define | OPTF_YPAN (1L<<1) |
| #define | OPTF_VIRTUAL (1L<<2) |
| #define | OPTF_USER (1L<<3) |
| #define | DEFAULT_CURSOR_BLINK_RATE (20) |
| #define | CURSOR_DRAW_DELAY (2) |
| #define | pm2fb_cursor NULL |
| #define | pm2fb_set_font NULL |
| #define | PACKPP(p0, p1, p2) (((p2)<<6)|((p1)<<3)|(p0)) |
Functions | |
| static void | pm2fb_detect (void) |
| static int | pm2fb_encode_fix (struct fb_fix_screeninfo *fix, const void *par, struct fb_info_gen *info) |
| static int | pm2fb_decode_var (const struct fb_var_screeninfo *var, void *par, struct fb_info_gen *info) |
| static int | pm2fb_encode_var (struct fb_var_screeninfo *var, const void *par, struct fb_info_gen *info) |
| static void | pm2fb_get_par (void *par, struct fb_info_gen *info) |
| static void | pm2fb_set_par (const void *par, struct fb_info_gen *info) |
| static int | pm2fb_getcolreg (unsigned regno, unsigned *red, unsigned *green, unsigned *blue, unsigned *transp, struct fb_info *info) |
| static int | pm2fb_setcolreg (unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) |
| static int | pm2fb_blank (int blank_mode, struct fb_info_gen *info) |
| static int | pm2fb_pan_display (const struct fb_var_screeninfo *var, struct fb_info_gen *info) |
| static void | pm2fb_set_disp (const void *par, struct display *disp, struct fb_info_gen *info) |
| static int | pm2fb_open (struct fb_info *info, int user) |
| static int | pm2fb_release (struct fb_info *info, int user) |
| static u32 | RD32 (unsigned char *base, s32 off) |
| static void | WR32 (unsigned char *base, s32 off, u32 v) |
| static u32 | pm2_RD (struct pm2fb_info *p, s32 off) |
| static void | pm2_WR (struct pm2fb_info *p, s32 off, u32 v) |
| static u32 | pm2_RDAC_RD (struct pm2fb_info *p, s32 idx) |
| static void | pm2_RDAC_WR (struct pm2fb_info *p, s32 idx, u32 v) |
| static u32 | pm2v_RDAC_RD (struct pm2fb_info *p, s32 idx) |
| static void | pm2v_RDAC_WR (struct pm2fb_info *p, s32 idx, u32 v) |
| static void | WAIT_FIFO (struct pm2fb_info *p, u32 a) |
| static u32 | partprod (u32 xres) |
| static u32 | to3264 (u32 timing, int bpp, int is64) |
| static u32 | from3264 (u32 timing, int bpp, int is64) |
| static void | pm2_mnp (u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) |
| static void | pm2v_mnp (u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) |
| static void | wait_pm2 (struct pm2fb_info *i) |
| static void | pm2_set_memclock (struct pm2fb_info *info, u32 clk) |
| static void | pm2_set_pixclock (struct pm2fb_info *info, u32 clk) |
| static void | clear_palette (struct pm2fb_info *p) |
| static void | set_color (struct pm2fb_info *p, unsigned char regno, unsigned char r, unsigned char g, unsigned char b) |
| static void | set_aperture (struct pm2fb_info *i, struct pm2fb_par *p) |
| static void | set_screen (struct pm2fb_info *i, struct pm2fb_par *p) |
| static void | pm2fb_pp_copy (struct pm2fb_info *i, s32 xsrc, s32 ysrc, s32 x, s32 y, s32 w, s32 h) |
| static void | pm2fb_block_op (struct pm2fb_info *i, int copy, s32 xsrc, s32 ysrc, s32 x, s32 y, s32 w, s32 h, u32 color) |
| static void | pm2fb_reset (struct pm2fb_info *p) |
| __initfunc (static int pm2fb_conf(struct pm2fb_info *p)) | |
| static void | pm2fb_pp_bmove (struct display *p, int sy, int sx, int dy, int dx, int height, int width) |
| static void | pm2fb_bmove (struct display *p, int sy, int sx, int dy, int dx, int height, int width) |
| static void | set_user_mode (struct pm2fb_info *i) |
| void | pm2fb_cleanup (struct fb_info *info) |
| int __init | pm2fb_init (void) |
| static void __init | pm2fb_mode_setup (char *options) |
| static void __init | pm2fb_font_setup (char *options) |
| void __init | pm2fb_setup (char *options, int *ints) |
Variables | |
| struct { | |
| char font [40] | |
| u32 flags | |
| pm2fb_par user_mode | |
| } | pm2fb_options |
| static char curblink | __initdata = 1 |
| static const char | permedia2_name [16] = "Permedia2" |
| static struct pm2fb_info | fb_info |
| struct { | |
| int(* detect )(struct pm2fb_info *) | |
| void(* init )(struct pm2fb_info *) | |
| void(* cleanup )(struct pm2fb_info *) | |
| char name [32] | |
| } | board_table [] |
| struct { | |
| u16 width | |
| u16 pp | |
| } | pp_table [] |
| static struct fbgen_hwswitch | pm2fb_hwswitch |
| static struct fb_ops | pm2fb_ops |
|
|
|
|
|
|
|
|
Definition at line 85 of file pm2fb.c. Referenced by pm2_set_memclock(), pm2_set_pixclock(), and wait_pm2(). |
|
|
Definition at line 86 of file pm2fb.c. Referenced by pm2_RDAC_RD(), pm2_RDAC_WR(), pm2fb_reset(), pm2v_RDAC_RD(), pm2v_RDAC_WR(), set_screen(), WAIT_FIFO(), and wait_pm2(). |
|
|
Definition at line 84 of file pm2fb.c. Referenced by clear_palette(), pm2_set_memclock(), pm2_set_pixclock(), pm2fb_block_op(), pm2fb_pp_copy(), set_color(), and set_screen(). |
|
|
|
|
|
Definition at line 71 of file pm2fb.c. Referenced by pm2fb_encode_var(). |
|
|
|
|
|
|
|
|
Definition at line 77 of file pm2fb.c. Referenced by __initfunc(). |
|
|
Definition at line 114 of file pm2fb.c. Referenced by pm2fb_setup(). |
|
|
Definition at line 117 of file pm2fb.c. Referenced by pm2fb_mode_setup(). |
|
|
Definition at line 116 of file pm2fb.c. Referenced by pm2fb_setup(). |
|
|
Definition at line 115 of file pm2fb.c. Referenced by pm2fb_setup(), and set_user_mode(). |
|
|
|
|
|
Definition at line 70 of file pm2fb.c. Referenced by pm2fb_decode_var(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 913 of file pm2fb.c. References board_table, DPRINTK, MMAP, and PM2_REGS_SIZE. |
|
|
Definition at line 636 of file pm2fb.c. References DEFW, i, pm2_WR(), PM2R_RD_PALETTE_DATA, PM2R_RD_PALETTE_WRITE_ADDRESS, and WAIT_FIFO(). Referenced by pm2fb_reset(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 502 of file pm2fb.c. Referenced by pm2fb_encode_var(). |
|
|
Definition at line 473 of file pm2fb.c. References DPRINTK, i, pp_table, and width. Referenced by pm2fb_decode_var(), and set_screen(). |
|
||||||||||||||||||||
|
Definition at line 522 of file pm2fb.c. References curr, f, m, n, p, PM2_REFERENCE_CLOCK, s32, and u32. Referenced by pm2_set_memclock(), and pm2_set_pixclock(). |
|
||||||||||||
|
Definition at line 405 of file pm2fb.c. References RD32(), and pm2fb_info::regions. Referenced by pm2_RDAC_RD(), pm2_set_memclock(), pm2_set_pixclock(), pm2fb_reset(), pm2v_RDAC_RD(), WAIT_FIFO(), and wait_pm2(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 415 of file pm2fb.c. References DEFRW, index, pm2_RD(), PM2_TYPE_PERMEDIA2, PM2_TYPE_PERMEDIA2V, pm2_WR(), PM2R_RD_INDEXED_DATA, PM2R_RD_PALETTE_WRITE_ADDRESS, PM2VR_RD_INDEX_LOW, PM2VR_RD_INDEXED_DATA, pm2fb_info::type, and xff. Referenced by pm2_set_memclock(), and pm2_set_pixclock(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 431 of file pm2fb.c. References DEFRW, index, PM2_TYPE_PERMEDIA2, PM2_TYPE_PERMEDIA2V, pm2_WR(), PM2R_RD_INDEXED_DATA, PM2R_RD_PALETTE_WRITE_ADDRESS, PM2VR_RD_INDEX_LOW, PM2VR_RD_INDEXED_DATA, pm2fb_info::type, and xff. Referenced by pm2_set_memclock(), pm2_set_pixclock(), pm2fb_reset(), and set_screen(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 585 of file pm2fb.c. References DEFR, DEFW, i, m, n, p, pm2_mnp(), pm2_RD(), pm2_RDAC_RD(), pm2_RDAC_WR(), PM2F_PLL_LOCKED, PM2I_RD_MEMORY_CLOCK_1, PM2I_RD_MEMORY_CLOCK_2, PM2I_RD_MEMORY_CLOCK_3, PM2I_RD_MEMORY_CLOCK_STATUS, PM2R_RD_INDEXED_DATA, and WAIT_FIFO(). Referenced by pm2fb_reset(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 604 of file pm2fb.c. References DEFR, DEFW, i, m, n, p, pm2_mnp(), pm2_RD(), pm2_RDAC_RD(), pm2_RDAC_WR(), PM2_TYPE_PERMEDIA2, PM2_TYPE_PERMEDIA2V, pm2_WR(), PM2F_PLL_LOCKED, PM2I_RD_PIXEL_CLOCK_A1, PM2I_RD_PIXEL_CLOCK_A2, PM2I_RD_PIXEL_CLOCK_A3, PM2I_RD_PIXEL_CLOCK_STATUS, PM2R_RD_INDEXED_DATA, pm2v_mnp(), pm2v_RDAC_WR(), PM2VI_RD_CLK0_FEEDBACK, PM2VI_RD_CLK0_POSTSCALE, PM2VI_RD_CLK0_PRESCALE, PM2VR_RD_INDEX_HIGH, pm2fb_info::type, and WAIT_FIFO(). Referenced by set_screen(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 410 of file pm2fb.c. References pm2fb_info::regions, and WR32(). Referenced by clear_palette(), pm2_RDAC_RD(), pm2_RDAC_WR(), pm2_set_pixclock(), pm2fb_blank(), pm2fb_block_op(), pm2fb_pan_display(), pm2fb_pp_copy(), pm2fb_reset(), pm2fb_set_par(), pm2v_RDAC_RD(), pm2v_RDAC_WR(), set_aperture(), set_color(), set_screen(), and wait_pm2(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 1155 of file pm2fb.c. References pm2fb_info::current_par, pm2fb_info::current_par_valid, pm2_WR(), PM2F_BLANK_LOW, PM2F_HSYNC_MASK, PM2F_VIDEO_ENABLE, PM2F_VSYNC_MASK, PM2R_VIDEO_CONTROL, u32, VESA_HSYNC_SUSPEND, VESA_NO_BLANKING, VESA_POWERDOWN, VESA_VSYNC_SUSPEND, pm2fb_par::video, and WAIT_FIFO(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 812 of file pm2fb.c. References DEFW, pm2_WR(), PM2F_CONFIG_FB_READ_SOURCE_ENABLE, PM2F_CONFIG_FB_WRITE_ENABLE, PM2F_RENDER_FASTFILL, PM2F_RENDER_RECTANGLE, PM2R_CONFIG, PM2R_FB_BLOCK_COLOR, PM2R_FB_PIXEL_OFFSET, PM2R_FB_SOURCE_DELTA, PM2R_RECTANGLE_ORIGIN, PM2R_RECTANGLE_SIZE, PM2R_RENDER, WAIT_FIFO(), wait_pm2(), and xfff. Referenced by pm2fb_bmove(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||
|
Definition at line 1220 of file pm2fb.c. References fontheight, fontwidth, fontwidthlog, and pm2fb_block_op(). Here is the call graph for this function: ![]() |
|
|
Definition at line 2034 of file pm2fb.c. References pm2fb_info::board, board_table, pm2fb_reset(), and unregister_framebuffer(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
|
|
|
||||||||||||||||
|
||||||||||||||||
|
|
Definition at line 2091 of file pm2fb.c. References pm2fb_options, and strncpy. Referenced by pm2fb_setup(). |
|
||||||||||||
|
Definition at line 1667 of file pm2fb.c. References pm2fb_info::current_par, pm2fb_info::current_par_valid, pm2fb_reset(), set_screen(), and set_user_mode(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||
|
Definition at line 1703 of file pm2fb.c. References pm2fb_info::palette. |
|
|
Definition at line 2044 of file pm2fb.c. References board_table, fb_info, fbgen_blank(), fbgen_do_set_var(), fbgen_get_var(), fbgen_install_cmap(), fbgen_set_disp(), fbgen_switch(), fbgen_update_var(), GET_FB_IDX, memcpy, memset, MOD_INC_USE_COUNT, permedia2_name, pm2fb_hwswitch, pm2fb_ops, pm2fb_options, pm2fb_reset(), printk, register_framebuffer(), SCROLL_YNOMOVE, strcpy, and u32. Here is the call graph for this function: ![]() |
|
|
Definition at line 2079 of file pm2fb.c. References memcpy, name, OPTF_USER, pm2fb_options, strcmp, and user_mode. Referenced by pm2fb_setup(). |
|
||||||||||||
|
Definition at line 1814 of file pm2fb.c. References MOD_INC_USE_COUNT. |
|
||||||||||||
|
Definition at line 1187 of file pm2fb.c. References pm2fb_par::base, pm2fb_info::current_par, pm2fb_info::current_par_valid, pm2fb_par::depth, EINVAL, pm2_WR(), PM2R_SCREEN_BASE, to3264(), WAIT_FIFO(), pm2fb_par::width, fb_var_screeninfo::xoffset, and fb_var_screeninfo::yoffset. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||
|
Definition at line 1200 of file pm2fb.c. References fontheight, fontwidth, fontwidthlog, and pm2fb_pp_copy(). Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||||||||||
|
Definition at line 784 of file pm2fb.c. References pm2fb_info::current_par, DEFW, |