diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
commit | 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d (patch) | |
tree | 357efc7b93f8f5102110d20d293f41360ec212fc /include/video | |
parent | aea27b2e18d69af87e673972246e66657b4fa274 (diff) |
Merge with Linux 2.3.21.
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/fbcon.h | 46 | ||||
-rw-r--r-- | include/video/macmodes.h | 3 | ||||
-rw-r--r-- | include/video/newport.h | 20 |
3 files changed, 45 insertions, 24 deletions
diff --git a/include/video/fbcon.h b/include/video/fbcon.h index 1d972dda3..1cca4c90f 100644 --- a/include/video/fbcon.h +++ b/include/video/fbcon.h @@ -16,6 +16,8 @@ #include <linux/console_struct.h> #include <linux/vt_buffer.h> +#include <asm/io.h> + /* * `switch' for the Low Level Operations @@ -179,7 +181,7 @@ extern void fbcon_redraw_bmove(struct display *, int, int, int, int, int, int); movep is rather expensive compared to ordinary move's some functions rewritten in C for clarity, no speed loss */ -static __inline__ void *mymemclear_small(void *s, size_t count) +static __inline__ void *fb_memclear_small(void *s, size_t count) { if (!count) return(0); @@ -202,7 +204,7 @@ static __inline__ void *mymemclear_small(void *s, size_t count) } -static __inline__ void *mymemclear(void *s, size_t count) +static __inline__ void *fb_memclear(void *s, size_t count) { if (!count) return(0); @@ -244,7 +246,7 @@ static __inline__ void *mymemclear(void *s, size_t count) } -static __inline__ void *mymemset(void *s, size_t count) +static __inline__ void *fb_memset255(void *s, size_t count) { if (!count) return(0); @@ -267,7 +269,7 @@ static __inline__ void *mymemset(void *s, size_t count) } -static __inline__ void *mymemmove(void *d, const void *s, size_t count) +static __inline__ void *fb_memmove(void *d, const void *s, size_t count) { if (d < s) { if (count < 16) { @@ -389,17 +391,17 @@ static __inline__ void *sun4_memset(void *s, char val, size_t count) return s; } -static __inline__ void *mymemset(void *s, size_t count) +static __inline__ void *fb_memset255(void *s, size_t count) { return sun4_memset(s, 255, count); } -static __inline__ void *mymemclear(void *s, size_t count) +static __inline__ void *fb_memclear(void *s, size_t count) { return sun4_memset(s, 0, count); } -static __inline__ void *mymemclear_small(void *s, size_t count) +static __inline__ void *fb_memclear_small(void *s, size_t count) { return sun4_memset(s, 0, count); } @@ -416,7 +418,7 @@ static __inline__ void fast_memmove(void *d, const void *s, size_t count) ((char *) d)[count-i-1] = ((char *) s)[count-i-1]; } -static __inline__ void *mymemmove(char *dst, const char *src, size_t size) +static __inline__ void *fb_memmove(char *dst, const char *src, size_t size) { fast_memmove(dst, src, size); return dst; @@ -424,17 +426,17 @@ static __inline__ void *mymemmove(char *dst, const char *src, size_t size) #else -static __inline__ void *mymemclear_small(void *s, size_t count) +static __inline__ void *fb_memclear_small(void *s, size_t count) { return(memset(s, 0, count)); } -static __inline__ void *mymemclear(void *s, size_t count) +static __inline__ void *fb_memclear(void *s, size_t count) { return(memset(s, 0, count)); } -static __inline__ void *mymemset(void *s, size_t count) +static __inline__ void *fb_memset255(void *s, size_t count) { return(memset(s, 255, count)); } @@ -484,7 +486,7 @@ __asm__ __volatile__ ( } } -static __inline__ void *mymemmove(char *dst, const char *src, size_t size) +static __inline__ void *fb_memmove(char *dst, const char *src, size_t size) { fast_memmove(dst, src, size); return dst; @@ -497,7 +499,7 @@ static __inline__ void *mymemmove(char *dst, const char *src, size_t size) * (Why are these functions better than those from include/asm/string.h?) */ -static __inline__ void *mymemmove(void *d, const void *s, size_t count) +static __inline__ void *fb_memmove(void *d, const void *s, size_t count) { return(memmove(d, s, count)); } @@ -512,7 +514,21 @@ static __inline__ void fast_memmove(char *dst, const char *src, size_t size) #endif -#if defined(__i386__) || defined(__alpha__) +#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__) #define fb_readb __raw_readb #define fb_readw __raw_readw @@ -520,6 +536,7 @@ static __inline__ void fast_memmove(char *dst, const char *src, size_t size) #define fb_writeb __raw_writeb #define fb_writew __raw_writew #define fb_writel __raw_writel +#define fb_memset memset_io #else @@ -529,6 +546,7 @@ static __inline__ void fast_memmove(char *dst, const char *src, size_t size) #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 diff --git a/include/video/macmodes.h b/include/video/macmodes.h index c459987e3..1bdfa815b 100644 --- a/include/video/macmodes.h +++ b/include/video/macmodes.h @@ -52,6 +52,9 @@ extern int mac_vmode_to_var(int vmode, int cmode, 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); /* diff --git a/include/video/newport.h b/include/video/newport.h index 2f094e321..bfd2af7b1 100644 --- a/include/video/newport.h +++ b/include/video/newport.h @@ -12,7 +12,7 @@ #define _SGI_NEWPORT_H -typedef volatile unsigned long npireg_t; +typedef volatile unsigned int npireg_t; union npfloat { volatile float flt; @@ -143,7 +143,7 @@ struct newport_rexregs { npireg_t colorback; /* Background color */ npireg_t colorvram; /* Clear color for fast vram */ npireg_t alpharef; /* Reference value for afunctions */ - unsigned long pad0; + unsigned int pad0; npireg_t smask0x; /* Window GL relative screen mask 0 */ npireg_t smask0y; /* Window GL relative screen mask 0 */ npireg_t _setup; @@ -151,7 +151,7 @@ struct newport_rexregs { npireg_t _lsrestore; npireg_t _lssave; - unsigned long _pad1[0x30]; + unsigned int _pad1[0x30]; /* Iterators, full state for context switch */ npfreg_t _xstart; /* X-start point (current) */ @@ -178,7 +178,7 @@ struct newport_rexregs { npireg_t xyendi; npireg_t xstartendi; - unsigned long _unused2[0x29]; + unsigned int _unused2[0x29]; npfreg_t colorred; npfreg_t coloralpha; @@ -223,7 +223,7 @@ struct newport_rexregs { #define NPORT_DMODE_CSMASK 0x0f800000 #define NPORT_DMODE_SENDIAN 0x10000000 - unsigned long _unused3; + unsigned int _unused3; union np_dcb dcbdata0; npireg_t dcbdata1; @@ -248,8 +248,8 @@ struct newport_cregs { #define NPORT_CMODE_SM4 0x00000010 #define NPORT_CMODE_CMSK 0x00001e00 - unsigned long _unused0; - unsigned long config; + unsigned int _unused0; + unsigned int config; #define NPORT_CFG_G32MD 0x00000001 #define NPORT_CFG_BWIDTH 0x00000002 #define NPORT_CFG_ERCVR 0x00000004 @@ -284,11 +284,11 @@ struct newport_cregs { struct newport_regs { struct newport_rexregs set; - unsigned long _unused0[0x16e]; + unsigned int _unused0[0x16e]; struct newport_rexregs go; - unsigned long _unused1[0x22e]; + unsigned int _unused1[0x22e]; struct newport_cregs cset; - unsigned long _unused2[0x1ef]; + unsigned int _unused2[0x1ef]; struct newport_cregs cgo; }; extern struct newport_regs *npregs; |