From: Aivils S. <ai...@us...> - 2004-04-23 07:37:08
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/include/linux Modified Files: fb.h tty.h vt_kern.h Log Message: sync to 2.6.5 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fb.h 20 Feb 2004 06:52:19 -0000 1.2 +++ fb.h 23 Apr 2004 07:36:56 -0000 1.3 @@ -152,6 +152,7 @@ #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ +#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ #define FB_ACCELF_TEXT 1 /* text mode acceleration */ @@ -235,15 +236,71 @@ #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 +/* Definitions below are used in the parsed monitor specs */ +#define FB_DPMS_ACTIVE_OFF 1 +#define FB_DPMS_SUSPEND 2 +#define FB_DPMS_STANDBY 4 + +#define FB_DISP_DDI 1 +#define FB_DISP_ANA_700_300 2 +#define FB_DISP_ANA_714_286 4 +#define FB_DISP_ANA_1000_400 8 +#define FB_DISP_ANA_700_000 16 + +#define FB_DISP_MONO 32 +#define FB_DISP_RGB 64 +#define FB_DISP_MULTI 128 +#define FB_DISP_UNKNOWN 256 + +#define FB_SIGNAL_NONE 0 +#define FB_SIGNAL_BLANK_BLANK 1 +#define FB_SIGNAL_SEPARATE 2 +#define FB_SIGNAL_COMPOSITE 4 +#define FB_SIGNAL_SYNC_ON_GREEN 8 +#define FB_SIGNAL_SERRATION_ON 16 + +#define FB_MISC_PRIM_COLOR 1 +#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ + +struct fb_chroma { + __u32 redx; /* in fraction of 1024 */ + __u32 greenx; + __u32 bluex; + __u32 whitex; + __u32 redy; + __u32 greeny; + __u32 bluey; + __u32 whitey; +}; + struct fb_monspecs { + struct fb_chroma chroma; + struct fb_videomode *modedb; /* mode database */ + __u8 manufacturer[4]; /* Manufacturer */ + __u8 monitor[14]; /* Monitor String */ + __u8 serial_no[14]; /* Serial Number */ + __u8 ascii[14]; /* ? */ + __u32 modedb_len; /* mode database length */ + __u32 model; /* Monitor Model */ + __u32 serial; /* Serial Number - Integer */ + __u32 year; /* Year manufactured */ + __u32 week; /* Week Manufactured */ __u32 hfmin; /* hfreq lower limit (Hz) */ - __u32 hfmax; /* hfreq upper limit (Hz) */ + __u32 hfmax; /* hfreq upper limit (Hz) */ + __u32 dclkmin; /* pixelclock lower limit (Hz) */ + __u32 dclkmax; /* pixelclock upper limit (Hz) */ + __u16 input; /* display type - see FB_DISP_* */ + __u16 dpms; /* DPMS support - see FB_DPMS_ */ + __u16 signal; /* Signal Type - see FB_SIGNAL_* */ __u16 vfmin; /* vfreq lower limit (Hz) */ __u16 vfmax; /* vfreq upper limit (Hz) */ - __u32 dclkmin; /* pixelclock lower limit (Hz) */ - __u32 dclkmax; /* pixelclock upper limit (Hz) */ - unsigned gtf : 1; /* supports GTF */ - unsigned dpms : 1; /* supports DPMS */ + __u16 gamma; /* Gamma - in fractions of 100 */ + __u16 gtf : 1; /* supports GTF */ + __u16 misc; /* Misc flags - see FB_MISC_* */ + __u8 version; /* EDID version... */ + __u8 revision; /* ...and revision */ + __u8 max_x; /* Maximum horizontal size (cm) */ + __u8 max_y; /* Maximum vertical size (cm) */ }; #define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ @@ -373,94 +430,91 @@ #define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */ struct fb_pixmap { - u8 *addr; /* pointer to memory */ - u32 size; /* size of buffer in bytes */ - u32 offset; /* current offset to buffer */ - u32 buf_align; /* byte alignment of each bitmap */ - u32 scan_align; /* alignment per scanline */ - u32 access_align; /* alignment per read/write */ - u32 flags; /* see FB_PIXMAP_* */ - /* access methods */ - void (*outbuf)(u8 *dst, u8 *addr, unsigned int size); - u8 (*inbuf) (u8 *addr); + u8 *addr; /* pointer to memory */ + u32 size; /* size of buffer in bytes */ + u32 offset; /* current offset to buffer */ + u32 buf_align; /* byte alignment of each bitmap */ + u32 scan_align; /* alignment per scanline */ + u32 access_align; /* alignment per read/write */ + u32 flags; /* see FB_PIXMAP_* */ + /* access methods */ + void (*outbuf)(struct fb_info *info, u8 *addr, u8 *src, unsigned int size); + u8 (*inbuf) (struct fb_info *info, u8 *addr); }; - /* - * Frame buffer operations - */ + +/* + * Frame buffer operations + * + * LOCKING NOTE: those functions must _ALL_ be called with the console + * semaphore held, this is the only suitable locking mecanism we have + * in 2.6. Some may be called at interrupt time at this point though. + */ struct fb_ops { - /* open/release and usage marking */ - struct module *owner; - int (*fb_open)(struct fb_info *info, int user); - int (*fb_release)(struct fb_info *info, int user); + /* open/release and usage marking */ + struct module *owner; + int (*fb_open)(struct fb_info *info, int user); + int (*fb_release)(struct fb_info *info, int user); - /* 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); + /* For framebuffers with strange non linear layouts or that do not + * work with normal memory mapped access + */ + 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 eventually tweaks it to something supported, * DO NOT MODIFY PAR */ - int (*fb_check_var) (struct fb_var_screeninfo * var, - struct fb_info * info); + int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); + /* set the video mode according to info->var */ - int (*fb_set_par)(struct fb_info *info); + int (*fb_set_par)(struct fb_info *info); - /* set color register */ - int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, - unsigned blue, unsigned transp, - struct fb_info * info); + /* set color register */ + int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, + unsigned blue, unsigned transp, struct fb_info *info); - /* blank display */ - int (*fb_blank)(int blank, struct fb_info *info); + /* blank display */ + int (*fb_blank)(int blank, struct fb_info *info); - /* pan display */ - int (*fb_pan_display) (struct fb_var_screeninfo * var, - struct fb_info * info); + /* pan display */ + int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info); - /* draws a rectangle */ - void (*fb_fillrect) (struct fb_info * info, - const struct fb_fillrect * rect); - /* Copy data from area to another */ - void (*fb_copyarea) (struct fb_info * info, - const struct fb_copyarea * region); - /* Draws a image to the display */ - void (*fb_imageblit) (struct fb_info * info, - const struct fb_image * image); + /* Draws a rectangle */ + void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect); + /* Copy data from area to another */ + void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); + /* Draws a image to the display */ + void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); - /* Draws cursor */ - int (*fb_cursor) (struct fb_info * info, - struct fb_cursor * cursor); + /* 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); + /* Rotates the display */ + void (*fb_rotate)(struct fb_info *info, int angle); - /* wait for blit idle, optional */ - int (*fb_sync)(struct fb_info *info); + /* 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, - struct fb_info * info); + /* perform fb specific ioctl (optional) */ + int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, + 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); + /* perform fb specific mmap */ + int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); }; struct fb_info { int node; int flags; - int open; /* Has this been open already ? */ #define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */ 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 work_struct queue; /* Framebuffer event queue */ - struct fb_pixmap pixmap; /* Image Hardware Mapper */ + struct fb_pixmap pixmap; /* Image hardware mapper */ + struct fb_pixmap sprite; /* Cursor hardware mapper */ struct fb_cmap cmap; /* Current cmap */ struct fb_ops *fbops; char *screen_base; /* Virtual address */ @@ -470,6 +524,7 @@ #define FBINFO_STATE_RUNNING 0 #define FBINFO_STATE_SUSPENDED 1 u32 state; /* Hardware state i.e suspend */ + /* From here on everything is device dependent */ void *par; }; @@ -480,12 +535,14 @@ #define FBINFO_FLAG_DEFAULT 0 #endif +// This will go away #if defined(__sparc__) /* We map all of our framebuffers such that big-endian accesses * are what we want, so the following is sufficient. */ +// This will go away #define fb_readb sbus_readb #define fb_readw sbus_readw #define fb_readl sbus_readl @@ -496,7 +553,7 @@ #define fb_writeq sbus_writeq #define fb_memset sbus_memset_io -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) +#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) #define fb_readb __raw_readb #define fb_readw __raw_readw @@ -539,14 +596,16 @@ extern int unregister_framebuffer(struct fb_info *fb_info); extern int fb_prepare_logo(struct fb_info *fb_info); extern int fb_show_logo(struct fb_info *fb_info); -extern u32 fb_get_buffer_offset(struct fb_info *info, u32 size); -extern void move_buf_unaligned(struct fb_info *info, u8 * dst, u8 * src, - u32 d_pitch, u32 height, u32 mask, - u32 shift_high, u32 shift_low, u32 mod, - u32 idx); -extern void move_buf_aligned(struct fb_info *info, u8 * dst, u8 * src, - u32 d_pitch, u32 s_pitch, u32 height); +extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); +extern void fb_move_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, + u8 *dst, u32 d_pitch, u8 *src, u32 idx, + u32 height, u32 shift_high, u32 shift_low, u32 mod); +extern void fb_move_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, + u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, + u32 height); +extern void fb_load_cursor_image(struct fb_info *); extern void fb_set_suspend(struct fb_info *info, int state); + extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -555,24 +614,32 @@ extern void framebuffer_release(struct fb_info *info); /* drivers/video/fbmon.c */ -#define FB_MAXTIMINGS 0 -#define FB_VSYNCTIMINGS 1 -#define FB_HSYNCTIMINGS 2 -#define FB_DCLKTIMINGS 3 -#define FB_IGNOREMON 0x100 +#define FB_MAXTIMINGS 0 +#define FB_VSYNCTIMINGS 1 +#define FB_HSYNCTIMINGS 2 +#define FB_DCLKTIMINGS 3 +#define FB_IGNOREMON 0x100 + +#define FB_MODE_IS_UNKNOWN 0 +#define FB_MODE_IS_DETAILED 1 +#define FB_MODE_IS_STANDARD 2 +#define FB_MODE_IS_VESA 4 +#define FB_MODE_IS_CALCULATED 8 +#define FB_MODE_IS_FIRST 16 extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, const struct fb_info *fb_info); extern int fbmon_dpms(const struct fb_info *fb_info); extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_info *info); -extern int fb_validate_mode(struct fb_var_screeninfo *var, +extern int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info); -extern int parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); +extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); +extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs); +extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs); extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs); extern struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize); extern void fb_destroy_modedb(struct fb_videomode *modedb); -extern void show_edid(unsigned char *edid); /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 @@ -587,58 +654,28 @@ extern void fb_invert_cmaps(void); struct fb_videomode { - const char *name; /* optional */ - u32 refresh; /* optional */ - u32 xres; - u32 yres; - u32 pixclock; - u32 left_margin; - u32 right_margin; - u32 upper_margin; - u32 lower_margin; - u32 hsync_len; - u32 vsync_len; - u32 sync; - u32 vmode; + const char *name; /* optional */ + u32 refresh; /* optional */ + u32 xres; + u32 yres; + u32 pixclock; + u32 left_margin; + u32 right_margin; + u32 upper_margin; + u32 lower_margin; + u32 hsync_len; + u32 vsync_len; + u32 sync; + u32 vmode; + u32 flag; }; -#ifdef MODULE -static inline int fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, - const char *mode_option, - const struct fb_videomode *db, - unsigned int dbsize, - const struct fb_videomode *default_mode, - unsigned int default_bpp) -{ - extern int __fb_try_mode(struct fb_var_screeninfo *var, - struct fb_info *info, - const struct fb_videomode *mode, - unsigned int bpp); - /* - * FIXME: How to make the compiler optimize vga640x400 away if - * default_mode is non-NULL? - */ - static const struct fb_videomode vga640x400 = { - /* 640x400 @ 70 Hz, 31.5 kHz hsync */ - NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, - 0, FB_VMODE_NONINTERLACED - }; - if (!default_mode) - default_mode = &vga640x400; - if (!default_bpp) - default_bpp = 8; - return __fb_try_mode(var, info, default_mode, default_bpp); -} -#else -extern int __init fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, - const char *mode_option, - const struct fb_videomode *db, - unsigned int dbsize, - const struct fb_videomode *default_mode, - unsigned int default_bpp); -#endif +extern int fb_find_mode(struct fb_var_screeninfo *var, + struct fb_info *info, const char *mode_option, + const struct fb_videomode *db, + unsigned int dbsize, + const struct fb_videomode *default_mode, + unsigned int default_bpp); #endif /* __KERNEL__ */ Index: tty.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/tty.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tty.h 14 Nov 2003 17:44:23 -0000 1.3 +++ tty.h 23 Apr 2004 07:36:56 -0000 1.4 @@ -18,29 +18,13 @@ /* - * Note: don't mess with NR_PTYS until you understand the tty minor - * number allocation game... * (Note: the *_driver.minor_start values 1, 64, 128, 192 are * hardcoded at present.) */ -#define NR_PTYS 256 /* ptys/major */ -#define NR_LDISCS 16 - -/* - * Unix98 PTY's can be defined as any multiple of NR_PTYS up to - * UNIX98_PTY_MAJOR_COUNT; this section defines what we need from the - * config options - */ -#ifdef CONFIG_UNIX98_PTYS -# define UNIX98_NR_MAJORS ((CONFIG_UNIX98_PTY_COUNT+NR_PTYS-1)/NR_PTYS) -# if UNIX98_NR_MAJORS <= 0 -# undef CONFIG_UNIX98_PTYS -# elif UNIX98_NR_MAJORS > UNIX98_PTY_MAJOR_COUNT -# error Too many Unix98 ptys defined -# undef UNIX98_NR_MAJORS -# define UNIX98_NR_MAJORS UNIX98_PTY_MAJOR_COUNT -# endif -#endif +#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ +#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ +#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ +#define NR_LDISCS 16 /* * These are set up by the setup-routine at boot-time: @@ -190,6 +174,7 @@ #define I_IXANY(tty) _I_FLAG((tty),IXANY) #define I_IXOFF(tty) _I_FLAG((tty),IXOFF) #define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL) +#define I_IUTF8(tty) _I_FLAG((tty),IUTF8) #define O_OPOST(tty) _O_FLAG((tty),OPOST) #define O_OLCUC(tty) _O_FLAG((tty),OLCUC) Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- vt_kern.h 20 Feb 2004 06:52:19 -0000 1.9 +++ vt_kern.h 23 Apr 2004 07:36:56 -0000 1.10 @@ -196,7 +196,7 @@ int (*con_scroll_region)(struct vc_data *, int, int, int, int); void (*con_bmove)(struct vc_data *, int, int, int, int, int, int); int (*con_switch)(struct vc_data *); - int (*con_blank)(struct vc_data *, int); + int (*con_blank)(struct vc_data *, int, 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 *); @@ -268,7 +268,7 @@ /* vt.c */ /* Some debug stub to catch some of the obvious races in the VT code */ -#if 0 +#if 1 #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) #else #define WARN_CONSOLE_UNLOCKED() |