diff options
| author | James Simmons <jsimmons@maxwell.earthlink.net> | 2002-12-04 01:43:55 -0800 |
|---|---|---|
| committer | James Simmons <jsimmons@maxwell.earthlink.net> | 2002-12-04 01:43:55 -0800 |
| commit | 102349c6eeacf31ccacf8e9c8f8819304da7a257 (patch) | |
| tree | ab221ebc5ac76025652b65a7181d31f1196b5009 /include | |
| parent | e50809fa145bea5cc5ad7ca7d733c1cb04abb8e2 (diff) | |
| parent | 4ff60c0faf5c0e00bcbb132eb0ece5bff9bd9252 (diff) | |
Merge
Diffstat (limited to 'include')
27 files changed, 967 insertions, 1564 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index 646e0eaa9fb3..37b441e6dfd8 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -40,6 +40,7 @@ struct consw { int (*con_switch)(struct vc_data *); int (*con_blank)(struct vc_data *, int); int (*con_font_op)(struct vc_data *, struct console_font_op *); + int (*con_resize)(struct vc_data *, unsigned int, unsigned int); int (*con_set_palette)(struct vc_data *, unsigned char *); int (*con_scrolldelta)(struct vc_data *, int); int (*con_set_origin)(struct vc_data *); diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index d86c16e96d11..153f71db1f38 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -27,6 +27,7 @@ struct vc_data { unsigned char vc_halfcolor; /* Color for half intensity mode */ unsigned short vc_complement_mask; /* [#] Xor mask for mouse pointer */ unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ + struct console_font_op vc_font; /* Current VC font set */ unsigned short vc_video_erase_char; /* Background erase character */ unsigned short vc_s_complement_mask; /* Saved mouse pointer mask */ unsigned int vc_x, vc_y; /* Cursor position */ diff --git a/include/linux/fb.h b/include/linux/fb.h index cda1c818f68c..a3031b2a13c4 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -3,6 +3,7 @@ #include <linux/tty.h> #include <asm/types.h> +#include <asm/io.h> /* Definitions of frame buffers */ @@ -17,6 +18,7 @@ #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 #define FBIOPAN_DISPLAY 0x4606 +#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) /* 0x4607-0x460B are defined below */ /* #define FBIOGET_MONITORSPEC 0x460C */ /* #define FBIOPUT_MONITORSPEC 0x460D */ @@ -208,7 +210,8 @@ struct fb_var_screeninfo { __u32 vsync_len; /* length of vertical sync */ __u32 sync; /* see FB_SYNC_* */ __u32 vmode; /* see FB_VMODE_* */ - __u32 reserved[6]; /* Reserved for future compatibility */ + __u32 rotate; /* angle we rotate counter clockwise */ + __u32 reserved[5]; /* Reserved for future compatibility */ }; struct fb_cmap { @@ -262,12 +265,12 @@ struct fb_vblank { #define ROP_XOR 1 struct fb_copyarea { - __u32 sx; /* screen-relative */ - __u32 sy; - __u32 width; - __u32 height; __u32 dx; __u32 dy; + __u32 width; + __u32 height; + __u32 sx; + __u32 sy; }; struct fb_fillrect { @@ -280,23 +283,76 @@ struct fb_fillrect { }; struct fb_image { - __u32 width; /* Size of image */ + __u32 dx; /* Where to place image */ + __u32 dy; + __u32 width; /* Size of image */ __u32 height; - __u16 dx; /* Where to place image */ - __u16 dy; - __u32 fg_color; /* Only used when a mono bitmap */ + __u32 fg_color; /* Only used when a mono bitmap */ __u32 bg_color; - __u8 depth; /* Dpeth of the image */ - char *data; /* Pointer to image data */ + __u8 depth; /* Depth of the image */ + char *data; /* Pointer to image data */ + struct fb_cmap cmap; /* color map info */ }; -#ifdef __KERNEL__ +/* + * hardware cursor control + */ -#if 1 /* to go away in 2.5.0 */ -extern int GET_FB_IDX(kdev_t rdev); -#else -#define GET_FB_IDX(node) (minor(node)) -#endif +#define FB_CUR_SETCUR 0x01 +#define FB_CUR_SETPOS 0x02 +#define FB_CUR_SETHOT 0x04 +#define FB_CUR_SETCMAP 0x08 +#define FB_CUR_SETSHAPE 0x10 +#define FB_CUR_SETDEST 0x20 +#define FB_CUR_SETSIZE 0x40 +#define FB_CUR_SETALL 0xFF + +struct fbcurpos { + __u16 x, y; +}; + +struct fb_cursor { + __u16 set; /* what to set */ + __u16 enable; /* cursor on/off */ + __u16 rop; /* bitop operation */ + char *mask; /* cursor mask bits */ + char *dest; /* destination */ + struct fbcurpos hot; /* cursor hot spot */ + struct fb_image image; /* Cursor image */ +}; + +/* VGA State Save and Restore */ +#define VGA_SAVE_FONT0 1 /* save/restore plane 2 fonts */ +#define VGA_SAVE_FONT1 2 /* save/restore plane 3 fonts */ +#define VGA_SAVE_TEXT 4 /* save/restore plane 0/1 fonts */ +#define VGA_SAVE_FONTS 7 /* save/restore all fonts */ +#define VGA_SAVE_MODE 8 /* save/restore video mode */ +#define VGA_SAVE_CMAP 16 /* save/restore color map/DAC */ + +struct fb_vgastate { + caddr_t vgabase; /* mmio base, if supported */ + __u32 flags; /* what state/s to save (see VGA_SAVE_*) */ + __u32 depth; /* current fb depth, not important */ + __u32 num_attr; /* number of att registers, 0 for default */ + __u32 num_crtc; /* number of crt registers, 0 for default */ + __u32 num_gfx; /* number of gfx registers, 0 for default */ + __u32 num_seq; /* number of seq registers, 0 for default */ + caddr_t fbbase; /* -- DO NOT ALTER STARTING HERE -- */ + __u8 *vga_font0; + __u8 *vga_font1; + __u8 *vga_text; + __u8 *vga_cmap; + __u8 *attr; + __u8 *crtc; + __u8 *gfx; + __u8 *seq; + __u8 misc; +}; + +extern int fb_save_vga(struct fb_vgastate *state); +extern int fb_restore_vga(struct fb_vgastate *state); + +#ifdef __KERNEL__ #include <linux/fs.h> #include <linux/poll.h> @@ -316,15 +372,9 @@ struct fb_ops { struct module *owner; int (*fb_open)(struct fb_info *info, int user); int (*fb_release)(struct fb_info *info, int user); - /* set settable parameters */ - int (*fb_set_var)(struct fb_var_screeninfo *var, int con, - struct fb_info *info); - /* get colormap */ - int (*fb_get_cmap)(struct fb_cmap *cmap, int kspc, int con, - struct fb_info *info); - /* set colormap */ - int (*fb_set_cmap)(struct fb_cmap *cmap, int kspc, int con, - struct fb_info *info); + /* For framebuffers with strange non linear layouts */ + ssize_t (*fb_read)(struct file *file, char *buf, size_t count, loff_t *ppos); + ssize_t (*fb_write)(struct file *file, const char *buf, size_t count, loff_t *ppos); /* checks var and creates a par based on it */ int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); /* set the video mode according to par */ @@ -335,26 +385,29 @@ struct fb_ops { /* blank display */ int (*fb_blank)(int blank, struct fb_info *info); /* pan display */ - int (*fb_pan_display)(struct fb_var_screeninfo *var, int con, struct fb_info *info); + int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info); /* draws a rectangle */ void (*fb_fillrect)(struct fb_info *info, struct fb_fillrect *rect); /* Copy data from area to another */ void (*fb_copyarea)(struct fb_info *info, struct fb_copyarea *region); /* Draws a image to the display */ void (*fb_imageblit)(struct fb_info *info, struct fb_image *image); + /* Draws cursor */ + int (*fb_cursor)(struct fb_info *info, struct fb_cursor *cursor); + /* Rotates the display */ + void (*fb_rotate)(struct fb_info *info, int angle); /* perform polling on fb device */ int (*fb_poll)(struct fb_info *info, poll_table *wait); + /* wait for blit idle, optional */ + int (*fb_sync)(struct fb_info *info); /* perform fb specific ioctl (optional) */ int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg, int con, struct fb_info *info); + unsigned long arg, struct fb_info *info); /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); - /* switch to/from raster image mode */ - int (*fb_rasterimg)(struct fb_info *info, int start); }; struct fb_info { - char modename[40]; /* default video mode */ kdev_t node; int flags; int open; /* Has this been open already ? */ @@ -362,18 +415,12 @@ struct fb_info { struct fb_var_screeninfo var; /* Current var */ struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ + struct fb_cursor cursor; /* Current cursor */ struct fb_cmap cmap; /* Current cmap */ struct fb_ops *fbops; char *screen_base; /* Virtual address */ - struct display *disp; /* initial display variable */ struct vc_data *display_fg; /* Console visible on this display */ int currcon; /* Current VC. */ - char fontname[40]; /* default font name */ - int (*changevar)(int); /* tell console var has changed */ - int (*switch_con)(int, struct fb_info*); - /* tell fb to switch consoles */ - int (*updatevar)(int, struct fb_info*); - /* tell fb to update the vars */ void *pseudo_palette; /* Fake palette of 16 colors and the cursor's color for non palette mode */ @@ -387,31 +434,53 @@ struct fb_info { #define FBINFO_FLAG_DEFAULT 0 #endif - /* - * `Generic' versions of the frame buffer device operations - */ +#if defined(__sparc__) -extern int gen_set_var(struct fb_var_screeninfo *var, int con, - struct fb_info *info); -extern int gen_get_cmap(struct fb_cmap *cmap, int kspc, int con, - struct fb_info *info); -extern int gen_set_cmap(struct fb_cmap *cmap, int kspc, int con, - struct fb_info *info); -extern int fb_pan_display(struct fb_var_screeninfo *var, int con, - struct fb_info *info); -extern void cfb_fillrect(struct fb_info *info, struct fb_fillrect *rect); -extern void cfb_copyarea(struct fb_info *info, struct fb_copyarea *region); -extern void cfb_imageblit(struct fb_info *info, struct fb_image *image); +/* We map all of our framebuffers such that big-endian accesses + * are what we want, so the following is sufficient. + */ + +#define fb_readb sbus_readb +#define fb_readw sbus_readw +#define fb_readl sbus_readl +#define fb_writeb sbus_writeb +#define fb_writew sbus_writew +#define fb_writel sbus_writel +#define fb_memset sbus_memset_io + +#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) + +#define fb_readb __raw_readb +#define fb_readw __raw_readw +#define fb_readl __raw_readl +#define fb_writeb __raw_writeb +#define fb_writew __raw_writew +#define fb_writel __raw_writel +#define fb_memset memset_io + +#else + +#define fb_readb(addr) (*(volatile u8 *) (addr)) +#define fb_readw(addr) (*(volatile u16 *) (addr)) +#define fb_readl(addr) (*(volatile u32 *) (addr)) +#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) +#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) +#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) +#define fb_memset memset + +#endif /* - * Helper functions + * `Generic' versions of the frame buffer device operations */ -extern void do_install_cmap(int con, struct fb_info *info); -extern int gen_update_var(int con, struct fb_info *info); +extern int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info); +extern int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); extern int fb_blank(int blank, struct fb_info *info); -extern int gen_switch(int con, struct fb_info *info); -extern void gen_set_disp(int con, struct fb_info *info); +extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); +extern void cfb_fillrect(struct fb_info *info, struct fb_fillrect *rect); +extern void cfb_copyarea(struct fb_info *info, struct fb_copyarea *area); +extern void cfb_imageblit(struct fb_info *info, struct fb_image *image); /* drivers/video/fbmem.c */ extern int register_framebuffer(struct fb_info *fb_info); @@ -427,12 +496,9 @@ extern int fbmon_dpms(const struct fb_info *fb_info); /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); +extern void fb_dealloc_cmap(struct fb_cmap *cmap); extern void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto); -extern int fb_get_cmap(struct fb_cmap *cmap, int kspc, - int (*getcolreg)(u_int, u_int *, u_int *, u_int *, - u_int *, struct fb_info *), - struct fb_info *fb_info); extern int fb_set_cmap(struct fb_cmap *cmap, int kspc, struct fb_info *fb_info); extern struct fb_cmap *fb_default_cmap(int len); extern void fb_invert_cmaps(void); @@ -491,54 +557,4 @@ extern int __init fb_find_mode(struct fb_var_screeninfo *var, #endif /* __KERNEL__ */ -#if 1 - -#define FBCMD_GET_CURRENTPAR 0xDEAD0005 -#define FBCMD_SET_CURRENTPAR 0xDEAD8005 - -#endif - - -#if 1 /* Preliminary */ - - /* - * Hardware Cursor - */ - -#define FBIOGET_FCURSORINFO 0x4607 -#define FBIOGET_VCURSORINFO 0x4608 -#define FBIOPUT_VCURSORINFO 0x4609 -#define FBIOGET_CURSORSTATE 0x460A -#define FBIOPUT_CURSORSTATE 0x460B - - -struct fb_fix_cursorinfo { - __u16 crsr_width; /* width and height of the cursor in */ - __u16 crsr_height; /* pixels (zero if no cursor) */ - __u16 crsr_xsize; /* cursor size in display pixels */ - __u16 crsr_ysize; - __u16 crsr_color1; /* colormap entry for cursor color1 */ - __u16 crsr_color2; /* colormap entry for cursor color2 */ -}; - -struct fb_var_cursorinfo { - __u16 width; - __u16 height; - __u16 xspot; - __u16 yspot; - __u8 data[1]; /* field with [height][width] */ -}; - -struct fb_cursorstate { - __s16 xoffset; - __s16 yoffset; - __u16 mode; -}; - -#define FB_CURSOR_OFF 0 -#define FB_CURSOR_ON 1 -#define FB_CURSOR_FLASH 2 - -#endif /* Preliminary */ - #endif /* _LINUX_FB_H */ diff --git a/include/linux/radeonfb.h b/include/linux/radeonfb.h new file mode 100644 index 000000000000..99bdf91bbc5d --- /dev/null +++ b/include/linux/radeonfb.h @@ -0,0 +1,15 @@ +#ifndef __LINUX_RADEONFB_H__ +#define __LINUX_RADEONFB_H__ + +#include <asm/ioctl.h> +#include <asm/types.h> + +#define ATY_RADEON_LCD_ON 0x00000001 +#define ATY_RADEON_CRT_ON 0x00000002 + + +#define FBIO_RADEON_GET_MIRROR _IOR('@', 3, sizeof(__u32*)) +#define FBIO_RADEON_SET_MIRROR _IOW('@', 4, sizeof(__u32*)) + +#endif + diff --git a/include/linux/sisfb.h b/include/linux/sisfb.h index 4d12567013ba..f45257643986 100644 --- a/include/linux/sisfb.h +++ b/include/linux/sisfb.h @@ -1,6 +1,11 @@ #ifndef _LINUX_SISFB #define _LINUX_SISFB +#include <linux/spinlock.h> + +#include <asm/ioctl.h> +#include <asm/types.h> + #define DISPTYPE_CRT1 0x00000008L #define DISPTYPE_CRT2 0x00000004L #define DISPTYPE_LCD 0x00000002L @@ -20,6 +25,7 @@ #define HASVB_303 0x40 #define HASVB_CHRONTEL 0x80 +/* TW: *Never* change the order of the following enum */ typedef enum _SIS_CHIP_TYPE { SIS_VGALegacy = 0, SIS_300, @@ -32,10 +38,17 @@ typedef enum _SIS_CHIP_TYPE { SIS_315PRO, SIS_640, SIS_740, - SIS_330, + SIS_650, + SIS_330, MAX_SIS_CHIP } SIS_CHIP_TYPE; +typedef enum _VGA_ENGINE { + UNKNOWN_VGA = 0, + SIS_300_VGA, + SIS_315_VGA, +} VGA_ENGINE; + typedef enum _TVTYPE { TVMODE_NTSC = 0, TVMODE_PAL, @@ -81,21 +94,25 @@ struct ap_data { }; struct video_info { - int chip_id; + int chip_id; unsigned int video_size; unsigned long video_base; - char *video_vbase; + char * video_vbase; unsigned long mmio_base; - char *mmio_vbase; + char * mmio_vbase; unsigned long vga_base; + unsigned long mtrr; + unsigned long heapstart; int video_bpp; + int video_cmap_len; int video_width; int video_height; int video_vwidth; int video_vheight; int org_x; int org_y; + int video_linelength; unsigned int refresh_rate; unsigned long disp_state; @@ -106,9 +123,42 @@ struct video_info { SIS_CHIP_TYPE chip; unsigned char revision_id; + unsigned short DstColor; /* TW: For 2d acceleration */ + unsigned long SiS310_AccelDepth; + unsigned long CommandReg; + + spinlock_t lockaccel; + char reserved[256]; }; + +/* TW: Addtional IOCTL for communication sisfb <> X driver */ +/* If changing this, vgatypes.h must also be changed (for X driver) */ + +/* TW: ioctl for identifying and giving some info (esp. memory heap start) */ +#define SISFB_GET_INFO _IOR('n',0xF8,sizeof(__u32)) + +/* TW: Structure argument for SISFB_GET_INFO ioctl */ +typedef struct _SISFB_INFO sisfb_info, *psisfb_info; + +struct _SISFB_INFO { + unsigned long sisfb_id; /* for identifying sisfb */ +#ifndef SISFB_ID +#define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */ +#endif + int chip_id; /* PCI ID of detected chip */ + int memory; /* video memory in KB which sisfb manages */ + int heapstart; /* heap start (= sisfb "mem" argument) in KB */ + unsigned char fbvidmode; /* current sisfb mode */ + + unsigned char sisfb_version; + unsigned char sisfb_revision; + unsigned char sisfb_patchlevel; + + char reserved[253]; /* for future use */ +}; + #ifdef __KERNEL__ extern struct video_info ivideo; diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 6d0b234f5a61..d611200c749d 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h @@ -10,6 +10,7 @@ #include <linux/vt.h> #include <linux/kd.h> #include <linux/tty.h> +#include <linux/console_struct.h> /* * Presently, a lot of graphics programs do not restore the contents of @@ -37,14 +38,9 @@ extern int kbd_rate(struct kbd_repeat *rep); /* console.c */ -struct console_font_op; - int vc_allocate(unsigned int console); int vc_cons_allocated(unsigned int console); -int vc_resize(unsigned int lines, unsigned int cols, - unsigned int first, unsigned int last); -#define vc_resize_all(l, c) vc_resize(l, c, 0, MAX_NR_CONSOLES-1) -#define vc_resize_con(l, c, x) vc_resize(l, c, x, x) +int vc_resize(int currcons, unsigned int cols, unsigned int lines); void vc_disallocate(unsigned int console); void reset_palette(int currcons); void set_palette(int currcons); diff --git a/include/video/fbcon-afb.h b/include/video/fbcon-afb.h deleted file mode 100644 index cbbcf0019ad9..000000000000 --- a/include/video/fbcon-afb.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Amiga bitplanes (afb) - */ - -#ifndef _VIDEO_FBCON_AFB_H -#define _VIDEO_FBCON_AFB_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_AFB_MODULE) -#define FBCON_HAS_AFB -#endif -#else -#if defined(CONFIG_FBCON_AFB) -#define FBCON_HAS_AFB -#endif -#endif - -extern struct display_switch fbcon_afb; -extern void fbcon_afb_setup(struct display *p); -extern void fbcon_afb_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_afb_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_afb_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_afb_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_afb_revc(struct display *p, int xx, int yy); - -#endif diff --git a/include/video/fbcon-cfb16.h b/include/video/fbcon-cfb16.h deleted file mode 100644 index 3ccc7d7cd535..000000000000 --- a/include/video/fbcon-cfb16.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * FBcon low-level driver for 16 bpp packed pixel (cfb16) - */ - -#ifndef _VIDEO_FBCON_CFB16_H -#define _VIDEO_FBCON_CFB16_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB16_MODULE) -#define FBCON_HAS_CFB16 -#endif -#else -#if defined(CONFIG_FBCON_CFB16) -#define FBCON_HAS_CFB16 -#endif -#endif - -extern struct display_switch fbcon_cfb16; -extern void fbcon_cfb16_setup(struct display *p); -extern void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_cfb16_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb16_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb16_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb16_revc(struct display *p, int xx, int yy); -extern void fbcon_cfb16_clear_margins(struct vc_data *conp, struct display *p, - int bottom_only); - -#endif /* _VIDEO_FBCON_CFB16_H */ diff --git a/include/video/fbcon-cfb2.h b/include/video/fbcon-cfb2.h deleted file mode 100644 index 5ba68a5f0a4f..000000000000 --- a/include/video/fbcon-cfb2.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for 2 bpp packed pixel (cfb2) - */ - -#ifndef _VIDEO_FBCON_CFB2_H -#define _VIDEO_FBCON_CFB2_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB2) || defined(CONFIG_FBCON_CFB2_MODULE) -#define FBCON_HAS_CFB2 -#endif -#else -#if defined(CONFIG_FBCON_CFB2) -#define FBCON_HAS_CFB2 -#endif -#endif - -extern struct display_switch fbcon_cfb2; -extern void fbcon_cfb2_setup(struct display *p); -extern void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_cfb2_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb2_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb2_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb2_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_CFB2_H */ diff --git a/include/video/fbcon-cfb24.h b/include/video/fbcon-cfb24.h deleted file mode 100644 index 77442e22d2af..000000000000 --- a/include/video/fbcon-cfb24.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * FBcon low-level driver for 24 bpp packed pixel (cfb24) - */ - -#ifndef _VIDEO_FBCON_CFB24_H -#define _VIDEO_FBCON_CFB24_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB24) || defined(CONFIG_FBCON_CFB24_MODULE) -#define FBCON_HAS_CFB24 -#endif -#else -#if defined(CONFIG_FBCON_CFB24) -#define FBCON_HAS_CFB24 -#endif -#endif - -extern struct display_switch fbcon_cfb24; -extern void fbcon_cfb24_setup(struct display *p); -extern void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_cfb24_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb24_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb24_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb24_revc(struct display *p, int xx, int yy); -extern void fbcon_cfb24_clear_margins(struct vc_data *conp, struct display *p, - int bottom_only); - -#endif /* _VIDEO_FBCON_CFB24_H */ diff --git a/include/video/fbcon-cfb32.h b/include/video/fbcon-cfb32.h deleted file mode 100644 index abac3baa2f37..000000000000 --- a/include/video/fbcon-cfb32.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * FBcon low-level driver for 32 bpp packed pixel (cfb32) - */ - -#ifndef _VIDEO_FBCON_CFB32_H -#define _VIDEO_FBCON_CFB32_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FBCON_CFB32_MODULE) -#define FBCON_HAS_CFB32 -#endif -#else -#if defined(CONFIG_FBCON_CFB32) -#define FBCON_HAS_CFB32 -#endif -#endif - -extern struct display_switch fbcon_cfb32; -extern void fbcon_cfb32_setup(struct display *p); -extern void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_cfb32_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb32_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb32_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb32_revc(struct display *p, int xx, int yy); -extern void fbcon_cfb32_clear_margins(struct vc_data *conp, struct display *p, - int bottom_only); - -#endif /* _VIDEO_FBCON_CFB32_H */ diff --git a/include/video/fbcon-cfb4.h b/include/video/fbcon-cfb4.h deleted file mode 100644 index 963befe5ca1e..000000000000 --- a/include/video/fbcon-cfb4.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for 4 bpp packed pixel (cfb4) - */ - -#ifndef _VIDEO_FBCON_CFB4_H -#define _VIDEO_FBCON_CFB4_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB4) || defined(CONFIG_FBCON_CFB4_MODULE) -#define FBCON_HAS_CFB4 -#endif -#else -#if defined(CONFIG_FBCON_CFB4) -#define FBCON_HAS_CFB4 -#endif -#endif - -extern struct display_switch fbcon_cfb4; -extern void fbcon_cfb4_setup(struct display *p); -extern void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_cfb4_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb4_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb4_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb4_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_CFB4_H */ diff --git a/include/video/fbcon-cfb8.h b/include/video/fbcon-cfb8.h deleted file mode 100644 index 96189d0acd27..000000000000 --- a/include/video/fbcon-cfb8.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * FBcon low-level driver for 8 bpp packed pixel (cfb8) - */ - -#ifndef _VIDEO_FBCON_CFB8_H -#define _VIDEO_FBCON_CFB8_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FBCON_CFB8_MODULE) -#define FBCON_HAS_CFB8 -#endif -#else -#if defined(CONFIG_FBCON_CFB8) -#define FBCON_HAS_CFB8 -#endif -#endif - -extern struct display_switch fbcon_cfb8; -extern void fbcon_cfb8_setup(struct display *p); -extern void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_cfb8_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_cfb8_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_cfb8_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_cfb8_revc(struct display *p, int xx, int yy); -extern void fbcon_cfb8_clear_margins(struct vc_data *conp, struct display *p, - int bottom_only); - -#endif /* _VIDEO_FBCON_CFB8_H */ diff --git a/include/video/fbcon-hga.h b/include/video/fbcon-hga.h deleted file mode 100644 index 695ab443f2a4..000000000000 --- a/include/video/fbcon-hga.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Hercules Graphics Adaptor (hga) - */ - -#ifndef _VIDEO_FBCON_HGA_H -#define _VIDEO_FBCON_HGA_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_HGA) || defined(CONFIG_FBCON_HGA_MODULE) -#define FBCON_HAS_HGA -#endif -#else -#if defined(CONFIG_FBCON_HGA) -#define FBCON_HAS_HGA -#endif -#endif - -extern struct display_switch fbcon_hga; -extern void fbcon_hga_setup(struct display *p); -extern void fbcon_hga_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_hga_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_hga_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_hga_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_hga_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_HGA_H */ diff --git a/include/video/fbcon-ilbm.h b/include/video/fbcon-ilbm.h deleted file mode 100644 index 80f9707f679d..000000000000 --- a/include/video/fbcon-ilbm.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Amiga interleaved bitplanes (ilbm) - */ - -#ifndef _VIDEO_FBCON_ILBM_H -#define _VIDEO_FBCON_ILBM_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_ILBM_MODULE) -#define FBCON_HAS_ILBM -#endif -#else -#if defined(CONFIG_FBCON_ILBM) -#define FBCON_HAS_ILBM -#endif -#endif - -extern struct display_switch fbcon_ilbm; -extern void fbcon_ilbm_setup(struct display *p); -extern void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_ilbm_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_ilbm_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_ilbm_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_ILBM_H */ diff --git a/include/video/fbcon-iplan2p2.h b/include/video/fbcon-iplan2p2.h deleted file mode 100644 index b72868035317..000000000000 --- a/include/video/fbcon-iplan2p2.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Atari interleaved bitplanes (2 planes) (iplan2p2) - */ - -#ifndef _VIDEO_FBCON_IPLAN2P2_H -#define _VIDEO_FBCON_IPLAN2P2_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P2_MODULE) -#define FBCON_HAS_IPLAN2P2 -#endif -#else -#if defined(CONFIG_FBCON_IPLAN2P2) -#define FBCON_HAS_IPLAN2P2 -#endif -#endif - -extern struct display_switch fbcon_iplan2p2; -extern void fbcon_iplan2p2_setup(struct display *p); -extern void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p, - int sy, int sx, int height, int width); -extern void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_iplan2p2_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_IPLAN2P2_H */ diff --git a/include/video/fbcon-iplan2p4.h b/include/video/fbcon-iplan2p4.h deleted file mode 100644 index a7012020421c..000000000000 --- a/include/video/fbcon-iplan2p4.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Atari interleaved bitplanes (4 planes) (iplan2p4) - */ - -#ifndef _VIDEO_FBCON_IPLAN2P4_H -#define _VIDEO_FBCON_IPLAN2P4_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_IPLAN2P4) || defined(CONFIG_FBCON_IPLAN2P4_MODULE) -#define FBCON_HAS_IPLAN2P4 -#endif -#else -#if defined(CONFIG_FBCON_IPLAN2P4) -#define FBCON_HAS_IPLAN2P4 -#endif -#endif - -extern struct display_switch fbcon_iplan2p4; -extern void fbcon_iplan2p4_setup(struct display *p); -extern void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p, - int sy, int sx, int height, int width); -extern void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_iplan2p4_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_IPLAN2P4_H */ diff --git a/include/video/fbcon-iplan2p8.h b/include/video/fbcon-iplan2p8.h deleted file mode 100644 index 6691e18d6e26..000000000000 --- a/include/video/fbcon-iplan2p8.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Atari interleaved bitplanes (8 planes) (iplan2p8) - */ - -#ifndef _VIDEO_FBCON_IPLAN2P8_H -#define _VIDEO_FBCON_IPLAN2P8_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_IPLAN2P8) || defined(CONFIG_FBCON_IPLAN2P8_MODULE) -#define FBCON_HAS_IPLAN2P8 -#endif -#else -#if defined(CONFIG_FBCON_IPLAN2P8) -#define FBCON_HAS_IPLAN2P8 -#endif -#endif - -extern struct display_switch fbcon_iplan2p8; -extern void fbcon_iplan2p8_setup(struct display *p); -extern void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, - int dx, int height, int width); -extern void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p, - int sy, int sx, int height, int width); -extern void fbcon_iplan2p8_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_iplan2p8_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_IPLAN2P8_H */ diff --git a/include/video/fbcon-mac.h b/include/video/fbcon-mac.h deleted file mode 100644 index b275ff91b824..000000000000 --- a/include/video/fbcon-mac.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Mac variable bpp packed pixels (mac) - */ - -#ifndef _VIDEO_FBCON_MAC_H -#define _VIDEO_FBCON_MAC_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_MAC) || defined(CONFIG_FBCON_MAC_MODULE) -#define FBCON_HAS_MAC -#endif -#else -#if defined(CONFIG_FBCON_MAC) -#define FBCON_HAS_MAC -#endif -#endif - -extern struct display_switch fbcon_mac; -extern void fbcon_mac_setup(struct display *p); -extern void fbcon_mac_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_mac_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_mac_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_mac_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_mac_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_MAC_H */ diff --git a/include/video/fbcon-mfb.h b/include/video/fbcon-mfb.h deleted file mode 100644 index f74e63da22a9..000000000000 --- a/include/video/fbcon-mfb.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for Monochrome (mfb) - */ - -#ifndef _VIDEO_FBCON_MFB_H -#define _VIDEO_FBCON_MFB_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_MFB) || defined(CONFIG_FBCON_MFB_MODULE) -#define FBCON_HAS_MFB -#endif -#else -#if defined(CONFIG_FBCON_MFB) -#define FBCON_HAS_MFB -#endif -#endif - -extern struct display_switch fbcon_mfb; -extern void fbcon_mfb_setup(struct display *p); -extern void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_mfb_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_mfb_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_mfb_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_MFB_H */ diff --git a/include/video/fbcon-vga-planes.h b/include/video/fbcon-vga-planes.h deleted file mode 100644 index 31578d41c58f..000000000000 --- a/include/video/fbcon-vga-planes.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * FBcon low-level driver for VGA 4-plane modes - */ - -#ifndef _VIDEO_FBCON_VGA_PLANES_H -#define _VIDEO_FBCON_VGA_PLANES_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_VGA_PLANES) || defined(CONFIG_FBCON_VGA_PLANES_MODULE) -#define FBCON_HAS_VGA_PLANES -#endif -#else -#if defined(CONFIG_FBCON_VGA_PLANES) -#define FBCON_HAS_VGA_PLANES -#endif -#endif - -extern struct display_switch fbcon_vga_planes; -extern struct display_switch fbcon_ega_planes; -extern void fbcon_vga_planes_setup(struct display *p); -extern void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_vga_planes_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_vga_planes_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_ega_planes_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_vga_planes_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_VGA_PLANES_H */ diff --git a/include/video/fbcon-vga.h b/include/video/fbcon-vga.h deleted file mode 100644 index e7c7b2db0ce7..000000000000 --- a/include/video/fbcon-vga.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * FBcon low-level driver for VGA characters/attributes - */ - -#ifndef _VIDEO_FBCON_VGA_H -#define _VIDEO_FBCON_VGA_H - -#include <linux/config.h> - -#ifdef MODULE -#if defined(CONFIG_FBCON_VGA) || defined(CONFIG_FBCON_VGA_MODULE) -#define FBCON_HAS_VGA -#endif -#else -#if defined(CONFIG_FBCON_VGA) -#define FBCON_HAS_VGA -#endif -#endif - -extern struct display_switch fbcon_vga; -extern void fbcon_vga_setup(struct display *p); -extern void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); -extern void fbcon_vga_clear(struct vc_data *conp, struct display *p, int sy, - int sx, int height, int width); -extern void fbcon_vga_putc(struct vc_data *conp, struct display *p, int c, - int yy, int xx); -extern void fbcon_vga_putcs(struct vc_data *conp, struct display *p, - const unsigned short *s, int count, int yy, int xx); -extern void fbcon_vga_revc(struct display *p, int xx, int yy); - -#endif /* _VIDEO_FBCON_VGA_H */ diff --git a/include/video/fbcon.h b/include/video/fbcon.h deleted file mode 100644 index c28fea0c10c3..000000000000 --- a/include/video/fbcon.h +++ /dev/null @@ -1,795 +0,0 @@ -/* - * linux/drivers/video/fbcon.h -- Low level frame buffer based console driver - * - * Copyright (C) 1997 Geert Uytterhoeven - * - * 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. - */ - -#ifndef _VIDEO_FBCON_H -#define _VIDEO_FBCON_H - -#include <linux/config.h> -#include <linux/types.h> -#include <linux/console_struct.h> -#include <linux/vt_buffer.h> - -#include <asm/io.h> - - - /* - * `switch' for the Low Level Operations - */ - -struct display_switch { - void (*setup)(struct display *p); - void (*bmove)(struct display *p, int sy, int sx, int dy, int dx, - int height, int width); - /* for clear, conp may be NULL, which means use a blanking (black) color */ - void (*clear)(struct vc_data *conp, struct display *p, int sy, int sx, - int height, int width); - void (*putc)(struct vc_data *conp, struct display *p, int c, int yy, - int xx); - void (*putcs)(struct vc_data *conp, struct display *p, const unsigned short *s, - int count, int yy, int xx); - void (*revc)(struct display *p, int xx, int yy); - void (*cursor)(struct display *p, int mode, int xx, int yy); - int (*set_font)(struct display *p, int width, int height); - void (*clear_margins)(struct vc_data *conp, struct display *p, - int bottom_only); - unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */ -}; - -extern struct display_switch fbcon_dummy; - - /* - * This is the interface between the low-level console driver and the - * low-level frame buffer device - */ - -struct display { - /* Filled in by the frame buffer device */ - - struct fb_var_screeninfo var; /* variable infos. yoffset and vmode */ - /* are updated by fbcon.c */ - struct fb_cmap cmap; /* colormap */ - u_short can_soft_blank; /* zero if no hardware blanking */ - u_short inverse; /* != 0 text black on white as default */ - struct display_switch *dispsw; /* low level operations */ - void *dispsw_data; /* optional dispsw helper data */ - -#if 0 - struct fb_fix_cursorinfo fcrsr; - struct fb_var_cursorinfo *vcrsr; - struct fb_cursorstate crsrstate; -#endif - - /* Filled in by the low-level console driver */ - struct vc_data *conp; /* pointer to console data */ - struct fb_info *fb_info; /* frame buffer for this console */ - int vrows; /* number of virtual rows */ - unsigned short cursor_x; /* current cursor position */ - unsigned short cursor_y; - int fgcol; /* text colors */ - int bgcol; - u_long next_line; /* offset to one line below */ - u_long next_plane; /* offset to next plane */ - u_char *fontdata; /* Font associated to this display */ - unsigned short _fontheightlog; - unsigned short _fontwidthlog; - unsigned short _fontheight; - unsigned short _fontwidth; - int userfont; /* != 0 if fontdata kmalloc()ed */ - u_short scrollmode; /* Scroll Method */ - short yscroll; /* Hardware scrolling */ - unsigned char fgshift, bgshift; - unsigned short charmask; /* 0xff or 0x1ff */ -}; - -/* drivers/video/fbcon.c */ -extern struct display fb_display[MAX_NR_CONSOLES]; -extern char con2fb_map[MAX_NR_CONSOLES]; -extern int PROC_CONSOLE(const struct fb_info *info); -extern void set_con2fb_map(int unit, int newidx); -extern int set_all_vcs(int fbidx, struct fb_ops *fb, - struct fb_var_screeninfo *var, struct fb_info *info); - -#define fontheight(p) ((p)->_fontheight) -#define fontheightlog(p) ((p)->_fontheightlog) - -#ifdef CONFIG_FBCON_FONTWIDTH8_ONLY - -/* fontwidth w is supported by dispsw */ -#define FONTWIDTH(w) (1 << ((8) - 1)) -/* fontwidths w1-w2 inclusive are supported by dispsw */ -#define FONTWIDTHRANGE(w1,w2) FONTWIDTH(8) - -#define fontwidth(p) (8) -#define fontwidthlog(p) (0) - -#else - -/* fontwidth w is supported by dispsw */ -#define FONTWIDTH(w) (1 << ((w) - 1)) -/* fontwidths w1-w2 inclusive are supported by dispsw */ -#define FONTWIDTHRANGE(w1,w2) (FONTWIDTH(w2+1) - FONTWIDTH(w1)) - -#define fontwidth(p) ((p)->_fontwidth) -#define fontwidthlog(p) ((p)->_fontwidthlog) - -#endif - - /* - * Attribute Decoding - */ - -/* Color */ -#define attr_fgcol(p,s) \ - (((s) >> ((p)->fgshift)) & 0x0f) -#define attr_bgcol(p,s) \ - (((s) >> ((p)->bgshift)) & 0x0f) -#define attr_bgcol_ec(p,conp) \ - ((conp) ? (((conp)->vc_video_erase_char >> ((p)->bgshift)) & 0x0f) : 0) -#define attr_fgcol_ec(p,vc) \ - ((vc) ? (((vc)->vc_video_erase_char >> ((p)->fgshift)) & 0x0f) : 0) - -/* Monochrome */ -#define attr_bold(p,s) \ - ((s) & 0x200) -#define attr_reverse(p,s) \ - (((s) & 0x800) ^ ((p)->inverse ? 0x800 : 0)) -#define attr_underline(p,s) \ - ((s) & 0x400) -#define attr_blink(p,s) \ - ((s) & 0x8000) - - /* - * Scroll Method - */ - -/* Internal flags */ -#define __SCROLL_YPAN 0x001 -#define __SCROLL_YWRAP 0x002 -#define __SCROLL_YMOVE 0x003 -#define __SCROLL_YREDRAW 0x004 -#define __SCROLL_YMASK 0x00f -#define __SCROLL_YFIXED 0x010 -#define __SCROLL_YNOMOVE 0x020 -#define __SCROLL_YPANREDRAW 0x040 -#define __SCROLL_YNOPARTIAL 0x080 - -/* Only these should be used by the drivers */ -/* Which one should you use? If you have a fast card and slow bus, - then probably just 0 to indicate fbcon should choose between - YWRAP/YPAN+MOVE/YMOVE. On the other side, if you have a fast bus - and even better if your card can do fonting (1->8/32bit painting), - you should consider either SCROLL_YREDRAW (if your card is - able to do neither YPAN/YWRAP), or SCROLL_YNOMOVE. - The best is to test it with some real life scrolling (usually, not - all lines on the screen are filled completely with non-space characters, - and REDRAW performs much better on such lines, so don't cat a file - with every line covering all screen columns, it would not be the right - benchmark). - */ -#define SCROLL_YREDRAW (__SCROLL_YFIXED|__SCROLL_YREDRAW) -#define SCROLL_YNOMOVE (__SCROLL_YNOMOVE|__SCROLL_YPANREDRAW) - -/* SCROLL_YNOPARTIAL, used in combination with the above, is for video - cards which can not handle using panning to scroll a portion of the - screen without excessive flicker. Panning will only be used for - whole screens. - */ -/* Namespace consistency */ -#define SCROLL_YNOPARTIAL __SCROLL_YNOPARTIAL - - -#if defined(__sparc__) - -/* We map all of our framebuffers such that big-endian accesses - * are what we want, so the following is sufficient. - */ - -#define fb_readb sbus_readb -#define fb_readw sbus_readw -#define fb_readl sbus_readl -#define fb_writeb sbus_writeb -#define fb_writew sbus_writew -#define fb_writel sbus_writel -#define fb_memset sbus_memset_io - -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) - -#define fb_readb __raw_readb -#define fb_readw __raw_readw -#define fb_readl __raw_readl -#define fb_writeb __raw_writeb -#define fb_writew __raw_writew -#define fb_writel __raw_writel -#define fb_memset memset_io - -#else - -#define fb_readb(addr) (*(volatile u8 *) (addr)) -#define fb_readw(addr) (*(volatile u16 *) (addr)) -#define fb_readl(addr) (*(volatile u32 *) (addr)) -#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) -#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) -#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) -#define fb_memset memset - -#endif - - -extern void fbcon_redraw_clear(struct vc_data *, struct display *, int, int, int, int); -extern void fbcon_redraw_bmove(struct display *, int, int, int, int, int, int); - - -/* ================================================================= */ -/* Utility Assembler Functions */ -/* ================================================================= */ - - -#if defined(__mc68000__) - -/* ====================================================================== */ - -/* Those of a delicate disposition might like to skip the next couple of - * pages. - * - * These functions are drop in replacements for memmove and - * memset(_, 0, _). However their five instances add at least a kilobyte - * to the object file. You have been warned. - * - * Not a great fan of assembler for the sake of it, but I think - * that these routines are at least 10 times faster than their C - * equivalents for large blits, and that's important to the lowest level of - * a graphics driver. Question is whether some scheme with the blitter - * would be faster. I suspect not for simple text system - not much - * asynchrony. - * - * Code is very simple, just gruesome expansion. Basic strategy is to - * increase data moved/cleared at each step to 16 bytes to reduce - * instruction per data move overhead. movem might be faster still - * For more than 15 bytes, we try to align the write direction on a - * longword boundary to get maximum speed. This is even more gruesome. - * Unaligned read/write used requires 68020+ - think this is a problem? - * - * Sorry! - */ - - -/* ++roman: I've optimized Robert's original versions in some minor - * aspects, e.g. moveq instead of movel, let gcc choose the registers, - * use movem in some places... - * For other modes than 1 plane, lots of more such assembler functions - * were needed (e.g. the ones using movep or expanding color values). - */ - -/* ++andreas: more optimizations: - subl #65536,d0 replaced by clrw d0; subql #1,d0 for dbcc - addal is faster than addaw - movep is rather expensive compared to ordinary move's - some functions rewritten in C for clarity, no speed loss */ - -static __inline__ void *fb_memclear_small(void *s, size_t count) -{ - if (!count) - return(0); - - __asm__ __volatile__( - "lsrl #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movew %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t" - "1:" - : "=a" (s), "=d" (count) - : "d" (0), "0" ((char *)s+count), "1" (count) - ); - __asm__ __volatile__( - "subql #1,%1 ; jcs 3f\n\t" - "movel %2,%%d4; movel %2,%%d5; movel %2,%%d6\n\t" - "2: moveml %2/%%d4/%%d5/%%d6,%0@-\n\t" - "dbra %1,2b\n\t" - "3:" - : "=a" (s), "=d" (count) - : "d" (0), "0" (s), "1" (count) - : "d4", "d5", "d6" - ); - - return(0); -} - - -static __inline__ void *fb_memclear(void *s, size_t count) -{ - if (!count) - return(0); - - if (count < 16) { - __asm__ __volatile__( - "lsrl #1,%1 ; jcc 1f ; clrb %0@+\n\t" - "1: lsrl #1,%1 ; jcc 1f ; clrw %0@+\n\t" - "1: lsrl #1,%1 ; jcc 1f ; clrl %0@+\n\t" - "1: lsrl #1,%1 ; jcc 1f ; clrl %0@+ ; clrl %0@+\n\t" - "1:" - : "=a" (s), "=d" (count) - : "0" (s), "1" (count) - ); - } else { - long tmp; - __asm__ __volatile__( - "movel %1,%2\n\t" - "lsrl #1,%2 ; jcc 1f ; clrb %0@+ ; subqw #1,%1\n\t" - "lsrl #1,%2 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/ - "clrw %0@+ ; subqw #2,%1 ; jra 2f\n\t" - "1: lsrl #1,%2 ; jcc 2f\n\t" - "clrw %0@+ ; subqw #2,%1\n\t" - "2: movew %1,%2; lsrl #2,%1 ; jeq 6f\n\t" - "lsrl #1,%1 ; jcc 3f ; clrl %0@+\n\t" - "3: lsrl #1,%1 ; jcc 4f ; clrl %0@+ ; clrl %0@+\n\t" - "4: subql #1,%1 ; jcs 6f\n\t" - "5: clrl %0@+; clrl %0@+ ; clrl %0@+ ; clrl %0@+\n\t" - "dbra %1,5b ; clrw %1; subql #1,%1; jcc 5b\n\t" - "6: movew %2,%1; btst #1,%1 ; jeq 7f ; clrw %0@+\n\t" - "7: ; btst #0,%1 ; jeq 8f ; clrb %0@+\n\t" - "8:" - : "=a" (s), "=d" (count), "=d" (tmp) - : "0" (s), "1" (count) - ); - } - - return(0); -} - - -static __inline__ void *fb_memset255(void *s, size_t count) -{ - if (!count) - return(0); - - __asm__ __volatile__( - "lsrl #1,%1 ; jcc 1f ; moveb %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movew %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@-\n\t" - "1: lsrl #1,%1 ; jcc 1f ; movel %2,%0@- ; movel %2,%0@-\n\t" - "1:" - : "=a" (s), "=d" (count) - : "d" (-1), "0" ((char *)s+count), "1" (count) - ); - __asm__ __volatile__( - "subql #1,%1 ; jcs 3f\n\t" - "movel %2,%%d4; movel %2,%%d5; movel %2,%%d6\n\t" - "2: moveml %2/%%d4/%%d5/%%d6,%0@-\n\t" - "dbra %1,2b\n\t" - "3:" - : "=a" (s), "=d" (count) - : "d" (-1), "0" (s), "1" (count) - : "d4", "d5", "d6" - ); - - return(0); -} - - -static __inline__ void *fb_memmove(void *d, const void *s, size_t count) -{ - if (d < s) { - if (count < 16) { - __asm__ __volatile__( - "lsrl #1,%2 ; jcc 1f ; moveb %1@+,%0@+\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movew %1@+,%0@+\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movel %1@+,%0@+\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t" - "1:" - : "=a" (d), "=a" (s), "=d" (count) - : "0" (d), "1" (s), "2" (count) - ); - } else { - long tmp; - __asm__ __volatile__( - "movel %0,%3\n\t" - "lsrl #1,%3 ; jcc 1f ; moveb %1@+,%0@+ ; subqw #1,%2\n\t" - "lsrl #1,%3 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/ - "movew %1@+,%0@+ ; subqw #2,%2 ; jra 2f\n\t" - "1: lsrl #1,%3 ; jcc 2f\n\t" - "movew %1@+,%0@+ ; subqw #2,%2\n\t" - "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t" - "lsrl #1,%2 ; jcc 3f ; movel %1@+,%0@+\n\t" - "3: lsrl #1,%2 ; jcc 4f ; movel %1@+,%0@+ ; movel %1@+,%0@+\n\t" - "4: subql #1,%2 ; jcs 6f\n\t" - "5: movel %1@+,%0@+;movel %1@+,%0@+\n\t" - "movel %1@+,%0@+;movel %1@+,%0@+\n\t" - "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t" - "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@+,%0@+\n\t" - "7: ; btst #0,%2 ; jeq 8f ; moveb %1@+,%0@+\n\t" - "8:" - : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp) - : "0" (d), "1" (s), "2" (count) - ); - } - } else { - if (count < 16) { - __asm__ __volatile__( - "lsrl #1,%2 ; jcc 1f ; moveb %1@-,%0@-\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movew %1@-,%0@-\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movel %1@-,%0@-\n\t" - "1: lsrl #1,%2 ; jcc 1f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t" - "1:" - : "=a" (d), "=a" (s), "=d" (count) - : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count) - ); - } else { - long tmp; - __asm__ __volatile__( - "movel %0,%3\n\t" - "lsrl #1,%3 ; jcc 1f ; moveb %1@-,%0@- ; subqw #1,%2\n\t" - "lsrl #1,%3 ; jcs 2f\n\t" /* %0 increased=>bit 2 switched*/ - "movew %1@-,%0@- ; subqw #2,%2 ; jra 2f\n\t" - "1: lsrl #1,%3 ; jcc 2f\n\t" - "movew %1@-,%0@- ; subqw #2,%2\n\t" - "2: movew %2,%-; lsrl #2,%2 ; jeq 6f\n\t" - "lsrl #1,%2 ; jcc 3f ; movel %1@-,%0@-\n\t" - "3: lsrl #1,%2 ; jcc 4f ; movel %1@-,%0@- ; movel %1@-,%0@-\n\t" - "4: subql #1,%2 ; jcs 6f\n\t" - "5: movel %1@-,%0@-;movel %1@-,%0@-\n\t" - "movel %1@-,%0@-;movel %1@-,%0@-\n\t" - "dbra %2,5b ; clrw %2; subql #1,%2; jcc 5b\n\t" - "6: movew %+,%2; btst #1,%2 ; jeq 7f ; movew %1@-,%0@-\n\t" - "7: ; btst #0,%2 ; jeq 8f ; moveb %1@-,%0@-\n\t" - "8:" - : "=a" (d), "=a" (s), "=d" (count), "=d" (tmp) - : "0" ((char *) d + count), "1" ((char *) s + count), "2" (count) - ); - } - } - - return(0); -} - - -/* ++andreas: Simple and fast version of memmove, assumes size is - divisible by 16, suitable for moving the whole screen bitplane */ -static __inline__ void fast_memmove(char *dst, const char *src, size_t size) -{ - if (!size) - return; - if (dst < src) - __asm__ __volatile__ - ("1:" - " moveml %0@+,%/d0/%/d1/%/a0/%/a1\n" - " moveml %/d0/%/d1/%/a0/%/a1,%1@\n" - " addql #8,%1; addql #8,%1\n" - " dbra %2,1b\n" - " clrw %2; subql #1,%2\n" - " jcc 1b" - : "=a" (src), "=a" (dst), "=d" (size) - : "0" (src), "1" (dst), "2" (size / 16 - 1) - : "d0", "d1", "a0", "a1", "memory"); - else - __asm__ __volatile__ - ("1:" - " subql #8,%0; subql #8,%0\n" - " moveml %0@,%/d0/%/d1/%/a0/%/a1\n" - " moveml %/d0/%/d1/%/a0/%/a1,%1@-\n" - " dbra %2,1b\n" - " clrw %2; subql #1,%2\n" - " jcc 1b" - : "=a" (src), "=a" (dst), "=d" (size) - : "0" (src + size), "1" (dst + size), "2" (size / 16 - 1) - : "d0", "d1", "a0", "a1", "memory"); -} - -#elif defined(CONFIG_SUN4) - -/* You may think that I'm crazy and that I should use generic - routines. No, I'm not: sun4's framebuffer crashes if we std - into it, so we cannot use memset. */ - -static __inline__ void *sun4_memset(void *s, char val, size_t count) -{ - int i; - for(i=0; i<count;i++) - ((char *) s) [i] = val; - return s; -} - -static __inline__ void *fb_memset255(void *s, size_t count) -{ - return sun4_memset(s, 255, count); -} - -static __inline__ void *fb_memclear(void *s, size_t count) -{ - return sun4_memset(s, 0, count); -} - -static __inline__ void *fb_memclear_small(void *s, size_t count) -{ - return sun4_memset(s, 0, count); -} - -/* To be honest, this is slow_memmove :). But sun4 is crappy, so what we can do. */ -static __inline__ void fast_memmove(void *d, const void *s, size_t count) -{ - int i; - if (d<s) { - for (i=0; i<count; i++) - ((char *) d)[i] = ((char *) s)[i]; - } else - for (i=0; i<count; i++) - ((char *) d)[count-i-1] = ((char *) s)[count-i-1]; -} - -static __inline__ void *fb_memmove(char *dst, const char *src, size_t size) -{ - fast_memmove(dst, src, size); - return dst; -} - -#else - -static __inline__ void *fb_memclear_small(void *s, size_t count) -{ - char *xs = (char *) s; - - while (count--) - fb_writeb(0, xs++); - - return s; -} - -static __inline__ void *fb_memclear(void *s, size_t count) -{ - unsigned long xs = (unsigned long) s; - - if (count < 8) - goto rest; - - if (xs & 1) { - fb_writeb(0, xs++); - count--; - } - if (xs & 2) { - fb_writew(0, xs); - xs += 2; - count -= 2; - } - while (count > 3) { - fb_writel(0, xs); - xs += 4; - count -= 4; - } -rest: - while (count--) - fb_writeb(0, xs++); - - return s; -} - -static __inline__ void *fb_memset255(void *s, size_t count) -{ - unsigned long xs = (unsigned long) s; - - if (count < 8) - goto rest; - - if (xs & 1) { - fb_writeb(0xff, xs++); - count--; - } - if (xs & 2) { - fb_writew(0xffff, xs); - xs += 2; - count -= 2; - } - while (count > 3) { - fb_writel(0xffffffff, xs); - xs += 4; - count -= 4; - } -rest: - while (count--) - fb_writeb(0xff, xs++); - - return s; -} - -#if defined(__i386__) - -static __inline__ void fast_memmove(void *d, const void *s, size_t count) -{ - int d0, d1, d2, d3; - if (d < s) { -__asm__ __volatile__ ( - "cld\n\t" - "shrl $1,%%ecx\n\t" - "jnc 1f\n\t" - "movsb\n" - "1:\tshrl $1,%%ecx\n\t" - "jnc 2f\n\t" - "movsw\n" - "2:\trep\n\t" - "movsl" - : "=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0"(count),"1"((long)d),"2"((long)s) - :"memory"); - } else { -__asm__ __volatile__ ( - "std\n\t" - "shrl $1,%%ecx\n\t" - "jnc 1f\n\t" - "movb 3(%%esi),%%al\n\t" - "movb %%al,3(%%edi)\n\t" - "decl %%esi\n\t" - "decl %%edi\n" - "1:\tshrl $1,%%ecx\n\t" - "jnc 2f\n\t" - "movw 2(%%esi),%%ax\n\t" - "movw %%ax,2(%%edi)\n\t" - "decl %%esi\n\t" - "decl %%edi\n\t" - "decl %%esi\n\t" - "decl %%edi\n" - "2:\trep\n\t" - "movsl\n\t" - "cld" - : "=&c" (d0), "=&D" (d1), "=&S" (d2), "=&a" (d3) - :"0"(count),"1"(count-4+(long)d),"2"(count-4+(long)s) - :"memory"); - } -} - -static __inline__ void *fb_memmove(char *dst, const char *src, size_t size) -{ - fast_memmove(dst, src, size); - return dst; -} - -#else /* !__i386__ */ - - /* - * Anyone who'd like to write asm functions for other CPUs? - * (Why are these functions better than those from include/asm/string.h?) - */ - -static __inline__ void *fb_memmove(void *d, const void *s, size_t count) -{ - unsigned long dst, src; - - if (d < s) { - dst = (unsigned long) d; - src = (unsigned long) s; - - if ((count < 8) || ((dst ^ src) & 3)) - goto restup; - - if (dst & 1) { - fb_writeb(fb_readb(src++), dst++); - count--; - } - if (dst & 2) { - fb_writew(fb_readw(src), dst); - src += 2; - dst += 2; - count -= 2; - } - while (count > 3) { - fb_writel(fb_readl(src), dst); - src += 4; - dst += 4; - count -= 4; - } - - restup: - while (count--) - fb_writeb(fb_readb(src++), dst++); - } else { - dst = (unsigned long) d + count; - src = (unsigned long) s + count; - - if ((count < 8) || ((dst ^ src) & 3)) - goto restdown; - - if (dst & 1) { - src--; - dst--; - count--; - fb_writeb(fb_readb(src), dst); - } - if (dst & 2) { - src -= 2; - dst -= 2; - count -= 2; - fb_writew(fb_readw(src), dst); - } - while (count > 3) { - src -= 4; - dst -= 4; - count -= 4; - fb_writel(fb_readl(src), dst); - } - - restdown: - while (count--) { - src--; - dst--; - fb_writeb(fb_readb(src), dst); - } - } - - return d; -} - -static __inline__ void fast_memmove(char *d, const char *s, size_t count) -{ - unsigned long dst, src; - - if (d < s) { - dst = (unsigned long) d; - src = (unsigned long) s; - - if ((count < 8) || ((dst ^ src) & 3)) - goto restup; - - if (dst & 1) { - fb_writeb(fb_readb(src++), dst++); - count--; - } - if (dst & 2) { - fb_writew(fb_readw(src), dst); - src += 2; - dst += 2; - count -= 2; - } - while (count > 3) { - fb_writel(fb_readl(src), dst); - src += 4; - dst += 4; - count -= 4; - } - - restup: - while (count--) - fb_writeb(fb_readb(src++), dst++); - } else { - dst = (unsigned long) d + count; - src = (unsigned long) s + count; - - if ((count < 8) || ((dst ^ src) & 3)) - goto restdown; - - if (dst & 1) { - src--; - dst--; - count--; - fb_writeb(fb_readb(src), dst); - } - if (dst & 2) { - src -= 2; - dst -= 2; - count -= 2; - fb_writew(fb_readw(src), dst); - } - while (count > 3) { - src -= 4; - dst -= 4; - count -= 4; - fb_writel(fb_readl(src), dst); - } - - restdown: - while (count--) { - src--; - dst--; - fb_writeb(fb_readb(src), dst); - } - } -} - -#endif /* !__i386__ */ - -#endif /* !__mc68000__ */ - -#endif /* _VIDEO_FBCON_H */ diff --git a/include/video/font.h b/include/video/font.h deleted file mode 100644 index 007d97f9b3ef..000000000000 --- a/include/video/font.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * font.h -- `Soft' font definitions - * - * Created 1995 by Geert Uytterhoeven - * - * 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. - */ - -#ifndef _VIDEO_FONT_H -#define _VIDEO_FONT_H - -#include <linux/types.h> - -struct fbcon_font_desc { - int idx; - char *name; - int width, height; - void *data; - int pref; -}; - -#define VGA8x8_IDX 0 -#define VGA8x16_IDX 1 -#define PEARL8x8_IDX 2 -#define VGA6x11_IDX 3 -#define SUN8x16_IDX 4 -#define SUN12x22_IDX 5 -#define ACORN8x8_IDX 6 -#define MINI4x6_IDX 7 - -extern struct fbcon_font_desc font_vga_8x8, - font_vga_8x16, - font_pearl_8x8, - font_vga_6x11, - font_sun_8x16, - font_sun_12x22, - font_acorn_8x8, - font_mini_4x6; - -/* Find a font with a specific name */ - -extern struct fbcon_font_desc *fbcon_find_font(char *name); - -/* Get the default font for a specific screen size */ - -extern struct fbcon_font_desc *fbcon_get_default_font(int xres, int yres); - -/* Max. length for the name of a predefined font */ -#define MAX_FONT_NAME 32 - -#endif /* _VIDEO_FONT_H */ diff --git a/include/video/macmodes.h b/include/video/macmodes.h deleted file mode 100644 index 232f5a09a499..000000000000 --- a/include/video/macmodes.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * linux/drivers/video/macmodes.h -- Standard MacOS video modes - * - * Copyright (C) 1998 Geert Uytterhoeven - * - * 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. - */ - -#ifndef _VIDEO_MACMODES_H -#define _VIDEO_MACMODES_H - - /* - * Video mode values. - * These are supposed to be the same as the values that Apple uses in - * MacOS. - */ - -#define VMODE_NVRAM 0 -#define VMODE_512_384_60I 1 /* 512x384, 60Hz interlaced (NTSC) */ -#define VMODE_512_384_60 2 /* 512x384, 60Hz */ -#define VMODE_640_480_50I 3 /* 640x480, 50Hz interlaced (PAL) */ -#define VMODE_640_480_60I 4 /* 640x480, 60Hz interlaced (NTSC) */ -#define VMODE_640_480_60 5 /* 640x480, 60Hz (VGA) */ -#define VMODE_640_480_67 6 /* 640x480, 67Hz */ -#define VMODE_640_870_75P 7 /* 640x870, 75Hz (portrait) */ -#define VMODE_768_576_50I 8 /* 768x576, 50Hz (PAL full frame) */ -#define VMODE_800_600_56 9 /* 800x600, 56Hz */ -#define VMODE_800_600_60 10 /* 800x600, 60Hz */ -#define VMODE_800_600_72 11 /* 800x600, 72Hz */ -#define VMODE_800_600_75 12 /* 800x600, 75Hz */ -#define VMODE_832_624_75 13 /* 832x624, 75Hz */ -#define VMODE_1024_768_60 14 /* 1024x768, 60Hz */ -#define VMODE_1024_768_70 15 /* 1024x768, 70Hz (or 72Hz?) */ -#define VMODE_1024_768_75V 16 /* 1024x768, 75Hz (VESA) */ -#define VMODE_1024_768_75 17 /* 1024x768, 75Hz */ -#define VMODE_1152_870_75 18 /* 1152x870, 75Hz */ -#define VMODE_1280_960_75 19 /* 1280x960, 75Hz */ -#define VMODE_1280_1024_75 20 /* 1280x1024, 75Hz */ -#define VMODE_1152_768_60 21 /* 1152x768, 60Hz Titanium PowerBook */ -#define VMODE_1600_1024_60 22 /* 1600x1024, 60Hz 22" Cinema Display */ -#define VMODE_MAX 22 -#define VMODE_CHOOSE 99 - -#define CMODE_NVRAM -1 -#define CMODE_CHOOSE -2 -#define CMODE_8 0 /* 8 bits/pixel */ -#define CMODE_16 1 /* 16 (actually 15) bits/pixel */ -#define CMODE_32 2 /* 32 (actually 24) bits/pixel */ - - -extern int mac_vmode_to_var(int vmode, int cmode, - struct fb_var_screeninfo *var); -extern int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode, - int *cmode); -extern int mac_map_monitor_sense(int sense); -extern int __init mac_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, const char *mode_option, - unsigned int default_bpp); - - - /* - * Addresses in NVRAM where video mode and pixel size are stored. - */ - -#define NV_VMODE 0x140f -#define NV_CMODE 0x1410 - -#endif /* _VIDEO_MACMODES_H */ diff --git a/include/video/neomagic.h b/include/video/neomagic.h index e0b73849bf0a..eec28b762178 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h @@ -176,6 +176,7 @@ struct neofb_par { int lcd_stretch; int internal_display; int external_display; + int libretto; }; typedef struct { diff --git a/include/video/radeon.h b/include/video/radeon.h new file mode 100644 index 000000000000..64a023033ca0 --- /dev/null +++ b/include/video/radeon.h @@ -0,0 +1,766 @@ +#ifndef _RADEON_H +#define _RADEON_H + + +/* radeon PCI ids */ +#define PCI_DEVICE_ID_RADEON_QD 0x5144 +#define PCI_DEVICE_ID_RADEON_QE 0x5145 +#define PCI_DEVICE_ID_RADEON_QF 0x5146 +#define PCI_DEVICE_ID_RADEON_QG 0x5147 +#define PCI_DEVICE_ID_RADEON_QY 0x5159 +#define PCI_DEVICE_ID_RADEON_QZ 0x515a +#define PCI_DEVICE_ID_RADEON_LW 0x4c57 +#define PCI_DEVICE_ID_RADEON_LY 0x4c59 +#define PCI_DEVICE_ID_RADEON_LZ 0x4c5a +#define PCI_DEVICE_ID_RADEON_QL 0x514c +#define PCI_DEVICE_ID_RADEON_QW 0x5157 + +#define RADEON_REGSIZE 0x4000 + + +#define MM_INDEX 0x0000 +#define MM_DATA 0x0004 +#define BUS_CNTL 0x0030 +#define HI_STAT 0x004C +#define BUS_CNTL1 0x0034 +#define I2C_CNTL_1 0x0094 +#define CONFIG_CNTL 0x00E0 +#define CONFIG_MEMSIZE 0x00F8 +#define CONFIG_APER_0_BASE 0x0100 +#define CONFIG_APER_1_BASE 0x0104 +#define CONFIG_APER_SIZE 0x0108 +#define CONFIG_REG_1_BASE 0x010C +#define CONFIG_REG_APER_SIZE 0x0110 +#define PAD_AGPINPUT_DELAY 0x0164 +#define PAD_CTLR_STRENGTH 0x0168 +#define PAD_CTLR_UPDATE 0x016C +#define AGP_CNTL 0x0174 +#define BM_STATUS 0x0160 +#define CAP0_TRIG_CNTL 0x0950 +#define VIPH_CONTROL 0x0C40 +#define VENDOR_ID 0x0F00 +#define DEVICE_ID 0x0F02 +#define COMMAND 0x0F04 +#define STATUS 0x0F06 +#define REVISION_ID 0x0F08 +#define REGPROG_INF 0x0F09 +#define SUB_CLASS 0x0F0A +#define BASE_CODE 0x0F0B +#define CACHE_LINE 0x0F0C +#define LATENCY 0x0F0D +#define HEADER 0x0F0E +#define BIST 0x0F0F +#define REG_MEM_BASE 0x0F10 +#define REG_IO_BASE 0x0F14 +#define REG_REG_BASE 0x0F18 +#define ADAPTER_ID 0x0F2C +#define BIOS_ROM 0x0F30 +#define CAPABILITIES_PTR 0x0F34 +#define INTERRUPT_LINE 0x0F3C +#define INTERRUPT_PIN 0x0F3D +#define MIN_GRANT 0x0F3E +#define MAX_LATENCY 0x0F3F +#define ADAPTER_ID_W 0x0F4C +#define PMI_CAP_ID 0x0F50 +#define PMI_NXT_CAP_PTR 0x0F51 +#define PMI_PMC_REG 0x0F52 +#define PM_STATUS 0x0F54 +#define PMI_DATA 0x0F57 +#define AGP_CAP_ID 0x0F58 +#define AGP_STATUS 0x0F5C +#define AGP_COMMAND 0x0F60 +#define AIC_CTRL 0x01D0 +#define AIC_STAT 0x01D4 +#define AIC_PT_BASE 0x01D8 +#define AIC_LO_ADDR 0x01DC +#define AIC_HI_ADDR 0x01E0 +#define AIC_TLB_ADDR 0x01E4 +#define AIC_TLB_DATA 0x01E8 +#define DAC_CNTL 0x0058 +#define CRTC_GEN_CNTL 0x0050 +#define MEM_CNTL 0x0140 +#define EXT_MEM_CNTL 0x0144 +#define MC_AGP_LOCATION 0x014C +#define MEM_IO_CNTL_A0 0x0178 +#define MEM_INIT_LATENCY_TIMER 0x0154 +#define MEM_SDRAM_MODE_REG 0x0158 +#define AGP_BASE 0x0170 +#define MEM_IO_CNTL_A1 0x017C +#define MEM_IO_CNTL_B0 0x0180 +#define MEM_IO_CNTL_B1 0x0184 +#define MC_DEBUG 0x0188 +#define MC_STATUS 0x0150 +#define MEM_IO_OE_CNTL 0x018C +#define MC_FB_LOCATION 0x0148 +#define HOST_PATH_CNTL 0x0130 +#define MEM_VGA_WP_SEL 0x0038 +#define MEM_VGA_RP_SEL 0x003C +#define HDP_DEBUG 0x0138 +#define SW_SEMAPHORE 0x013C +#define SURFACE_CNTL 0x0B00 +#define SURFACE0_LOWER_BOUND 0x0B04 +#define SURFACE1_LOWER_BOUND 0x0B14 +#define SURFACE2_LOWER_BOUND 0x0B24 +#define SURFACE3_LOWER_BOUND 0x0B34 +#define SURFACE4_LOWER_BOUND 0x0B44 +#define SURFACE5_LOWER_BOUND 0x0B54 +#define SURFACE6_LOWER_BOUND 0x0B64 +#define SURFACE7_LOWER_BOUND 0x0B74 +#define SURFACE0_UPPER_BOUND 0x0B08 +#define SURFACE1_UPPER_BOUND 0x0B18 +#define SURFACE2_UPPER_BOUND 0x0B28 +#define SURFACE3_UPPER_BOUND 0x0B38 +#define SURFACE4_UPPER_BOUND 0x0B48 +#define SURFACE5_UPPER_BOUND 0x0B58 +#define SURFACE6_UPPER_BOUND 0x0B68 +#define SURFACE7_UPPER_BOUND 0x0B78 +#define SURFACE0_INFO 0x0B0C +#define SURFACE1_INFO 0x0B1C +#define SURFACE2_INFO 0x0B2C +#define SURFACE3_INFO 0x0B3C +#define SURFACE4_INFO 0x0B4C +#define SURFACE5_INFO 0x0B5C +#define SURFACE6_INFO 0x0B6C +#define SURFACE7_INFO 0x0B7C +#define SURFACE_ACCESS_FLAGS 0x0BF8 +#define SURFACE_ACCESS_CLR 0x0BFC +#define GEN_INT_CNTL 0x0040 +#define GEN_INT_STATUS 0x0044 +#define CRTC_EXT_CNTL 0x0054 +#define RB3D_CNTL 0x1C3C +#define WAIT_UNTIL 0x1720 +#define ISYNC_CNTL 0x1724 +#define RBBM_GUICNTL 0x172C +#define RBBM_STATUS 0x0E40 +#define RBBM_STATUS_alt_1 0x1740 +#define RBBM_CNTL 0x00EC +#define RBBM_CNTL_alt_1 0x0E44 +#define RBBM_SOFT_RESET 0x00F0 +#define RBBM_SOFT_RESET_alt_1 0x0E48 +#define NQWAIT_UNTIL 0x0E50 +#define RBBM_DEBUG 0x0E6C +#define RBBM_CMDFIFO_ADDR 0x0E70 +#define RBBM_CMDFIFO_DATAL 0x0E74 +#define RBBM_CMDFIFO_DATAH 0x0E78 +#define RBBM_CMDFIFO_STAT 0x0E7C +#define CRTC_STATUS 0x005C +#define GPIO_VGA_DDC 0x0060 +#define GPIO_DVI_DDC 0x0064 +#define GPIO_MONID 0x0068 +#define PALETTE_INDEX 0x00B0 +#define PALETTE_DATA 0x00B4 +#define PALETTE_30_DATA 0x00B8 +#define CRTC_H_TOTAL_DISP 0x0200 +#define CRTC_H_SYNC_STRT_WID 0x0204 +#define CRTC_V_TOTAL_DISP 0x0208 +#define CRTC_V_SYNC_STRT_WID 0x020C +#define CRTC_VLINE_CRNT_VLINE 0x0210 +#define CRTC_CRNT_FRAME 0x0214 +#define CRTC_GUI_TRIG_VLINE 0x0218 +#define CRTC_DEBUG 0x021C +#define CRTC_OFFSET_RIGHT 0x0220 +#define CRTC_OFFSET 0x0224 +#define CRTC_OFFSET_CNTL 0x0228 +#define CRTC_PITCH 0x022C +#define OVR_CLR 0x0230 +#define OVR_WID_LEFT_RIGHT 0x0234 +#define OVR_WID_TOP_BOTTOM 0x0238 +#define DISPLAY_BASE_ADDR 0x023C +#define SNAPSHOT_VH_COUNTS 0x0240 +#define SNAPSHOT_F_COUNT 0x0244 +#define N_VIF_COUNT 0x0248 +#define SNAPSHOT_VIF_COUNT 0x024C +#define FP_CRTC_H_TOTAL_DISP 0x0250 +#define FP_CRTC_V_TOTAL_DISP 0x0254 +#define CRT_CRTC_H_SYNC_STRT_WID 0x0258 +#define CRT_CRTC_V_SYNC_STRT_WID 0x025C +#define CUR_OFFSET 0x0260 +#define CUR_HORZ_VERT_POSN 0x0264 +#define CUR_HORZ_VERT_OFF 0x0268 +#define CUR_CLR0 0x026C +#define CUR_CLR1 0x0270 +#define FP_HORZ_VERT_ACTIVE 0x0278 +#define CRTC_MORE_CNTL 0x027C +#define DAC_EXT_CNTL 0x0280 +#define FP_GEN_CNTL 0x0284 +#define FP_HORZ_STRETCH 0x028C +#define FP_VERT_STRETCH 0x0290 +#define FP_H_SYNC_STRT_WID 0x02C4 +#define FP_V_SYNC_STRT_WID 0x02C8 +#define AUX_WINDOW_HORZ_CNTL 0x02D8 +#define AUX_WINDOW_VERT_CNTL 0x02DC +#define DDA_CONFIG 0x02e0 +#define DDA_ON_OFF 0x02e4 +#define GRPH_BUFFER_CNTL 0x02F0 +#define VGA_BUFFER_CNTL 0x02F4 +#define OV0_Y_X_START 0x0400 +#define OV0_Y_X_END 0x0404 +#define OV0_PIPELINE_CNTL 0x0408 +#define OV0_REG_LOAD_CNTL 0x0410 +#define OV0_SCALE_CNTL 0x0420 +#define OV0_V_INC 0x0424 +#define OV0_P1_V_ACCUM_INIT 0x0428 +#define OV0_P23_V_ACCUM_INIT 0x042C +#define OV0_P1_BLANK_LINES_AT_TOP 0x0430 +#define OV0_P23_BLANK_LINES_AT_TOP 0x0434 +#define OV0_BASE_ADDR 0x043C +#define OV0_VID_BUF0_BASE_ADRS 0x0440 +#define OV0_VID_BUF1_BASE_ADRS 0x0444 +#define OV0_VID_BUF2_BASE_ADRS 0x0448 +#define OV0_VID_BUF3_BASE_ADRS 0x044C +#define OV0_VID_BUF4_BASE_ADRS 0x0450 +#define OV0_VID_BUF5_BASE_ADRS 0x0454 +#define OV0_VID_BUF_PITCH0_VALUE 0x0460 +#define OV0_VID_BUF_PITCH1_VALUE 0x0464 +#define OV0_AUTO_FLIP_CNTRL 0x0470 +#define OV0_DEINTERLACE_PATTERN 0x0474 +#define OV0_SUBMIT_HISTORY 0x0478 +#define OV0_H_INC 0x0480 +#define OV0_STEP_BY 0x0484 +#define OV0_P1_H_ACCUM_INIT 0x0488 +#define OV0_P23_H_ACCUM_INIT 0x048C +#define OV0_P1_X_START_END 0x0494 +#define OV0_P2_X_START_END 0x0498 +#define OV0_P3_X_START_END 0x049C +#define OV0_FILTER_CNTL 0x04A0 +#define OV0_FOUR_TAP_COEF_0 0x04B0 +#define OV0_FOUR_TAP_COEF_1 0x04B4 +#define OV0_FOUR_TAP_COEF_2 0x04B8 +#define OV0_FOUR_TAP_COEF_3 0x04BC +#define OV0_FOUR_TAP_COEF_4 0x04C0 +#define OV0_FLAG_CNTRL 0x04DC +#define OV0_SLICE_CNTL 0x04E0 +#define OV0_VID_KEY_CLR_LOW 0x04E4 +#define OV0_VID_KEY_CLR_HIGH 0x04E8 +#define OV0_GRPH_KEY_CLR_LOW 0x04EC +#define OV0_GRPH_KEY_CLR_HIGH 0x04F0 +#define OV0_KEY_CNTL 0x04F4 +#define OV0_TEST 0x04F8 +#define SUBPIC_CNTL 0x0540 +#define SUBPIC_DEFCOLCON 0x0544 +#define SUBPIC_Y_X_START 0x054C +#define SUBPIC_Y_X_END 0x0550 +#define SUBPIC_V_INC 0x0554 +#define SUBPIC_H_INC 0x0558 +#define SUBPIC_BUF0_OFFSET 0x055C +#define SUBPIC_BUF1_OFFSET 0x0560 +#define SUBPIC_LC0_OFFSET 0x0564 +#define SUBPIC_LC1_OFFSET 0x0568 +#define SUBPIC_PITCH 0x056C +#define SUBPIC_BTN_HLI_COLCON 0x0570 +#define SUBPIC_BTN_HLI_Y_X_START 0x0574 +#define SUBPIC_BTN_HLI_Y_X_END 0x0578 +#define SUBPIC_PALETTE_INDEX 0x057C +#define SUBPIC_PALETTE_DATA 0x0580 +#define SUBPIC_H_ACCUM_INIT 0x0584 +#define SUBPIC_V_ACCUM_INIT 0x0588 +#define DISP_MISC_CNTL 0x0D00 +#define DAC_MACRO_CNTL 0x0D04 +#define DISP_PWR_MAN 0x0D08 +#define DISP_TEST_DEBUG_CNTL 0x0D10 +#define DISP_HW_DEBUG 0x0D14 +#define DAC_CRC_SIG1 0x0D18 +#define DAC_CRC_SIG2 0x0D1C +#define OV0_LIN_TRANS_A 0x0D20 +#define OV0_LIN_TRANS_B 0x0D24 +#define OV0_LIN_TRANS_C 0x0D28 +#define OV0_LIN_TRANS_D 0x0D2C +#define OV0_LIN_TRANS_E 0x0D30 +#define OV0_LIN_TRANS_F 0x0D34 +#define OV0_GAMMA_0_F 0x0D40 +#define OV0_GAMMA_10_1F 0x0D44 +#define OV0_GAMMA_20_3F 0x0D48 +#define OV0_GAMMA_40_7F 0x0D4C +#define OV0_GAMMA_380_3BF 0x0D50 +#define OV0_GAMMA_3C0_3FF 0x0D54 +#define DISP_MERGE_CNTL 0x0D60 +#define DISP_OUTPUT_CNTL 0x0D64 +#define DISP_LIN_TRANS_GRPH_A 0x0D80 +#define DISP_LIN_TRANS_GRPH_B 0x0D84 +#define DISP_LIN_TRANS_GRPH_C 0x0D88 +#define DISP_LIN_TRANS_GRPH_D 0x0D8C +#define DISP_LIN_TRANS_GRPH_E 0x0D90 +#define DISP_LIN_TRANS_GRPH_F 0x0D94 +#define DISP_LIN_TRANS_VID_A 0x0D98 +#define DISP_LIN_TRANS_VID_B 0x0D9C +#define DISP_LIN_TRANS_VID_C 0x0DA0 +#define DISP_LIN_TRANS_VID_D 0x0DA4 +#define DISP_LIN_TRANS_VID_E 0x0DA8 +#define DISP_LIN_TRANS_VID_F 0x0DAC +#define RMX_HORZ_FILTER_0TAP_COEF 0x0DB0 +#define RMX_HORZ_FILTER_1TAP_COEF 0x0DB4 +#define RMX_HORZ_FILTER_2TAP_COEF 0x0DB8 +#define RMX_HORZ_PHASE 0x0DBC +#define DAC_EMBEDDED_SYNC_CNTL 0x0DC0 +#define DAC_BROAD_PULSE 0x0DC4 +#define DAC_SKEW_CLKS 0x0DC8 +#define DAC_INCR 0x0DCC +#define DAC_NEG_SYNC_LEVEL 0x0DD0 +#define DAC_POS_SYNC_LEVEL 0x0DD4 +#define DAC_BLANK_LEVEL 0x0DD8 +#define CLOCK_CNTL_INDEX 0x0008 +#define CLOCK_CNTL_DATA 0x000C +#define CP_RB_CNTL 0x0704 +#define CP_RB_BASE 0x0700 +#define CP_RB_RPTR_ADDR 0x070C +#define CP_RB_RPTR 0x0710 +#define CP_RB_WPTR 0x0714 +#define CP_RB_WPTR_DELAY 0x0718 +#define CP_IB_BASE 0x0738 +#define CP_IB_BUFSZ 0x073C +#define SCRATCH_REG0 0x15E0 +#define GUI_SCRATCH_REG0 0x15E0 +#define SCRATCH_REG1 0x15E4 +#define GUI_SCRATCH_REG1 0x15E4 +#define SCRATCH_REG2 0x15E8 +#define GUI_SCRATCH_REG2 0x15E8 +#define SCRATCH_REG3 0x15EC +#define GUI_SCRATCH_REG3 0x15EC +#define SCRATCH_REG4 0x15F0 +#define GUI_SCRATCH_REG4 0x15F0 +#define SCRATCH_REG5 0x15F4 +#define GUI_SCRATCH_REG5 0x15F4 +#define SCRATCH_UMSK 0x0770 +#define SCRATCH_ADDR 0x0774 +#define DP_BRUSH_FRGD_CLR 0x147C +#define DP_BRUSH_BKGD_CLR 0x1478 +#define DST_LINE_START 0x1600 +#define DST_LINE_END 0x1604 +#define SRC_OFFSET 0x15AC +#define SRC_PITCH 0x15B0 +#define SRC_TILE 0x1704 +#define SRC_PITCH_OFFSET 0x1428 +#define SRC_X 0x1414 +#define SRC_Y 0x1418 +#define SRC_X_Y 0x1590 +#define SRC_Y_X 0x1434 +#define DST_Y_X 0x1438 +#define DST_WIDTH_HEIGHT 0x1598 +#define DST_HEIGHT_WIDTH 0x143c +#define SRC_CLUT_ADDRESS 0x1780 +#define SRC_CLUT_DATA 0x1784 +#define SRC_CLUT_DATA_RD 0x1788 +#define HOST_DATA0 0x17C0 +#define HOST_DATA1 0x17C4 +#define HOST_DATA2 0x17C8 +#define HOST_DATA3 0x17CC +#define HOST_DATA4 0x17D0 +#define HOST_DATA5 0x17D4 +#define HOST_DATA6 0x17D8 +#define HOST_DATA7 0x17DC +#define HOST_DATA_LAST 0x17E0 +#define DP_SRC_ENDIAN 0x15D4 +#define DP_SRC_FRGD_CLR 0x15D8 +#define DP_SRC_BKGD_CLR 0x15DC +#define SC_LEFT 0x1640 +#define SC_RIGHT 0x1644 +#define SC_TOP 0x1648 +#define SC_BOTTOM 0x164C +#define SRC_SC_RIGHT 0x1654 +#define SRC_SC_BOTTOM 0x165C +#define DP_CNTL 0x16C0 +#define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0 +#define DP_DATATYPE 0x16C4 +#define DP_MIX 0x16C8 +#define DP_WRITE_MSK 0x16CC +#define DP_XOP 0x17F8 +#define CLR_CMP_CLR_SRC 0x15C4 +#define CLR_CMP_CLR_DST 0x15C8 +#define CLR_CMP_CNTL 0x15C0 +#define CLR_CMP_MSK 0x15CC +#define DSTCACHE_MODE 0x1710 +#define DSTCACHE_CTLSTAT 0x1714 +#define DEFAULT_PITCH_OFFSET 0x16E0 +#define DEFAULT_SC_BOTTOM_RIGHT 0x16E8 +#define DP_GUI_MASTER_CNTL 0x146C +#define SC_TOP_LEFT 0x16EC +#define SC_BOTTOM_RIGHT 0x16F0 +#define SRC_SC_BOTTOM_RIGHT 0x16F4 +#define RB2D_DSTCACHE_CTLSTAT 0x342C +#define LVDS_GEN_CNTL 0x02d0 +#define LVDS_PLL_CNTL 0x02d4 +#define TMDS_CRC 0x02a0 + +#define RADEON_BASE_CODE 0x0f0b +#define RADEON_BIOS_0_SCRATCH 0x0010 +#define RADEON_BIOS_1_SCRATCH 0x0014 +#define RADEON_BIOS_2_SCRATCH 0x0018 +#define RADEON_BIOS_3_SCRATCH 0x001c +#define RADEON_BIOS_4_SCRATCH 0x0020 +#define RADEON_BIOS_5_SCRATCH 0x0024 +#define RADEON_BIOS_6_SCRATCH 0x0028 +#define RADEON_BIOS_7_SCRATCH 0x002c + + +#define CLK_PIN_CNTL 0x0001 +#define PPLL_CNTL 0x0002 +#define PPLL_REF_DIV 0x0003 +#define PPLL_DIV_0 0x0004 +#define PPLL_DIV_1 0x0005 +#define PPLL_DIV_2 0x0006 +#define PPLL_DIV_3 0x0007 +#define VCLK_ECP_CNTL 0x0008 +#define HTOTAL_CNTL 0x0009 +#define M_SPLL_REF_FB_DIV 0x000a +#define AGP_PLL_CNTL 0x000b +#define SPLL_CNTL 0x000c +#define SCLK_CNTL 0x000d +#define MPLL_CNTL 0x000e +#define MCLK_CNTL 0x0012 +#define AGP_PLL_CNTL 0x000b +#define PLL_TEST_CNTL 0x0013 + + +/* MCLK_CNTL bit constants */ +#define FORCEON_MCLKA (1 << 16) +#define FORCEON_MCLKB (1 << 17) +#define FORCEON_YCLKA (1 << 18) +#define FORCEON_YCLKB (1 << 19) +#define FORCEON_MC (1 << 20) +#define FORCEON_AIC (1 << 21) + + +/* BUS_CNTL bit constants */ +#define BUS_DBL_RESYNC 0x00000001 +#define BUS_MSTR_RESET 0x00000002 +#define BUS_FLUSH_BUF 0x00000004 +#define BUS_STOP_REQ_DIS 0x00000008 +#define BUS_ROTATION_DIS 0x00000010 +#define BUS_MASTER_DIS 0x00000040 +#define BUS_ROM_WRT_EN 0x00000080 +#define BUS_DIS_ROM 0x00001000 +#define BUS_PCI_READ_RETRY_EN 0x00002000 +#define BUS_AGP_AD_STEPPING_EN 0x00004000 +#define BUS_PCI_WRT_RETRY_EN 0x00008000 +#define BUS_MSTR_RD_MULT 0x00100000 +#define BUS_MSTR_RD_LINE 0x00200000 +#define BUS_SUSPEND 0x00400000 +#define LAT_16X 0x00800000 +#define BUS_RD_DISCARD_EN 0x01000000 +#define BUS_RD_ABORT_EN 0x02000000 +#define BUS_MSTR_WS 0x04000000 +#define BUS_PARKING_DIS 0x08000000 +#define BUS_MSTR_DISCONNECT_EN 0x10000000 +#define BUS_WRT_BURST 0x20000000 +#define BUS_READ_BURST 0x40000000 +#define BUS_RDY_READ_DLY 0x80000000 + + +/* CLOCK_CNTL_INDEX bit constants */ +#define PLL_WR_EN 0x00000080 + +/* CONFIG_CNTL bit constants */ +#define CFG_VGA_RAM_EN 0x00000100 + +/* CRTC_EXT_CNTL bit constants */ +#define VGA_ATI_LINEAR 0x00000008 +#define VGA_128KAP_PAGING 0x00000010 +#define XCRT_CNT_EN (1 << 6) +#define CRTC_HSYNC_DIS (1 << 8) +#define CRTC_VSYNC_DIS (1 << 9) +#define CRTC_DISPLAY_DIS (1 << 10) +#define CRTC_CRT_ON (1 << 15) + + +/* DSTCACHE_CTLSTAT bit constants */ +#define RB2D_DC_FLUSH (3 << 0) +#define RB2D_DC_FLUSH_ALL 0xf +#define RB2D_DC_BUSY (1 << 31) + + +/* CRTC_GEN_CNTL bit constants */ +#define CRTC_DBL_SCAN_EN 0x00000001 +#define CRTC_CUR_EN 0x00010000 +#define CRTC_INTERLACE_EN (1 << 1) +#define CRTC_EXT_DISP_EN (1 << 24) +#define CRTC_EN (1 << 25) + +/* CRTC_STATUS bit constants */ +#define CRTC_VBLANK 0x00000001 + +/* CUR_OFFSET, CUR_HORZ_VERT_POSN, CUR_HORZ_VERT_OFF bit constants */ +#define CUR_LOCK 0x80000000 + + +/* FP bit constants */ +#define FP_CRTC_H_TOTAL_MASK 0x000003ff +#define FP_CRTC_H_DISP_MASK 0x01ff0000 +#define FP_CRTC_V_TOTAL_MASK 0x00000fff +#define FP_CRTC_V_DISP_MASK 0x0fff0000 +#define FP_H_SYNC_STRT_CHAR_MASK 0x00001ff8 +#define FP_H_SYNC_WID_MASK 0x003f0000 +#define FP_V_SYNC_STRT_MASK 0x00000fff +#define FP_V_SYNC_WID_MASK 0x001f0000 +#define FP_CRTC_H_TOTAL_SHIFT 0x00000000 +#define FP_CRTC_H_DISP_SHIFT 0x00000010 +#define FP_CRTC_V_TOTAL_SHIFT 0x00000000 +#define FP_CRTC_V_DISP_SHIFT 0x00000010 +#define FP_H_SYNC_STRT_CHAR_SHIFT 0x00000003 +#define FP_H_SYNC_WID_SHIFT 0x00000010 +#define FP_V_SYNC_STRT_SHIFT 0x00000000 +#define FP_V_SYNC_WID_SHIFT 0x00000010 + +/* FP_GEN_CNTL bit constants */ +#define FP_FPON (1 << 0) +#define FP_TMDS_EN (1 << 2) +#define FP_EN_TMDS (1 << 7) +#define FP_DETECT_SENSE (1 << 8) +#define FP_SEL_CRTC2 (1 << 13) +#define FP_CRTC_DONT_SHADOW_HPAR (1 << 15) +#define FP_CRTC_DONT_SHADOW_VPAR (1 << 16) +#define FP_CRTC_DONT_SHADOW_HEND (1 << 17) +#define FP_CRTC_USE_SHADOW_VEND (1 << 18) +#define FP_RMX_HVSYNC_CONTROL_EN (1 << 20) +#define FP_DFP_SYNC_SEL (1 << 21) +#define FP_CRTC_LOCK_8DOT (1 << 22) +#define FP_CRT_SYNC_SEL (1 << 23) +#define FP_USE_SHADOW_EN (1 << 24) +#define FP_CRT_SYNC_ALT (1 << 26) + +/* LVDS_GEN_CNTL bit constants */ +#define LVDS_ON (1 << 0) +#define LVDS_DISPLAY_DIS (1 << 1) +#define LVDS_PANEL_TYPE (1 << 2) +#define LVDS_PANEL_FORMAT (1 << 3) +#define LVDS_EN (1 << 7) +#define LVDS_DIGON (1 << 18) +#define LVDS_BLON (1 << 19) +#define LVDS_SEL_CRTC2 (1 << 23) + +/* LVDS_PLL_CNTL bit constatns */ +#define HSYNC_DELAY_SHIFT 0x1c +#define HSYNC_DELAY_MASK (0xf << 0x1c) + +/* FP_HORZ_STRETCH bit constants */ +#define HORZ_STRETCH_RATIO_MASK 0xffff +#define HORZ_STRETCH_RATIO_MAX 4096 +#define HORZ_PANEL_SIZE (0x1ff << 16) +#define HORZ_PANEL_SHIFT 16 +#define HORZ_STRETCH_PIXREP (0 << 25) +#define HORZ_STRETCH_BLEND (1 << 26) +#define HORZ_STRETCH_ENABLE (1 << 25) +#define HORZ_AUTO_RATIO (1 << 27) +#define HORZ_FP_LOOP_STRETCH (0x7 << 28) +#define HORZ_AUTO_RATIO_INC (1 << 31) + + +/* FP_VERT_STRETCH bit constants */ +#define VERT_STRETCH_RATIO_MASK 0xfff +#define VERT_STRETCH_RATIO_MAX 4096 +#define VERT_PANEL_SIZE (0xfff << 12) +#define VERT_PANEL_SHIFT 12 +#define VERT_STRETCH_LINREP (0 << 26) +#define VERT_STRETCH_BLEND (1 << 26) +#define VERT_STRETCH_ENABLE (1 << 25) +#define VERT_AUTO_RATIO_EN (1 << 27) +#define VERT_FP_LOOP_STRETCH (0x7 << 28) +#define VERT_STRETCH_RESERVED 0xf1000000 + +/* DAC_CNTL bit constants */ +#define DAC_8BIT_EN 0x00000100 +#define DAC_4BPP_PIX_ORDER 0x00000200 +#define DAC_CRC_EN 0x00080000 +#define DAC_MASK_ALL (0xff << 24) +#define DAC_VGA_ADR_EN (1 << 13) +#define DAC_RANGE_CNTL (3 << 0) +#define DAC_BLANKING (1 << 2) + +/* GEN_RESET_CNTL bit constants */ +#define SOFT_RESET_GUI 0x00000001 +#define SOFT_RESET_VCLK 0x00000100 +#define SOFT_RESET_PCLK 0x00000200 +#define SOFT_RESET_ECP 0x00000400 +#define SOFT_RESET_DISPENG_XCLK 0x00000800 + +/* MEM_CNTL bit constants */ +#define MEM_CTLR_STATUS_IDLE 0x00000000 +#define MEM_CTLR_STATUS_BUSY 0x00100000 +#define MEM_SEQNCR_STATUS_IDLE 0x00000000 +#define MEM_SEQNCR_STATUS_BUSY 0x00200000 +#define MEM_ARBITER_STATUS_IDLE 0x00000000 +#define MEM_ARBITER_STATUS_BUSY 0x00400000 +#define MEM_REQ_UNLOCK 0x00000000 +#define MEM_REQ_LOCK 0x00800000 + + +/* RBBM_SOFT_RESET bit constants */ +#define SOFT_RESET_CP (1 << 0) +#define SOFT_RESET_HI (1 << 1) +#define SOFT_RESET_SE (1 << 2) +#define SOFT_RESET_RE (1 << 3) +#define SOFT_RESET_PP (1 << 4) +#define SOFT_RESET_E2 (1 << 5) +#define SOFT_RESET_RB (1 << 6) +#define SOFT_RESET_HDP (1 << 7) + +/* SURFACE_CNTL bit consants */ +#define SURF_TRANSLATION_DIS (1 << 8) +#define NONSURF_AP0_SWP_16BPP (1 << 20) +#define NONSURF_AP0_SWP_32BPP (1 << 21) + +/* DEFAULT_SC_BOTTOM_RIGHT bit constants */ +#define DEFAULT_SC_RIGHT_MAX (0x1fff << 0) +#define DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) + +/* MM_INDEX bit constants */ +#define MM_APER 0x80000000 + +/* CLR_CMP_CNTL bit constants */ +#define COMPARE_SRC_FALSE 0x00000000 +#define COMPARE_SRC_TRUE 0x00000001 +#define COMPARE_SRC_NOT_EQUAL 0x00000004 +#define COMPARE_SRC_EQUAL 0x00000005 +#define COMPARE_SRC_EQUAL_FLIP 0x00000007 +#define COMPARE_DST_FALSE 0x00000000 +#define COMPARE_DST_TRUE 0x00000100 +#define COMPARE_DST_NOT_EQUAL 0x00000400 +#define COMPARE_DST_EQUAL 0x00000500 +#define COMPARE_DESTINATION 0x00000000 +#define COMPARE_SOURCE 0x01000000 +#define COMPARE_SRC_AND_DST 0x02000000 + + +/* DP_CNTL bit constants */ +#define DST_X_RIGHT_TO_LEFT 0x00000000 +#define DST_X_LEFT_TO_RIGHT 0x00000001 +#define DST_Y_BOTTOM_TO_TOP 0x00000000 +#define DST_Y_TOP_TO_BOTTOM 0x00000002 +#define DST_X_MAJOR 0x00000000 +#define DST_Y_MAJOR 0x00000004 +#define DST_X_TILE 0x00000008 +#define DST_Y_TILE 0x00000010 +#define DST_LAST_PEL 0x00000020 +#define DST_TRAIL_X_RIGHT_TO_LEFT 0x00000000 +#define DST_TRAIL_X_LEFT_TO_RIGHT 0x00000040 +#define DST_TRAP_FILL_RIGHT_TO_LEFT 0x00000000 +#define DST_TRAP_FILL_LEFT_TO_RIGHT 0x00000080 +#define DST_BRES_SIGN 0x00000100 +#define DST_HOST_BIG_ENDIAN_EN 0x00000200 +#define DST_POLYLINE_NONLAST 0x00008000 +#define DST_RASTER_STALL 0x00010000 +#define DST_POLY_EDGE 0x00040000 + + +/* DP_CNTL_YDIR_XDIR_YMAJOR bit constants (short version of DP_CNTL) */ +#define DST_X_MAJOR_S 0x00000000 +#define DST_Y_MAJOR_S 0x00000001 +#define DST_Y_BOTTOM_TO_TOP_S 0x00000000 +#define DST_Y_TOP_TO_BOTTOM_S 0x00008000 +#define DST_X_RIGHT_TO_LEFT_S 0x00000000 +#define DST_X_LEFT_TO_RIGHT_S 0x80000000 + + +/* DP_DATATYPE bit constants */ +#define DST_8BPP 0x00000002 +#define DST_15BPP 0x00000003 +#define DST_16BPP 0x00000004 +#define DST_24BPP 0x00000005 +#define DST_32BPP 0x00000006 +#define DST_8BPP_RGB332 0x00000007 +#define DST_8BPP_Y8 0x00000008 +#define DST_8BPP_RGB8 0x00000009 +#define DST_16BPP_VYUY422 0x0000000b +#define DST_16BPP_YVYU422 0x0000000c +#define DST_32BPP_AYUV444 0x0000000e +#define DST_16BPP_ARGB4444 0x0000000f +#define BRUSH_SOLIDCOLOR 0x00000d00 +#define SRC_MONO 0x00000000 +#define SRC_MONO_LBKGD 0x00010000 +#define SRC_DSTCOLOR 0x00030000 +#define BYTE_ORDER_MSB_TO_LSB 0x00000000 +#define BYTE_ORDER_LSB_TO_MSB 0x40000000 +#define DP_CONVERSION_TEMP 0x80000000 +#define HOST_BIG_ENDIAN_EN (1 << 29) + + +/* DP_GUI_MASTER_CNTL bit constants */ +#define GMC_SRC_PITCH_OFFSET_DEFAULT 0x00000000 +#define GMC_SRC_PITCH_OFFSET_LEAVE 0x00000001 +#define GMC_DST_PITCH_OFFSET_DEFAULT 0x00000000 +#define GMC_DST_PITCH_OFFSET_LEAVE 0x00000002 +#define GMC_SRC_CLIP_DEFAULT 0x00000000 +#define GMC_SRC_CLIP_LEAVE 0x00000004 +#define GMC_DST_CLIP_DEFAULT 0x00000000 +#define GMC_DST_CLIP_LEAVE 0x00000008 +#define GMC_BRUSH_8x8MONO 0x00000000 +#define GMC_BRUSH_8x8MONO_LBKGD 0x00000010 +#define GMC_BRUSH_8x1MONO 0x00000020 +#define GMC_BRUSH_8x1MONO_LBKGD 0x00000030 +#define GMC_BRUSH_1x8MONO 0x00000040 +#define GMC_BRUSH_1x8MONO_LBKGD 0x00000050 +#define GMC_BRUSH_32x1MONO 0x00000060 +#define GMC_BRUSH_32x1MONO_LBKGD 0x00000070 +#define GMC_BRUSH_32x32MONO 0x00000080 +#define GMC_BRUSH_32x32MONO_LBKGD 0x00000090 +#define GMC_BRUSH_8x8COLOR 0x000000a0 +#define GMC_BRUSH_8x1COLOR 0x000000b0 +#define GMC_BRUSH_1x8COLOR 0x000000c0 +#define GMC_BRUSH_SOLID_COLOR 0x000000d0 +#define GMC_DST_8BPP 0x00000200 +#define GMC_DST_15BPP 0x00000300 +#define GMC_DST_16BPP 0x00000400 +#define GMC_DST_24BPP 0x00000500 +#define GMC_DST_32BPP 0x00000600 +#define GMC_DST_8BPP_RGB332 0x00000700 +#define GMC_DST_8BPP_Y8 0x00000800 +#define GMC_DST_8BPP_RGB8 0x00000900 +#define GMC_DST_16BPP_VYUY422 0x00000b00 +#define GMC_DST_16BPP_YVYU422 0x00000c00 +#define GMC_DST_32BPP_AYUV444 0x00000e00 +#define GMC_DST_16BPP_ARGB4444 0x00000f00 +#define GMC_SRC_MONO 0x00000000 +#define GMC_SRC_MONO_LBKGD 0x00001000 +#define GMC_SRC_DSTCOLOR 0x00003000 +#define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 +#define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 +#define GMC_DP_CONVERSION_TEMP_9300 0x00008000 +#define GMC_DP_CONVERSION_TEMP_6500 0x00000000 +#define GMC_DP_SRC_RECT 0x02000000 +#define GMC_DP_SRC_HOST 0x03000000 +#define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 +#define GMC_3D_FCN_EN_CLR 0x00000000 +#define GMC_3D_FCN_EN_SET 0x08000000 +#define GMC_DST_CLR_CMP_FCN_LEAVE 0x00000000 +#define GMC_DST_CLR_CMP_FCN_CLEAR 0x10000000 +#define GMC_AUX_CLIP_LEAVE 0x00000000 +#define GMC_AUX_CLIP_CLEAR 0x20000000 +#define GMC_WRITE_MASK_LEAVE 0x00000000 +#define GMC_WRITE_MASK_SET 0x40000000 +#define GMC_CLR_CMP_CNTL_DIS (1 << 28) +#define GMC_SRC_DATATYPE_COLOR (3 << 12) +#define ROP3_S 0x00cc0000 +#define ROP3_SRCCOPY 0x00cc0000 +#define ROP3_P 0x00f00000 +#define ROP3_PATCOPY 0x00f00000 +#define DP_SRC_SOURCE_MASK (7 << 24) +#define GMC_BRUSH_NONE (15 << 4) +#define DP_SRC_SOURCE_MEMORY (2 << 24) +#define GMC_BRUSH_SOLIDCOLOR 0x000000d0 + +/* DP_MIX bit constants */ +#define DP_SRC_RECT 0x00000200 +#define DP_SRC_HOST 0x00000300 +#define DP_SRC_HOST_BYTEALIGN 0x00000400 + + +/* masks */ + +#define CONFIG_MEMSIZE_MASK 0x1f000000 +#define MEM_CFG_TYPE 0x40000000 +#define DST_OFFSET_MASK 0x003fffff +#define DST_PITCH_MASK 0x3fc00000 +#define DEFAULT_TILE_MASK 0xc0000000 +#define PPLL_DIV_SEL_MASK 0x00000300 +#define PPLL_RESET 0x00000001 +#define PPLL_ATOMIC_UPDATE_EN 0x00010000 +#define PPLL_REF_DIV_MASK 0x000003ff +#define PPLL_FB3_DIV_MASK 0x000007ff +#define PPLL_POST3_DIV_MASK 0x00070000 +#define PPLL_ATOMIC_UPDATE_R 0x00008000 +#define PPLL_ATOMIC_UPDATE_W 0x00008000 +#define PPLL_VGA_ATOMIC_UPDATE_EN 0x00020000 + +#define GUI_ACTIVE 0x80000000 + +#endif /* _RADEON_H */ + |
