You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
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() |
From: Aivils S. <ai...@us...> - 2004-04-23 07:37:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: sync to 2.6.5 Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fbmem.c 20 Feb 2004 06:52:18 -0000 1.5 +++ fbmem.c 23 Apr 2004 07:36:56 -0000 1.6 @@ -55,7 +55,6 @@ extern int acornfb_setup(char*); extern int amifb_init(void); extern int amifb_setup(char*); -extern int anakinfb_init(void); extern int atafb_init(void); extern int atafb_setup(char*); extern int macfb_init(void); @@ -178,9 +177,6 @@ #ifdef CONFIG_FB_AMIGA { "amifb", amifb_init, amifb_setup }, #endif -#ifdef CONFIG_FB_ANAKIN - { "anakinfb", anakinfb_init, NULL }, -#endif #ifdef CONFIG_FB_CLPS711X { "clps711xfb", clps711xfb_init, NULL }, #endif @@ -392,7 +388,7 @@ }; #define NUM_FB_DRIVERS (sizeof(fb_drivers)/sizeof(*fb_drivers)) -#define FBPIXMAPSIZE 8192 +#define FBPIXMAPSIZE 16384 extern const char *global_mode_option; @@ -409,52 +405,54 @@ /* * Drawing helpers. */ -u8 sys_inbuf(u8 *src) +u8 sys_inbuf(struct fb_info *info, u8 *src) { return *src; } -void sys_outbuf(u8 *src, u8 *dst, unsigned int size) +void sys_outbuf(struct fb_info *info, u8 *dst, u8 *src, unsigned int size) { memcpy(dst, src, size); } -void move_buf_aligned(struct fb_info *info, u8 *dst, u8 *src, u32 d_pitch, - u32 s_pitch, u32 height) +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) { int i; for (i = height; i--; ) { - info->pixmap.outbuf(src, dst, s_pitch); + buf->outbuf(info, dst, src, s_pitch); src += s_pitch; dst += d_pitch; } } -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) +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) { + u8 mask = (u8) (0xfff << shift_high), tmp; int i, j; - u8 tmp; for (i = height; i--; ) { for (j = 0; j < idx; j++) { - tmp = info->pixmap.inbuf(dst+j); + tmp = buf->inbuf(info, dst+j); tmp &= mask; tmp |= *src >> shift_low; - info->pixmap.outbuf(&tmp, dst+j, 1); + buf->outbuf(info, dst+j, &tmp, 1); tmp = *src << shift_high; - info->pixmap.outbuf(&tmp, dst+j+1, 1); + buf->outbuf(info, dst+j+1, &tmp, 1); src++; } - tmp = info->pixmap.inbuf(dst+idx); + tmp = buf->inbuf(info, dst+idx); tmp &= mask; tmp |= *src >> shift_low; - info->pixmap.outbuf(&tmp, dst+idx, 1); + buf->outbuf(info, dst+idx, &tmp, 1); if (shift_high < mod) { tmp = *src << shift_high; - info->pixmap.outbuf(&tmp, dst+idx+1, 1); + buf->outbuf(info, dst+idx+1, &tmp, 1); } src++; dst += d_pitch; @@ -465,10 +463,10 @@ * we need to lock this section since fb_cursor * may use fb_imageblit() */ -u32 fb_get_buffer_offset(struct fb_info *info, u32 size) +char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size) { - struct fb_pixmap *buf = &info->pixmap; u32 align = buf->buf_align - 1, offset; + char *addr = buf->addr; /* If IO mapped, we need to sync before access, no sharing of * the pixmap is done @@ -476,7 +474,7 @@ if (buf->flags & FB_PIXMAP_IO) { if (info->fbops->fb_sync && (buf->flags & FB_PIXMAP_SYNC)) info->fbops->fb_sync(info); - return 0; + return addr; } /* See if we fit in the remaining pixmap space */ @@ -492,8 +490,9 @@ offset = 0; } buf->offset = offset + size; + addr += offset; - return offset; + return addr; } #ifdef CONFIG_LOGO @@ -866,6 +865,15 @@ } #endif /* CONFIG_KMOD */ +void +fb_load_cursor_image(struct fb_info *info) +{ + unsigned int width = (info->cursor.image.width + 7) >> 3; + u8 *data = (u8 *) info->cursor.image.data; + + info->sprite.outbuf(info, info->sprite.addr, data, width); +} + int fb_cursor(struct fb_info *info, struct fb_cursor *sprite) { @@ -940,7 +948,8 @@ { int err; - if (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { + if ((var->activate & FB_ACTIVATE_FORCE) || + memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { if (!info->fbops->fb_check_var) { *var = info->var; return 0; @@ -1184,11 +1193,9 @@ #elif defined(__mips__) pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK; pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED; -#elif defined(__sh__) - pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE; #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; -#elif defined(__ia64__) || defined(__arm__) +#elif defined(__ia64__) || defined(__arm__) || defined(__sh__) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #else #warning What do we have to do here?? @@ -1292,6 +1299,21 @@ if (fb_info->pixmap.inbuf == NULL) fb_info->pixmap.inbuf = sys_inbuf; + if (fb_info->sprite.addr == NULL) { + fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); + if (fb_info->sprite.addr) { + fb_info->sprite.size = FBPIXMAPSIZE; + fb_info->sprite.buf_align = 1; + fb_info->sprite.scan_align = 1; + fb_info->sprite.flags = FB_PIXMAP_DEFAULT; + } + } + fb_info->sprite.offset = 0; + if (fb_info->sprite.outbuf == NULL) + fb_info->sprite.outbuf = sys_outbuf; + if (fb_info->sprite.inbuf == NULL) + fb_info->sprite.inbuf = sys_inbuf; + registered_fb[i] = fb_info; devfs_mk_cdev(MKDEV(FB_MAJOR, i), @@ -1322,8 +1344,10 @@ notifier_call_chain(&fb_notifier_list, FB_EVENT_DELETE_CONSOLE, fb_info); devfs_remove("fb/%d", i); - if (fb_info->pixmap.addr) + if (fb_info->pixmap.addr && (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) kfree(fb_info->pixmap.addr); + if (fb_info->sprite.addr && (fb_info->sprite.flags & FB_PIXMAP_DEFAULT)) + kfree(fb_info->sprite.addr); registered_fb[i]=NULL; num_registered_fb--; return 0; @@ -1478,8 +1502,9 @@ EXPORT_SYMBOL(fb_blank); EXPORT_SYMBOL(fb_pan_display); EXPORT_SYMBOL(fb_get_buffer_offset); -EXPORT_SYMBOL(move_buf_unaligned); -EXPORT_SYMBOL(move_buf_aligned); +EXPORT_SYMBOL(fb_move_buf_unaligned); +EXPORT_SYMBOL(fb_move_buf_aligned); +EXPORT_SYMBOL(fb_load_cursor_image); EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); |
From: Aivils S. <ai...@us...> - 2004-04-23 07:37:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.5 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- setup.c 20 Feb 2004 06:52:18 -0000 1.7 +++ setup.c 23 Apr 2004 07:36:55 -0000 1.8 @@ -38,10 +38,10 @@ #include <linux/module.h> #include <linux/efi.h> #include <linux/init.h> +#include <linux/edd.h> #include <video/edid.h> #include <asm/e820.h> #include <asm/mpspec.h> -#include <asm/edd.h> #include <asm/setup.h> #include <asm/arch_hooks.h> #include <asm/sections.h> @@ -50,6 +50,11 @@ #include "setup_arch_pre.h" #include "mach_resources.h" +/* This value is set up by the early boot code to point to the value + immediately after the boot time page tables. It contains a *physical* + address, and must not be in the .bss segment! */ +unsigned long init_pg_tables_end __initdata = ~0UL; + int disable_pse __initdata = 0; static inline char * __init machine_specific_memory_setup(void); @@ -78,8 +83,8 @@ EXPORT_SYMBOL(acpi_disabled); #ifdef CONFIG_ACPI_BOOT -extern int __initdata acpi_ht; int __initdata acpi_force = 0; +extern acpi_interrupt_flags acpi_sci_flags; #endif int MCA_bus; @@ -115,7 +120,6 @@ extern void dmi_scan_machine(void); extern void generic_apic_probe(char *); extern int root_mountflags; -extern char _end[]; unsigned long saved_videomode; @@ -126,6 +130,8 @@ static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; +unsigned char __initdata boot_params[PARAM_SIZE]; + static struct resource code_resource = { "Kernel code", 0x100000, 0 }; static struct resource data_resource = { "Kernel data", 0, 0 }; @@ -452,7 +458,7 @@ #endif /** * copy_edd() - Copy the BIOS EDD information - * from empty_zero_page into a safe place. + * from boot_params into a safe place. * */ static inline void copy_edd(void) @@ -481,12 +487,11 @@ static void __init parse_cmdline_early (char ** cmdline_p) { - char c = ' ', *to = command_line, *from = COMMAND_LINE; + char c = ' ', *to = command_line, *from = saved_command_line; int len = 0; int userdef = 0; /* Save unparsed command line copy for /proc/cmdline */ - memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; for (;;) { @@ -555,24 +560,41 @@ } } +#ifdef CONFIG_X86_SMP + /* + * If the BIOS enumerates physical processors before logical, + * maxcpus=N at enumeration-time can be used to disable HT. + */ + else if (!memcmp(from, "maxcpus=", 8)) { + extern unsigned int maxcpus; + + maxcpus = simple_strtoul(from + 8, NULL, 0); + } +#endif + #ifdef CONFIG_ACPI_BOOT /* "acpi=off" disables both ACPI table parsing and interpreter */ else if (!memcmp(from, "acpi=off", 8)) { - acpi_ht = 0; - acpi_disabled = 1; + disable_acpi(); } /* acpi=force to over-ride black-list */ else if (!memcmp(from, "acpi=force", 10)) { acpi_force = 1; - acpi_ht=1; + acpi_ht = 1; acpi_disabled = 0; } + /* acpi=strict disables out-of-spec workarounds */ + else if (!memcmp(from, "acpi=strict", 11)) { + acpi_strict = 1; + } + /* Limit ACPI just to boot-time to enable HT */ else if (!memcmp(from, "acpi=ht", 7)) { + if (!acpi_force) + disable_acpi(); acpi_ht = 1; - if (!acpi_force) acpi_disabled = 1; } /* "pci=noacpi" disables ACPI interrupt routing */ @@ -580,6 +602,18 @@ acpi_noirq_set(); } + else if (!memcmp(from, "acpi_sci=edge", 13)) + acpi_sci_flags.trigger = 1; + + else if (!memcmp(from, "acpi_sci=level", 14)) + acpi_sci_flags.trigger = 3; + + else if (!memcmp(from, "acpi_sci=high", 13)) + acpi_sci_flags.polarity = 1; + + else if (!memcmp(from, "acpi_sci=low", 12)) + acpi_sci_flags.polarity = 3; + #ifdef CONFIG_X86_LOCAL_APIC /* disable IO-APIC */ else if (!memcmp(from, "noapic", 6)) @@ -785,7 +819,7 @@ * partially used pages are not usable - thus * we are rounding upwards: */ - start_pfn = PFN_UP(__pa(_end)); + start_pfn = PFN_UP(init_pg_tables_end); find_max_pfn(); @@ -823,6 +857,13 @@ */ reserve_bootmem(0, PAGE_SIZE); + /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent + PCI prefetch into it (errata #56). Usually the page is reserved anyways, + unless you have no PS/2 mouse plugged in. */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && + boot_cpu_data.x86 == 6) + reserve_bootmem(0xa0000 - 4096, 4096); + #ifdef CONFIG_SMP /* * But first pinch a few for the stack/trampoline stuff @@ -1097,7 +1138,7 @@ init_mm.start_code = (unsigned long) _text; init_mm.end_code = (unsigned long) _etext; init_mm.end_data = (unsigned long) _edata; - init_mm.brk = (unsigned long) _end; + init_mm.brk = init_pg_tables_end + PAGE_OFFSET; code_resource.start = virt_to_phys(_text); code_resource.end = virt_to_phys(_etext)-1; @@ -1118,6 +1159,19 @@ #endif paging_init(); +#ifdef CONFIG_EARLY_PRINTK + { + char *s = strstr(*cmdline_p, "earlyprintk="); + if (s) { + extern void setup_early_printk(char *); + + setup_early_printk(s); + printk("early console enabled\n"); + } + } +#endif + + dmi_scan_machine(); #ifdef CONFIG_X86_GENERICARCH |
From: Aivils S. <ai...@us...> - 2004-04-23 07:37:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.5 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 20 Feb 2004 06:52:18 -0000 1.7 +++ Makefile 23 Apr 2004 07:36:55 -0000 1.8 @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 3 +SUBLEVEL = 5 EXTRAVERSION = -ruby -NAME=Feisty Dunnart +NAME=Zonked Quokka # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -107,6 +107,16 @@ # We process the rest of the Makefile if this is the final invocation of make ifeq ($(skip-makefile),) +# Make sure we're not wasting cpu-cycles doing locale handling, yet do make +# sure error messages appear in the user-desired language +ifdef LC_ALL +LANG := $(LC_ALL) +LC_ALL := +endif +LC_COLLATE := C +LC_CTYPE := C +export LANG LC_ALL LC_COLLATE LC_CTYPE + srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) TOPDIR := $(srctree) # FIXME - TOPDIR is obsolete, use srctree/objtree @@ -304,17 +314,10 @@ # =========================================================================== # Rules shared between *config targets and build targets -# Helpers built in scripts/ - -scripts/docproc scripts/split-include : scripts ; - -.PHONY: scripts scripts/fixdep -scripts: - $(Q)$(MAKE) $(build)=scripts - -scripts/fixdep: - $(Q)$(MAKE) $(build)=scripts $@ - +# Basic helpers built in scripts/ +.PHONY: scripts_basic +scripts_basic: + $(Q)$(MAKE) $(build)=scripts/basic # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to scripts/kconfig/Makefile @@ -358,9 +361,9 @@ # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target -%config: scripts/fixdep FORCE +config: scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -config : scripts/fixdep FORCE +%config: scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ else @@ -368,6 +371,16 @@ # Build targets only - this includes vmlinux, arch specific targets, clean # targets and others. In general all targets except *config targets. +# Additional helpers built in scripts/ +# Carefully list dependencies so we do not try to build scripts twice +# in parrallel +.PHONY: scripts +scripts: scripts_basic include/config/MARKER + $(Q)$(MAKE) $(build)=$(@) + +scripts_basic: include/linux/autoconf.h + + # That's our default target when none is given on the command line # Note that 'modules' will be added as a prerequisite as well, # in the CONFIG_MODULES part below @@ -400,7 +413,9 @@ # with it and forgot to run make oldconfig include/linux/autoconf.h: .config $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig - +else +# Dummy target needed, because used as prerequisite +include/linux/autoconf.h: ; endif include $(srctree)/arch/$(ARCH)/Makefile @@ -558,7 +573,7 @@ # Handle descending into subdirectories listed in $(SUBDIRS) .PHONY: $(SUBDIRS) -$(SUBDIRS): prepare-all +$(SUBDIRS): prepare-all scripts $(Q)$(MAKE) $(build)=$@ # Things we need to do before we recursively start building the kernel @@ -633,9 +648,9 @@ # Split autoconf.h into include/linux/config/* -include/config/MARKER: scripts/split-include include/linux/autoconf.h +include/config/MARKER: include/linux/autoconf.h @echo ' SPLIT include/linux/autoconf.h -> include/config/*' - @scripts/split-include include/linux/autoconf.h include/config + @scripts/basic/split-include include/linux/autoconf.h include/config @touch $@ # Generate some files @@ -647,7 +662,7 @@ uts_len := 64 define filechk_version.h - if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ + if ((`echo -n "$(KERNELRELEASE)" | wc -c ` > $(uts_len))); then \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; \ @@ -757,26 +772,15 @@ # Any core files spread around are deleted as well # make distclean Remove editor backup files, patch leftover files and the like -# Files removed with 'make clean' -CLEAN_FILES += vmlinux System.map MC* +# Directories & files removed with 'make clean' +CLEAN_DIRS += $(MODVERDIR) include/config include2 +CLEAN_FILES += vmlinux System.map \ + include/linux/autoconf.h include/linux/version.h \ + include/asm include/linux/modversions.h \ + kernel.spec .tmp* # Files removed with 'make mrproper' -MRPROPER_FILES += \ - include/linux/autoconf.h include/linux/version.h \ - .version .config .config.old config.in config.old \ - .menuconfig.log \ - include/asm \ - .hdepend include/linux/modversions.h \ - tags TAGS cscope* kernel.spec \ - .tmp* - -# Directories removed with 'make mrproper' -MRPROPER_DIRS += \ - $(MODVERDIR) \ - .tmp_export-objs \ - include/config \ - include/linux/modules \ - include2 +MRPROPER_FILES += .version .config .config.old tags TAGS cscope* # clean - Delete all intermediate files # @@ -785,28 +789,36 @@ $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) -quiet_cmd_rmclean = RM $$(CLEAN_FILES) -cmd_rmclean = rm -f $(CLEAN_FILES) +clean: rm-dirs := $(wildcard $(CLEAN_DIRS)) +mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) +quiet_cmd_rmdirs = $(if $(rm-dirs),CLEAN $(rm-dirs)) + cmd_rmdirs = rm -rf $(rm-dirs) + +clean: rm-files := $(wildcard $(CLEAN_FILES)) +mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) +quiet_cmd_rmfiles = $(if $(rm-files),CLEAN $(rm-files)) + cmd_rmfiles = rm -rf $(rm-files) + clean: archclean $(clean-dirs) - $(call cmd,rmclean) + $(call cmd,rmdirs) + $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f -# mrproper - delete configuration + modules + core files +# mrproper # -quiet_cmd_mrproper = RM $$(MRPROPER_DIRS) + $$(MRPROPER_FILES) -cmd_mrproper = rm -rf $(MRPROPER_DIRS) && rm -f $(MRPROPER_FILES) -mrproper distclean: clean archmrproper - @echo ' Making $@ in the srctree' +distclean: mrproper +mrproper: clean archmrproper + $(call cmd,rmdirs) + $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f - $(call cmd,mrproper) # Generate tags for editors # --------------------------------------------------------------------------- @@ -889,6 +901,9 @@ # Brief documentation of the typical targets used # --------------------------------------------------------------------------- +boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) +boards := $(notdir $(boards)) + help: @echo 'Cleaning targets:' @echo ' clean - remove most generated files but keep the config' @@ -906,6 +921,7 @@ @echo ' dir/file.[ois] - Build specified target only' @echo ' rpm - Build a kernel as an RPM package' @echo ' tags/TAGS - Generate tags file for editors' + @echo ' cscope - Generate cscope index' @echo '' @echo 'Documentation targets:' @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp @@ -914,6 +930,11 @@ @$(if $(archhelp),$(archhelp),\ echo ' No architecture specific help defined for $(ARCH)') @echo '' + @$(if $(boards), \ + $(foreach b, $(boards), \ + printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ + echo '') + @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir [targets] Locate all output files in "dir", including .config' @echo ' make C=1 [targets] Check all c source with checker tool' @@ -924,7 +945,7 @@ # Documentation targets # --------------------------------------------------------------------------- -%docs: scripts/docproc FORCE +%docs: scripts FORCE $(Q)$(MAKE) $(build)=Documentation/DocBook $@ # Scripts to check various things for consistency @@ -977,7 +998,7 @@ @set -e; \ $(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) \ $(cmd_$(1)); \ - scripts/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ + scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ rm -f $(depfile); \ mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) |
From: Aivils S. <ai...@us...> - 2004-04-23 07:37:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/drivers/input Modified Files: input.c Log Message: sync to 2.6.5 Index: input.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input/input.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- input.c 9 Feb 2004 07:31:07 -0000 1.4 +++ input.c 23 Apr 2004 07:36:55 -0000 1.5 @@ -743,6 +743,8 @@ int retval = -ENOMEM; input_class = class_simple_create(THIS_MODULE, "input"); + if (IS_ERR(input_class)) + return PTR_ERR(input_class); input_proc_init(); retval = register_chrdev(INPUT_MAJOR, "input", &input_fops); if (retval) { @@ -750,6 +752,7 @@ remove_proc_entry("devices", proc_bus_input_dir); remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("input", proc_bus); + class_simple_destroy(input_class); return retval; } @@ -759,6 +762,7 @@ remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("input", proc_bus); unregister_chrdev(INPUT_MAJOR, "input"); + class_simple_destroy(input_class); } return retval; } |
From: Aivils S. <ai...@us...> - 2004-04-23 07:37:03
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321 Added Files: AGAINST-2.6.5 Removed Files: AGAINST-2.6.3 Log Message: sync to 2.6.5 --- NEW FILE: AGAINST-2.6.5 --- --- AGAINST-2.6.3 DELETED --- |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:15
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/drivers/char Modified Files: Kconfig Makefile keyboard.c selection.c tty_io.c vc_screen.c vt.c vt_ioctl.c Log Message: sync to 2.6.3 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Kconfig 9 Feb 2004 07:31:07 -0000 1.5 +++ Kconfig 20 Feb 2004 06:52:18 -0000 1.6 @@ -969,12 +969,16 @@ If compiled as a module, it will be called scx200_gpio. config RAW_DRIVER - tristate "RAW driver (/dev/raw/rawN)" + tristate "RAW driver (/dev/raw/rawN) (OBSOLETE)" help The raw driver permits block devices to be bound to /dev/raw/rawN. Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. See the raw(8) manpage for more details. + The raw driver is deprecated and may be removed from 2.7 + kernels. Applications should simply open the device (eg /dev/hda1) + with the O_DIRECT flag. + config MAX_RAW_DEVS int "Maximum number of RAW devices to support (1-8192)" depends on RAW_DRIVER Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 9 Feb 2004 07:33:28 -0000 1.7 +++ Makefile 20 Feb 2004 06:52:18 -0000 1.8 @@ -57,7 +57,9 @@ obj-$(CONFIG_RTC) += rtc.o obj-$(CONFIG_GEN_RTC) += genrtc.o obj-$(CONFIG_EFI_RTC) += efirtc.o -ifeq ($(CONFIG_PPC),) +ifeq ($(CONFIG_GENERIC_NVRAM),y) + obj-$(CONFIG_NVRAM) += generic_nvram.o +else obj-$(CONFIG_NVRAM) += nvram.o endif obj-$(CONFIG_TOSHIBA) += toshiba.o Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- keyboard.c 9 Feb 2004 07:31:07 -0000 1.12 +++ keyboard.c 20 Feb 2004 06:52:18 -0000 1.13 @@ -150,8 +150,7 @@ if (!dev->keycodesize || (scancode < 0 || scancode >= dev->keycodemax)) return -EINVAL; - oldkey = INPUT_KEYCODE(dev, scancode); - INPUT_KEYCODE(dev, scancode) = keycode; + oldkey = SET_INPUT_KEYCODE(dev, scancode, keycode); clear_bit(oldkey, dev->keybit); set_bit(keycode, dev->keybit); @@ -920,11 +919,6 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode, unsigned char up_flag) { -#ifdef CONFIG_MAC_EMUMOUSEBTN - if (mac_hid_mouse_emulate_buttons(1, keycode, !up_flag)) - return 0; -#endif /* CONFIG_MAC_EMUMOUSEBTN */ - if (keycode > 255 || !x86_keycodes[keycode]) return -1; @@ -1001,6 +995,11 @@ rep = (down == 2); +#ifdef CONFIG_MAC_EMUMOUSEBTN + if (mac_hid_mouse_emulate_buttons(1, keycode, down)) + return; +#endif /* CONFIG_MAC_EMUMOUSEBTN */ + if ((raw_mode = (vc->kbd_table.kbdmode == VC_RAW))) if (emulate_raw(vc, keycode, !down << 7)) if (keycode < BTN_MISC) Index: selection.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/selection.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- selection.c 12 Sep 2003 08:33:21 -0000 1.2 +++ selection.c 20 Feb 2004 06:52:18 -0000 1.3 @@ -300,7 +300,10 @@ int pasted = 0, count; DECLARE_WAITQUEUE(wait, current); + acquire_console_sem(); poke_blanked_console(vc->display_fg); + release_console_sem(); + add_wait_queue(&vc->paste_wait, &wait); while (sel_buffer && sel_buffer_lth > pasted) { set_current_state(TASK_INTERRUPTIBLE); Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tty_io.c 9 Feb 2004 07:31:07 -0000 1.7 +++ tty_io.c 20 Feb 2004 06:52:18 -0000 1.8 @@ -1490,8 +1490,14 @@ #ifdef CONFIG_VT if (tty->driver->type == TTY_DRIVER_TYPE_CONSOLE) { struct vc_data *vc = (struct vc_data *) tty->driver_data; - - if (!vc || vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row)) + int rc = 0; + + if (!vc) { + acquire_console_sem(); + rc = vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row); + release_console_sem(); + } + if (rc) return -ENXIO; } #endif @@ -2266,7 +2272,6 @@ if (driver->refcount) return -EBUSY; - cdev_unmap(MKDEV(driver->major, driver->minor_start), driver->num); unregister_chrdev_region(MKDEV(driver->major, driver->minor_start), driver->num); Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vc_screen.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vc_screen.c 2 Oct 2003 09:32:18 -0000 1.3 +++ vc_screen.c 20 Feb 2004 06:52:18 -0000 1.4 @@ -49,13 +49,13 @@ return screenpos(vc, 2 * w_offset, viewed); } -void getconsxy(struct vc_data *vc, char *p) +void getconsxy(struct vc_data *vc, unsigned char *p) { p[0] = vc->vc_x; p[1] = vc->vc_y; } -void putconsxy(struct vc_data *vc, char *p) +void putconsxy(struct vc_data *vc, unsigned char *p) { gotoxy(vc, p[0], p[1]); set_cursor(vc); Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- vt.c 12 Feb 2004 06:33:04 -0000 1.16 +++ vt.c 20 Feb 2004 06:52:18 -0000 1.17 @@ -41,6 +41,7 @@ * - David Carter <ca...@cs...> * * Note that the abstract console driver allows all consoles to be of + * potentially different sizes, so the following variables depend on the * current console (currcons): * @@ -138,7 +139,12 @@ LIST_HEAD(vt_list); /* Head to link list of VTs */ static void vt_flush_chars(struct tty_struct *tty); -static void unblank_screen_t(unsigned long dummy); +static void blank_screen_t(unsigned long dummy); +enum { + blank_off = 0, + blank_normal_wait, + blank_vesa_wait, +}; #ifdef CONFIG_VT_CONSOLE static int kmsg_redirect = 0; /* kmsg_redirect is the VC for printk */ @@ -282,6 +288,8 @@ */ void set_palette(struct vc_data *vc) { + WARN_CONSOLE_UNLOCKED(); + if (IS_VISIBLE && sw->con_set_palette && vcmode != KD_GRAPHICS) sw->con_set_palette(vc, color_table); } @@ -492,6 +500,8 @@ */ void set_origin(struct vc_data *vc) { + WARN_CONSOLE_UNLOCKED(); + if (!IS_VISIBLE || !sw->con_set_origin || !sw->con_set_origin(vc)) @@ -510,6 +520,8 @@ inline void save_screen(struct vc_data *vc) { + WARN_CONSOLE_UNLOCKED(); + if (sw->con_save_screen) sw->con_save_screen(vc); } @@ -562,6 +574,8 @@ void update_region(struct vc_data *vc, unsigned long start, int count) { + WARN_CONSOLE_UNLOCKED(); + if (DO_UPDATE) { hide_cursor(vc); do_update_region(vc, start, count); @@ -602,6 +616,8 @@ { unsigned short *p; + WARN_CONSOLE_UNLOCKED(); + count /= 2; p = screenpos(vc, offset, viewed); if (sw->con_invert_region) @@ -656,6 +672,8 @@ static unsigned short oldx, oldy, old; static unsigned short *p; + WARN_CONSOLE_UNLOCKED(); + if (p) { scr_writew(old, p); if (DO_UPDATE) @@ -695,8 +713,6 @@ struct vt_struct *vt = (struct vt_struct *) private; struct vc_data *vc = vt->fg_console; - vc->display_fg->timer.data = (long) vt; - vc->display_fg->timer.function = unblank_screen_t; switch (vc->display_fg->blank_mode) { case VESA_NO_BLANKING: sw->con_blank(vc, VESA_VSYNC_SUSPEND+1); @@ -708,13 +724,23 @@ } } -static void timer_do_blank_screen(struct vt_struct *vt, int entering_gfx, int from_timer_handler) +void do_blank_screen(struct vt_struct *vt, int entering_gfx) { struct vc_data *vc = vt->fg_console; int i; - if (vc->display_fg->vt_blanked) + WARN_CONSOLE_UNLOCKED(); + + if (vc->display_fg->vt_blanked) { + if (vc->display_fg->blank_state == blank_vesa_wait) { + vc->display_fg->blank_state = blank_off; + powerdown_screen((unsigned long)vt); + } return; + } + if (vc->display_fg->blank_state != blank_normal_wait) + return; + vc->display_fg->blank_state = blank_off; /* entering graphics mode? */ if (entering_gfx) { @@ -733,10 +759,8 @@ } hide_cursor(vc); - if (!from_timer_handler) - del_timer_sync(&vc->display_fg->timer); - vc->display_fg->timer.data = (long) vc->display_fg; - vc->display_fg->timer.function = unblank_screen_t; + del_timer_sync(&vc->display_fg->timer); + vc->display_fg->blank_timer_expired = 0; save_screen(vc); /* In case we need to reset origin, blanking hook returns 1 */ @@ -748,33 +772,24 @@ if (console_blank_hook && console_blank_hook(1)) return; if (vc->display_fg->off_interval) { - vc->display_fg->timer.data = (long) vc->display_fg; - vc->display_fg->timer.function = powerdown_screen; + vc->display_fg->blank_state = blank_vesa_wait; mod_timer(&vc->display_fg->timer, jiffies + vc->display_fg->off_interval); } if (vc->display_fg->blank_mode) sw->con_blank(vc, vc->display_fg->blank_mode + 1); } -void do_blank_screen(struct vt_struct *vt, int entering_gfx) -{ - timer_do_blank_screen(vt, entering_gfx, 0); -} - /* - * This is a timer handler + * We defer the timer blanking to work queue so it can take the console semaphore + * (console operations can still happen at irq time, but only from printk which + * has the console semaphore. Not perfect yet, but better than no locking */ -static void unblank_screen_t(unsigned long dummy) +static void blank_screen_t(unsigned long dummy) { - unblank_vt((struct vt_struct *) dummy); -} + struct vt_struct *vt = (struct vt_struct*) dummy; -/* - * This is both a user-level callable and a timer handler - */ -static void blank_screen(unsigned long dummy) -{ - timer_do_blank_screen((struct vt_struct *) dummy, 0, 1); + vt->blank_timer_expired = 1; + schedule_work(&vt->vt_work); } /* @@ -795,10 +810,9 @@ if (vcmode != KD_TEXT) return; /* but leave vc->vc_display_fg->vt_blanked != 0 */ - vc->display_fg->timer.data = (long) vt; - vc->display_fg->timer.function = blank_screen; if (vc->display_fg->blank_interval) { mod_timer(&vc->display_fg->timer, jiffies + vc->display_fg->blank_interval); + vc->display_fg->blank_state = blank_normal_wait; } vc->display_fg->vt_blanked = 0; @@ -827,14 +841,18 @@ { struct vc_data *vc = vt->fg_console; + WARN_CONSOLE_UNLOCKED(); + del_timer(&vt->timer); + vt->blank_timer_expired = 0; if (ignore_poke || !vc || vcmode == KD_GRAPHICS) return; if (vt->vt_blanked) { - vt->timer.function = unblank_screen_t; - mod_timer(&vt->timer, jiffies); /* Now */ - } else if (vt->blank_interval) + unblank_vt(vt); + } else if (vt->blank_interval) { mod_timer(&vt->timer, jiffies + vt->blank_interval); + vt->blank_state = blank_normal_wait; + } } /* @@ -842,20 +860,24 @@ */ static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data) { - struct vt_struct *vt = admin_vt; /*FIXME*/ + struct vt_struct *vt = admin_vt; /*FIXME*/ - if (vt) { - switch (rqst) - { - case PM_RESUME: - unblank_vt(vt); - break; - case PM_SUSPEND: - do_blank_screen(vt, 0); - break; - } - } - return 0; + if (vt) { + switch (rqst) + { + case PM_RESUME: + acquire_console_sem(); + unblank_vt(vt); + release_console_sem(); + break; + case PM_SUSPEND: + acquire_console_sem(); + do_blank_screen(vt, 0); + release_console_sem(); + break; + } + } + return 0; } /* * This is the console switching callback. @@ -893,6 +915,11 @@ sw->con_scroll(vc, vt->scrollback_delta); vt->scrollback_delta = 0; } + if (vt->blank_timer_expired) { + do_blank_screen(vt, 0); + vt->blank_timer_expired = 0; + } + release_console_sem(); } @@ -952,6 +979,8 @@ struct vc_data *vc = NULL; struct vt_struct *vt; + WARN_CONSOLE_UNLOCKED(); + if (currcons >= MAX_NR_CONSOLES) { currcons = -ENXIO; return NULL; @@ -1024,7 +1053,8 @@ { struct vt_struct *vt = vc->display_fg; - acquire_console_sem(); + WARN_CONSOLE_UNLOCKED(); + if (vc && vc->vc_num > MIN_NR_CONSOLES) { sw->con_deinit(vc); vt->vc_cons[cons_num - vt->first_vc] = NULL; @@ -1032,7 +1062,6 @@ kfree(screenbuf); kfree(vc); } - release_console_sem(); return 0; } @@ -1063,6 +1092,8 @@ unsigned int new_cols, new_rows, ss, new_row_size, err = 0; unsigned short *newscreen; + WARN_CONSOLE_UNLOCKED(); + if (!vc) return 0; @@ -1383,7 +1414,9 @@ if (!vc) { vc = find_vc(index); if (!vc) { + acquire_console_sem(); vc = vc_allocate(index); + release_console_sem(); if (!vc) return -ENODEV; } @@ -1750,9 +1783,10 @@ vt->vt_blanked = 0; vt->blank_interval = 10 * 60 * HZ; vt->off_interval = 0; + vt->blank_state = blank_normal_wait; init_timer(&vt->timer); vt->timer.data = (long) vt; - vt->timer.function = blank_screen; + vt->timer.function = blank_screen_t; mod_timer(&vt->timer, jiffies + vt->blank_interval); if (vt->pm_con) vt->pm_con->data = vt; @@ -1873,6 +1907,8 @@ const char *desc; int i; + acquire_console_sem(); + /* First shutdown old console driver */ hide_cursor(vc); @@ -1887,6 +1923,7 @@ if (!desc) { /* Make sure the original driver state is restored to normal */ vt->vt_sw->con_startup(vt, 1); + release_console_sem(); return; } vt->vt_sw = csw; @@ -1918,6 +1955,8 @@ vc->vc_can_do_color ? "colour" : "mono", desc, vc->vc_cols, vc->vc_rows, vt->first_vc + 1, vt->first_vc + vt->vc_count); + + release_console_sem(); } /* Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vt_ioctl.c 12 Nov 2003 12:16:59 -0000 1.5 +++ vt_ioctl.c 20 Feb 2004 06:52:18 -0000 1.6 @@ -786,6 +786,9 @@ * currently, setting the mode from KD_TEXT to KD_GRAPHICS * doesn't do a whole lot. i'm not sure if it should do any * restoration of modes or what... + * + * XXX It should at least call into the driver, fbdev's definitely + * need to restore their engine state. --BenH */ if (!perm) return -EPERM; @@ -808,10 +811,12 @@ /* * explicitly blank/unblank the screen if switching modes */ + acquire_console_sem(); if (arg == KD_TEXT) unblank_vt(vc->display_fg); else do_blank_screen(vc->display_fg, 1); + release_console_sem(); return 0; case KDGETMODE: @@ -981,17 +986,29 @@ return -EFAULT; if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS) return -EINVAL; + acquire_console_sem(); vc->vt_mode = tmp; /* the frsig is ignored, so we set it to 0 */ vc->vt_mode.frsig = 0; vc->vt_pid = current->pid; /* no switch is required -- sa...@sh... */ vc->vt_newvt = -1; + release_console_sem(); return 0; } case VT_GETMODE: - return copy_to_user((void*)arg, &(vc->vt_mode), sizeof(struct vt_mode)) ? -EFAULT : 0; + { + struct vt_mode tmp; + int rc; + + acquire_console_sem(); + memcpy(&tmp, &(vc->vt_mode), sizeof(struct vt_mode)); + release_console_sem(); + + rc = copy_to_user((void*)arg, &tmp, sizeof(struct vt_mode)); + return rc ? -EFAULT : 0; + } /* * Returns global vt state. Note that VT 0 is always open, since @@ -1047,7 +1064,9 @@ arg--; tmp = find_vc(arg); if (!tmp) { + acquire_console_sem(); tmp = vc_allocate(arg); + release_console_sem(); if (!tmp) return arg; } @@ -1105,11 +1124,13 @@ */ struct vc_data *tmp = find_vc(vc->vt_newvt); + acquire_console_sem(); if (!tmp) { tmp = vc_allocate(vc->vt_newvt); if (!tmp) { i = vc->vt_newvt; vc->vt_newvt = -1; + release_console_sem(); return i; } } @@ -1119,7 +1140,6 @@ * make sure we are atomic with respect to * other console switches.. */ - acquire_console_sem(); complete_change_console(tmp, vc->display_fg->fg_console); release_console_sem(); } @@ -1144,18 +1164,22 @@ return -ENXIO; if (arg == 0) { /* disallocate all unused consoles, but leave visible VC */ + acquire_console_sem(); for (i = 1; i < vt->vc_count; i++) { tmp = find_vc(i + vt->first_vc); if (tmp && !VT_BUSY(tmp)) vc_disallocate(tmp); } + release_console_sem(); } else { /* disallocate a single console, if possible */ tmp = find_vc(arg-1); if (!tmp || VT_BUSY(tmp)) return -EBUSY; + acquire_console_sem(); vc_disallocate(tmp); + release_console_sem(); } return 0; } @@ -1171,7 +1195,9 @@ for (i = 0; i < vc->display_fg->vc_count; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; + acquire_console_sem(); vc_resize(tmp, cc, ll); + release_console_sem(); } return 0; } @@ -1214,11 +1240,13 @@ for (i = 0; i < vc->display_fg->vc_count; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; + acquire_console_sem(); if (vlin) tmp->vc_scan_lines = vlin; if (clin) tmp->vc_font.height = clin; vc_resize(tmp, cc, ll); + release_console_sem(); } return 0; } |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:15
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.3 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- compat_ioctl.c 9 Feb 2004 07:31:07 -0000 1.6 +++ compat_ioctl.c 20 Feb 2004 06:52:18 -0000 1.7 @@ -2116,6 +2116,7 @@ case FDDEFPRM32: case FDGETPRM32: { + compat_uptr_t name; struct floppy_struct32 *uf; struct floppy_struct *f; @@ -2134,7 +2135,8 @@ err |= __get_user(f->rate, &uf->rate); err |= __get_user(f->spec1, &uf->spec1); err |= __get_user(f->fmt_gap, &uf->fmt_gap); - err |= __get_user((u64)f->name, &uf->name); + err |= __get_user(name, &uf->name); + f->name = compat_ptr(name); if (err) { err = -EFAULT; goto out; |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:15
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: sync to 2.6.3 Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fbmem.c 12 Feb 2004 06:33:04 -0000 1.4 +++ fbmem.c 20 Feb 2004 06:52:18 -0000 1.5 @@ -103,10 +103,10 @@ extern int matroxfb_init(void); extern int matroxfb_setup(char*); extern int hpfb_init(void); +extern int platinumfb_init(void); +extern int platinumfb_setup(char*); extern int control_init(void); extern int control_setup(char*); -extern int platinum_init(void); -extern int platinum_setup(char*); extern int valkyriefb_init(void); extern int valkyriefb_setup(char*); extern int chips_init(void); @@ -223,11 +223,14 @@ #ifdef CONFIG_FB_RADEON { "radeonfb", radeonfb_init, radeonfb_setup }, #endif +#ifdef CONFIG_FB_RADEON_OLD + { "radeonfb_old", radeonfb_old_init, radeonfb_old_setup }, +#endif #ifdef CONFIG_FB_CONTROL { "controlfb", control_init, control_setup }, #endif #ifdef CONFIG_FB_PLATINUM - { "platinumfb", platinum_init, platinum_setup }, + { "platinumfb", platinumfb_init, platinumfb_setup }, #endif #ifdef CONFIG_FB_VALKYRIE { "valkyriefb", valkyriefb_init, valkyriefb_setup }, @@ -395,6 +398,7 @@ static initcall_t pref_init_funcs[FB_MAX]; static int num_pref_init_funcs __initdata = 0; +static struct notifier_block *fb_notifier_list; struct fb_info *registered_fb[FB_MAX]; int num_registered_fb; @@ -463,23 +467,32 @@ */ u32 fb_get_buffer_offset(struct fb_info *info, u32 size) { - u32 align = info->pixmap.buf_align - 1; - u32 offset, count = 1000; + struct fb_pixmap *buf = &info->pixmap; + u32 align = buf->buf_align - 1, offset; - spin_lock(&info->pixmap.lock); - offset = info->pixmap.offset + align; + /* If IO mapped, we need to sync before access, no sharing of + * the pixmap is done + */ + if (buf->flags & FB_PIXMAP_IO) { + if (info->fbops->fb_sync && (buf->flags & FB_PIXMAP_SYNC)) + info->fbops->fb_sync(info); + return 0; + } + + /* See if we fit in the remaining pixmap space */ + offset = buf->offset + align; offset &= ~align; - if (offset + size > info->pixmap.size) { - while (atomic_read(&info->pixmap.count) && count--); - if (info->fbops->fb_sync && - info->pixmap.flags & FB_PIXMAP_SYNC) + if (offset + size > buf->size) { + /* We do not fit. In order to be able to re-use the buffer, + * we must ensure no asynchronous DMA'ing or whatever operation + * is in progress, we sync for that. + */ + if (info->fbops->fb_sync && (buf->flags & FB_PIXMAP_SYNC)) info->fbops->fb_sync(info); offset = 0; } - info->pixmap.offset = offset + size; - atomic_inc(&info->pixmap.count); - smp_mb__after_atomic_inc(); - spin_unlock(&info->pixmap.lock); + buf->offset = offset + size; + return offset; } @@ -685,8 +698,8 @@ struct fb_image image; int x; - /* Return if the frame buffer is not mapped */ - if (fb_logo.logo == NULL) + /* Return if the frame buffer is not mapped or suspended */ + if (fb_logo.logo == NULL || info->state != FBINFO_STATE_RUNNING) return 0; image.depth = fb_logo.depth; @@ -732,8 +745,6 @@ x <= info->var.xres-fb_logo.logo->width; x += (fb_logo.logo->width + 8)) { image.dx = x; info->fbops->fb_imageblit(info, &image); - //atomic_dec(&info->pixmap.count); - //smp_mb__after_atomic_dec(); } if (palette != NULL) @@ -780,6 +791,9 @@ if (!info || ! info->screen_base) return -ENODEV; + if (info->state != FBINFO_STATE_RUNNING) + return -EPERM; + if (info->fbops->fb_read) return info->fbops->fb_read(file, buf, count, ppos); @@ -815,6 +829,9 @@ if (!info || !info->screen_base) return -ENODEV; + if (info->state != FBINFO_STATE_RUNNING) + return -EPERM; + if (info->fbops->fb_write) return info->fbops->fb_write(file, buf, count, ppos); @@ -941,6 +958,8 @@ fb_pan_display(info, &info->var); fb_set_cmap(&info->cmap, 1, info); + + notifier_call_chain(&fb_notifier_list, FB_EVENT_MODE_CHANGE, info); } } return 0; @@ -966,9 +985,6 @@ return fb_set_cmap(&cmap, 1, info); } -int fbcon_in_use; -DECLARE_MUTEX(fbcon_sem); - int fb_resize_vt(struct fb_info *info) { @@ -976,8 +992,7 @@ struct vc_data *vc; int i; - down(&fbcon_sem); - if(!fbcon_in_use || !vt) + if(!vt) return -ENODEV; vc = vt->default_mode; @@ -985,18 +1000,9 @@ vc->vc_rows = info->var.yres/vc->vc_font.height; for(i = 0; i < vt->vc_count; i++) vc_resize(vt->vc_cons[i], vc->vc_cols, vc->vc_rows); - up(&fbcon_sem); return 0; } -void -fb_console_active(int active) -{ - down(&fbcon_sem); - fbcon_in_use = active; - up(&fbcon_sem); -} - static int fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) @@ -1021,7 +1027,9 @@ case FBIOPUT_VSCREENINFO: if (copy_from_user(&var, (void *) arg, sizeof(var))) return -EFAULT; + acquire_console_sem(); i = fb_set_var(info, &var); + release_console_sem(); if (i) return i; fb_resize_vt(info); if (copy_to_user((void *) arg, &var, sizeof(var))) @@ -1041,13 +1049,19 @@ case FBIOPAN_DISPLAY: if (copy_from_user(&var, (void *) arg, sizeof(var))) return -EFAULT; - if ((i = fb_pan_display(info, &var))) + acquire_console_sem(); + i = fb_pan_display(info, &var); + release_console_sem(); + if (i) return i; if (copy_to_user((void *) arg, &var, sizeof(var))) return -EFAULT; return 0; case FBIO_CURSOR: - return (fb_cursor(info, (struct fb_cursor *) arg)); + acquire_console_sem(); + i = fb_cursor(info, (struct fb_cursor *) arg); + release_console_sem(); + return i; #ifdef CONFIG_FRAMEBUFFER_CONSOLE case FBIOGET_CON2FBMAP: if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) @@ -1077,7 +1091,10 @@ return 0; #endif /* CONFIG_FRAMEBUFFER_CONSOLE */ case FBIOBLANK: - return fb_blank(info, arg); + acquire_console_sem(); + i = fb_blank(info, arg); + release_console_sem(); + return i; default: if (fb->fb_ioctl == NULL) return -EINVAL; @@ -1274,15 +1291,12 @@ fb_info->pixmap.outbuf = sys_outbuf; if (fb_info->pixmap.inbuf == NULL) fb_info->pixmap.inbuf = sys_inbuf; - spin_lock_init(&fb_info->pixmap.lock); registered_fb[i] = fb_info; devfs_mk_cdev(MKDEV(FB_MAJOR, i), S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i); -#ifdef CONFIG_FRAMEBUFFER_CONSOLE - fbcon_add(i, vt2fb[i]); -#endif + notifier_call_chain(&fb_notifier_list, FB_EVENT_ADD_CONSOLE, fb_info); return 0; } @@ -1305,6 +1319,7 @@ i = fb_info->node; if (!registered_fb[i]) return -EINVAL; + notifier_call_chain(&fb_notifier_list, FB_EVENT_DELETE_CONSOLE, fb_info); devfs_remove("fb/%d", i); if (fb_info->pixmap.addr) @@ -1314,6 +1329,43 @@ return 0; } +/** + * fb_register_client - register a client notifier + * @nb: notifier block to callback on events + */ +int fb_register_client(struct notifier_block *nb) +{ + return notifier_chain_register(&fb_notifier_list, nb); +} + +/** + * fb_unregister_client - unregister a client notifier + * @nb: notifier block to callback on events + */ +int fb_unregister_client(struct notifier_block *nb) +{ + return notifier_chain_unregister(&fb_notifier_list, nb); +} + +/** + * fb_set_suspend - low level driver signals suspend + * @info: framebuffer affected + * @state: 0 = resuming, !=0 = suspending + * + * This is meant to be used by low level drivers to + * signal suspend/resume to the core & clients. + * It must be called with the console semaphore held + */ +void fb_set_suspend(struct fb_info *info, int state) +{ + if (state) { + notifier_call_chain(&fb_notifier_list, FB_EVENT_SUSPEND, info); + info->state = FBINFO_STATE_SUSPENDED; + } else { + info->state = FBINFO_STATE_RUNNING; + notifier_call_chain(&fb_notifier_list, FB_EVENT_RESUME, info); + } +} /** * fbmem_init - init frame buffer subsystem @@ -1428,6 +1480,8 @@ EXPORT_SYMBOL(fb_get_buffer_offset); EXPORT_SYMBOL(move_buf_unaligned); EXPORT_SYMBOL(move_buf_aligned); -EXPORT_SYMBOL(fb_console_active); +EXPORT_SYMBOL(fb_set_suspend); +EXPORT_SYMBOL(fb_register_client); +EXPORT_SYMBOL(fb_unregister_client); MODULE_LICENSE("GPL"); |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:15
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/drivers/video/console Modified Files: fbcon.c fbcon.h Log Message: sync to 2.6.3 Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fbcon.c 12 Feb 2004 06:33:04 -0000 1.6 +++ fbcon.c 20 Feb 2004 06:52:18 -0000 1.7 @@ -197,10 +197,13 @@ struct fb_info *info = (struct fb_info *) private; /* Test to see if the cursor is erased but still on */ - if (!info || (info->cursor.rop == ROP_COPY)) + if (!info || info->state != FBINFO_STATE_RUNNING || + (info->cursor.rop == ROP_COPY)) return; + acquire_console_sem(); info->cursor.enable ^= 1; info->fbops->fb_cursor(info, &info->cursor); + release_console_sem(); } #if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) @@ -227,8 +230,7 @@ struct fb_info *info = (struct fb_info *) dev_addr; schedule_work(&info->queue); - cursor_timer.expires = jiffies + HZ / 5; - add_timer(&cursor_timer); + mod_timer(&cursor_timer, jiffies + HZ/5); } int __init fb_console_setup(char *this_opt) @@ -340,8 +342,6 @@ info->fbops->fb_imageblit(info, image); image->dx += cnt * vc->vc_font.width; count -= cnt; - atomic_dec(&info->pixmap.count); - smp_mb__after_atomic_dec(); } } @@ -380,8 +380,6 @@ info->fbops->fb_imageblit(info, image); image->dx += cnt * vc->vc_font.width; count -= cnt; - atomic_dec(&info->pixmap.count); - smp_mb__after_atomic_dec(); } } @@ -452,8 +450,6 @@ move_buf_aligned(info, dst, src, pitch, width, image.height); info->fbops->fb_imageblit(info, &image); - atomic_dec(&info->pixmap.count); - smp_mb__after_atomic_dec(); } void accel_putcs(struct vc_data *vc, struct fb_info *info, @@ -660,7 +656,7 @@ if (!done && !info->queue.func) { INIT_WORK(&info->queue, fb_flashcursor, info); - cursor_timer.expires = jiffies + HZ / 50; + cursor_timer.expires = jiffies + HZ / 5; cursor_timer.data = (unsigned long ) info; add_timer(&cursor_timer); } @@ -930,6 +926,8 @@ if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) return; + if (info->state != FBINFO_STATE_RUNNING) + return; if (!height || !width) return; @@ -954,6 +952,8 @@ if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) return; + if (info->state != FBINFO_STATE_RUNNING) + return; if (vc->vc_mode != KD_TEXT) return; @@ -969,6 +969,8 @@ if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) return; + if (info->state != FBINFO_STATE_RUNNING) + return; if (vc->vc_mode != KD_TEXT) return; @@ -1812,8 +1814,10 @@ vc->vc_font.height = h; if (vc->vc_hi_font_mask && cnt == 256) { vc->vc_hi_font_mask = 0; - if (vc->vc_can_do_color) + if (vc->vc_can_do_color) { vc->vc_complement_mask >>= 1; + vc->vc_s_complement_mask >>= 1; + } /* ++Edmund: reorder the attribute bits */ if (vc->vc_can_do_color) { @@ -1833,8 +1837,10 @@ } } else if (!vc->vc_hi_font_mask && cnt == 512) { vc->vc_hi_font_mask = 0x100; - if (vc->vc_can_do_color) - vc->vc_complement_mask <<= 1; + if (vc->vc_can_do_color) { + vc->vc_complement_mask >>= 1; + vc->vc_s_complement_mask >>= 1; + } /* ++Edmund: reorder the attribute bits */ { @@ -1982,8 +1988,10 @@ font length must be multiple of 256, at least. And 256 is multiple of 4 */ k = 0; - while (p > new_data) - k += *--(u32 *) p; + while (p > new_data) { + p = (u8 *)((u32 *)p - 1); + k += *(u32 *) p; + } FNTSUM(new_data) = k; /* Check if the same font is on some other console already */ for (i = 0; i < vt->vc_count; i++) { @@ -2246,6 +2254,24 @@ return 0; } +static void fbcon_suspended(struct fb_info *info) +{ + /* Clear cursor, restore saved data */ + info->cursor.enable = 0; + info->fbops->fb_cursor(info, &info->cursor); +} + +static void fbcon_resumed(struct fb_info *info) +{ + struct vt_struct *vt = info->display_fg; + + if (!vt) + return; + + if (vt->fg_console) + update_screen(vt->fg_console); +} + /* * The console `switch' structure for the frame buffer based console */ @@ -2272,14 +2298,19 @@ .con_resize = fbcon_resize, }; -int fbcon_add(int unit, int vc_count) +int fbcon_add(struct fb_info *info) { const char *display_desc = NULL; struct vt_struct *vt; struct vc_data *vc; + int unit; + + for(unit = 0; unit < num_registered_fb; unit++) + if (registered_fb[unit] == info) + break; if(vt2fb[unit] == TAKE_OVER_CONSOLE) { - admin_vt->data_hook = (void *)registered_fb[unit]; + admin_vt->data_hook = (void *)info; take_over_console(admin_vt, &fb_con); return 0; } @@ -2300,8 +2331,8 @@ vt->default_mode = vc; vt->vt_kmalloced = 1; vt->vt_sw = &fb_con; - vt->data_hook = (void *)registered_fb[unit]; - display_desc = vt_map_display(vt, 1, vc_count); + vt->data_hook = (void *)info; + display_desc = vt_map_display(vt, 1, vt2fb[unit]); if (!display_desc) { kfree(vt); kfree(vc); @@ -2316,6 +2347,33 @@ return 0; } +static int fbcon_event_notify(struct notifier_block *self, + unsigned long action, void *data) +{ + struct fb_info *info = (struct fb_info *) data; + + switch(action) { + case FB_EVENT_SUSPEND: + fbcon_suspended(info); + break; + case FB_EVENT_RESUME: + fbcon_resumed(info); + break; + case FB_EVENT_ADD_CONSOLE: + fbcon_add(info); + break; + case FB_EVENT_DELETE_CONSOLE: + break; + } + return 0; +} + +static struct notifier_block fbcon_event_notifer = { + .notifier_call = fbcon_event_notify, +}; + +static int fbcon_event_notifier_registered; + int __init fb_console_init(void) { int unit; @@ -2323,23 +2381,35 @@ if(!vt2fb[0]) vt2fb[0] = TAKE_OVER_CONSOLE; - for(unit = 1; unit < num_registered_fb; unit++) + for(unit = 1; unit < FB_MAX; unit++) if(!vt2fb[unit]) vt2fb[unit] = MAX_NR_USER_CONSOLES; - fb_console_active(1); if (!num_registered_fb) return -ENODEV; for(unit = 0; unit < num_registered_fb; unit++) - fbcon_add(unit, vt2fb[unit]); + fbcon_add(registered_fb[unit]); + + acquire_console_sem(); + if (!fbcon_event_notifier_registered) { + fb_register_client(&fbcon_event_notifer); + fbcon_event_notifier_registered = 1; + } + release_console_sem(); + return 0; } void __exit fb_console_exit(void) { + acquire_console_sem(); + if (fbcon_event_notifier_registered) { + fb_unregister_client(&fbcon_event_notifer); + fbcon_event_notifier_registered = 0; + } + release_console_sem(); // give_up_console(&fb_con); - fb_console_active(0); } module_init(fb_console_init); Index: fbcon.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fbcon.h 12 Feb 2004 06:33:04 -0000 1.2 +++ fbcon.h 20 Feb 2004 06:52:18 -0000 1.3 @@ -106,9 +106,5 @@ extern int fb_console_init(void); extern const struct consw fb_con; -extern int fbcon_add(int unit, int vc_count); - -/* drivers/video/fbmem.c */ -extern void fb_console_active(int active); #endif /* _VIDEO_FBCON_H */ |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:14
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020 Added Files: AGAINST-2.6.3 Removed Files: AGAINST-2.6.2 Log Message: sync to 2.6.3 --- NEW FILE: AGAINST-2.6.3 --- --- AGAINST-2.6.2 DELETED --- |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:14
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/include/linux Modified Files: fb.h input.h selection.h vt_kern.h Log Message: sync to 2.6.3 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fb.h 14 Oct 2003 08:32:10 -0000 1.1 +++ fb.h 20 Feb 2004 06:52:19 -0000 1.2 @@ -1,10 +1,7 @@ #ifndef _LINUX_FB_H #define _LINUX_FB_H -#include <linux/tty.h> -#include <linux/workqueue.h> #include <asm/types.h> -#include <asm/io.h> /* Definitions of frame buffers */ @@ -326,32 +323,67 @@ struct fb_image image; /* Cursor image */ }; +#ifdef __KERNEL__ + +#include <linux/fs.h> +#include <linux/init.h> +#include <linux/tty.h> +#include <linux/device.h> +#include <linux/workqueue.h> +#include <linux/devfs_fs_kernel.h> +#include <linux/notifier.h> +#include <asm/io.h> + +struct vm_area_struct; +struct fb_info; +struct device; +struct file; + +/* + * Register/unregister for framebuffer events + */ + +/* The resolution of the passed in fb_info about to change */ +#define FB_EVENT_MODE_CHANGE 0x01 +/* The display on this fb_info is beeing suspended, no access to the + * framebuffer is allowed any more after that call returns + */ +#define FB_EVENT_SUSPEND 0x02 +/* The display on this fb_info was resumed, you can restore the display + * if you own it + */ +#define FB_EVENT_RESUME 0x03 +#define FB_EVENT_ADD_CONSOLE 0x04 +#define FB_EVENT_DELETE_CONSOLE 0x05 + +extern int fb_register_client(struct notifier_block *nb); +extern int fb_unregister_client(struct notifier_block *nb); + +/* + * Pixmap structure definition + * + * The purpose of this structure is to translate data + * from the hardware independent format of fbdev to what + * format the hardware needs. + */ + #define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */ #define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */ #define FB_PIXMAP_IO 4 /* memory is iomapped */ #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 flags; /* see 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); - spinlock_t lock; /* spinlock */ - atomic_t count; }; -#ifdef __KERNEL__ - -#include <linux/fs.h> -#include <linux/init.h> - -struct fb_info; -struct vm_area_struct; -struct file; /* * Frame buffer operations @@ -362,58 +394,84 @@ 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); - /* 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 */ + 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); + /* set the video mode according to info->var */ 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); + unsigned blue, unsigned transp, + 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); + 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); + 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); + 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); + 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); + int (*fb_cursor) (struct fb_info * info, + struct fb_cursor * cursor); + /* Rotates the display */ void (*fb_rotate)(struct fb_info *info, int angle); + /* 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); + 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); + 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 ? */ + 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; /* Current pixmap */ - struct fb_cmap cmap; /* Current cmap */ - struct fb_ops *fbops; - char *screen_base; /* Virtual address */ - struct vt_struct *display_fg; /* Attached VT on this display */ - int currcon; /* Current VC. */ - void *pseudo_palette; /* Fake palette of 16 colors */ - /* From here on everything is device dependent */ - void *par; + 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_cmap cmap; /* Current cmap */ + struct fb_ops *fbops; + char *screen_base; /* Virtual address */ + struct vt_struct *display_fg; /* Console visible on this display */ + int currcon; /* Current VC. */ + void *pseudo_palette; /* Fake palette of 16 colors */ +#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; }; #ifdef MODULE @@ -438,7 +496,7 @@ #define fb_writeq sbus_writeq #define fb_memset sbus_memset_io -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) +#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) #define fb_readb __raw_readb #define fb_readw __raw_readw @@ -482,14 +540,20 @@ 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 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 void fb_set_suspend(struct fb_info *info, int state); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; +/* drivers/video/fbsysfs.c */ +extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); +extern void framebuffer_release(struct fb_info *info); + /* drivers/video/fbmon.c */ #define FB_MAXTIMINGS 0 #define FB_VSYNCTIMINGS 1 @@ -517,8 +581,7 @@ /* 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 int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, - int fsfromto); +extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto); 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); @@ -541,7 +604,8 @@ #ifdef MODULE static inline int fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, const char *mode_option, + struct fb_info *info, + const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, @@ -568,7 +632,8 @@ } #else extern int __init fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, const char *mode_option, + struct fb_info *info, + const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/input.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- input.h 9 Feb 2004 07:31:07 -0000 1.4 +++ input.h 20 Feb 2004 06:52:19 -0000 1.5 @@ -751,6 +751,30 @@ #define init_input_dev(dev) do { INIT_LIST_HEAD(&((dev)->h_list)); INIT_LIST_HEAD(&((dev)->node)); } while (0) +#define SET_INPUT_KEYCODE(dev, scancode, val) \ + ({ unsigned __old; \ + switch (dev->keycodesize) { \ + case 1: { \ + u8 *k = (u8 *)dev->keycode; \ + __old = k[scancode]; \ + k[scancode] = val; \ + break; \ + } \ + case 2: { \ + u16 *k = (u16 *)dev->keycode; \ + __old = k[scancode]; \ + k[scancode] = val; \ + break; \ + } \ + default: { \ + u32 *k = (u32 *)dev->keycode; \ + __old = k[scancode]; \ + k[scancode] = val; \ + break; \ + } \ + } \ + __old; }) + struct input_dev { void *private; Index: selection.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/selection.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- selection.h 11 Aug 2003 16:26:46 -0000 1.1 +++ selection.h 20 Feb 2004 06:52:19 -0000 1.2 @@ -24,8 +24,8 @@ extern void complement_pos(struct vc_data *vc, int offset); extern void invert_screen(struct vc_data *vc, int offset, int count, int shift); -extern void getconsxy(struct vc_data *vc, char *p); -extern void putconsxy(struct vc_data *vc, char *p); +extern void getconsxy(struct vc_data *vc, unsigned char *p); +extern void putconsxy(struct vc_data *vc, unsigned char *p); extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vt_kern.h 12 Feb 2004 06:33:05 -0000 1.8 +++ vt_kern.h 20 Feb 2004 06:52:19 -0000 1.9 @@ -54,6 +54,7 @@ #define BROKEN_GRAPHICS_PROGRAMS 1 #endif +extern int is_console_locked(void); extern unsigned char color_table[]; extern int default_red[]; extern int default_grn[]; @@ -221,6 +222,8 @@ int blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */ int blank_interval; /* How long before blanking */ int off_interval; + int blank_state; + int blank_timer_expired; struct timer_list timer; /* Timer for VT blanking */ struct timer_list beep; /* Timer for adjusting console beeping */ struct pm_dev *pm_con; /* power management */ @@ -264,6 +267,13 @@ void terminal_emulation(struct tty_struct *tty, int c); /* vt.c */ +/* Some debug stub to catch some of the obvious races in the VT code */ +#if 0 +#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) +#else +#define WARN_CONSOLE_UNLOCKED() +#endif + const char *vt_map_display(struct vt_struct *vt, int init, int vc_count); void vt_map_input(struct vt_struct *vt); struct vc_data *find_vc(int currcons); |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:13
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.3 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- setup.c 9 Feb 2004 07:31:07 -0000 1.6 +++ setup.c 20 Feb 2004 06:52:18 -0000 1.7 @@ -444,6 +444,12 @@ #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) unsigned char eddnr; struct edd_info edd[EDDMAXNR]; +unsigned int edd_disk80_sig; +#ifdef CONFIG_EDD_MODULE +EXPORT_SYMBOL(eddnr); +EXPORT_SYMBOL(edd); +EXPORT_SYMBOL(edd_disk80_sig); +#endif /** * copy_edd() - Copy the BIOS EDD information * from empty_zero_page into a safe place. @@ -453,6 +459,7 @@ { eddnr = EDD_NR; memcpy(edd, EDD_BUF, sizeof(edd)); + edd_disk80_sig = DISK80_SIGNATURE; } #else #define copy_edd() do {} while (0) |
From: Aivils S. <ai...@us...> - 2004-02-20 07:03:12
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7020/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.3 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 9 Feb 2004 07:31:07 -0000 1.6 +++ Makefile 20 Feb 2004 06:52:18 -0000 1.7 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = -ruby NAME=Feisty Dunnart @@ -830,7 +830,7 @@ cmd_cscope-file = $(all-sources) > cscope.files quiet_cmd_cscope = MAKE cscope.out - cmd_cscope = cscope -k -b + cmd_cscope = cscope -k -b -q cscope: FORCE $(call cmd,cscope-file) |
From: Aivils S. <ai...@us...> - 2004-02-12 06:37:46
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12910/ruby-2.6/drivers/video/console Modified Files: fbcon.c fbcon.h Log Message: vt is a class. fbdev and fbcon load in any order. Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fbcon.c 9 Feb 2004 07:33:28 -0000 1.5 +++ fbcon.c 12 Feb 2004 06:33:04 -0000 1.6 @@ -2278,6 +2278,12 @@ struct vt_struct *vt; struct vc_data *vc; + if(vt2fb[unit] == TAKE_OVER_CONSOLE) { + admin_vt->data_hook = (void *)registered_fb[unit]; + take_over_console(admin_vt, &fb_con); + return 0; + } + vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); if (!vt) return -ENOMEM; @@ -2301,8 +2307,6 @@ kfree(vc); return -ENODEV; } - vt_proc_attach(vt); - vt_create_sysfs_dev_files(vt); printk("Console: %s %s %dx%d vc:%d-%d\n", vt->default_mode->vc_can_do_color ? "Colour" : "Mono", display_desc, @@ -2316,9 +2320,6 @@ { int unit; - if (!num_registered_fb) - return -ENODEV; - if(!vt2fb[0]) vt2fb[0] = TAKE_OVER_CONSOLE; @@ -2326,14 +2327,12 @@ if(!vt2fb[unit]) vt2fb[unit] = MAX_NR_USER_CONSOLES; - for(unit = 0; unit < num_registered_fb; unit++) - if(vt2fb[unit] == TAKE_OVER_CONSOLE) { - admin_vt->data_hook = (void *)registered_fb[unit]; - take_over_console(admin_vt, &fb_con); - } - else - fbcon_add(unit, vt2fb[unit]); fb_console_active(1); + if (!num_registered_fb) + return -ENODEV; + + for(unit = 0; unit < num_registered_fb; unit++) + fbcon_add(unit, vt2fb[unit]); return 0; } Index: fbcon.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fbcon.h 29 Sep 2003 08:57:39 -0000 1.1 +++ fbcon.h 12 Feb 2004 06:33:04 -0000 1.2 @@ -37,6 +37,7 @@ }; /* drivers/video/console/fbcon.c */ +extern char vt2fb[FB_MAX]; extern char con2fb_map[MAX_NR_CONSOLES]; extern int set_con2fb_map(int unit, int newidx); @@ -105,5 +106,9 @@ extern int fb_console_init(void); extern const struct consw fb_con; +extern int fbcon_add(int unit, int vc_count); + +/* drivers/video/fbmem.c */ +extern void fb_console_active(int active); #endif /* _VIDEO_FBCON_H */ |
From: Aivils S. <ai...@us...> - 2004-02-12 06:37:45
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12910/ruby-2.6/include/linux Modified Files: vt_kern.h Log Message: vt is a class. fbdev and fbcon load in any order. Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vt_kern.h 9 Feb 2004 07:33:28 -0000 1.7 +++ vt_kern.h 12 Feb 2004 06:33:05 -0000 1.8 @@ -246,7 +246,7 @@ unsigned char vt_ledstate; unsigned char vt_ledioctl; char *display_desc; - struct device dev; /* Generic device interface */ + struct class_device dev; /* Generic device interface */ }; extern struct list_head vt_list; @@ -330,4 +330,9 @@ /* vt_sysfs.c*/ int __init vt_create_sysfs_dev_files (struct vt_struct *vt); void __init vt_sysfs_init(void); +/* vt_proc.c */ +#ifdef CONFIG_PROC_FS +extern int vt_proc_attach(struct vt_struct *vt); +extern int vt_proc_detach(struct vt_struct *vt); +#endif #endif /* _VT_KERN_H */ |
From: Aivils S. <ai...@us...> - 2004-02-12 06:37:45
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12910/ruby-2.6/drivers/char Modified Files: vt.c vt_proc.c vt_sysfs.c Log Message: vt is a class. fbdev and fbcon load in any order. Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- vt.c 9 Feb 2004 07:33:28 -0000 1.15 +++ vt.c 12 Feb 2004 06:33:04 -0000 1.16 @@ -907,7 +907,7 @@ */ static void visual_init(struct vc_data *vc, int init) { - struct vc_data *default_mode = vc->display_fg->default_mode; + /*struct vc_data *default_mode = vc->display_fg->default_mode;*/ /* ++Geert: sw->con_startup determines console size */ vc->vc_uni_pagedir_loc = &vc->vc_uni_pagedir; @@ -1772,6 +1772,12 @@ update_screen(vt->fg_console); current_vc += vc_count; current_vt += 1; + if (vt->vt_kmalloced) { + vt_create_sysfs_dev_files(vt); +#ifdef CONFIG_PROC_FS + vt_proc_attach(vt); +#endif + } return display_desc; } @@ -1839,6 +1845,10 @@ if (tty_register_driver(console_driver)) panic("Couldn't register console driver\n"); + vt_sysfs_init(); +#ifdef CONFIG_PROC_FS + vt_proc_init(); +#endif #if defined (CONFIG_PROM_CONSOLE) prom_con_init(); #endif @@ -1848,10 +1858,6 @@ kbd_init(); console_map_init(); vcs_init(); -#ifdef CONFIG_PROC_FS - vt_proc_init(); -#endif - vt_sysfs_init(); return 0; } Index: vt_proc.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_proc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vt_proc.c 9 Feb 2004 07:31:07 -0000 1.4 +++ vt_proc.c 12 Feb 2004 06:33:04 -0000 1.5 @@ -193,17 +193,11 @@ int __init vt_proc_init(void) { - struct vt_struct *vt; - - if (list_empty(&vt_list)) - return 0; - - proc_bus_console_dir = proc_mkdir(VT_PROC_DIR, proc_bus); - list_for_each_entry (vt, &vt_list, node) { - vt_proc_attach(vt); - } + /* we have only one boot time console - admin_vt*/ + proc_bus_console_dir = proc_mkdir(VT_PROC_DIR, proc_bus); + vt_proc_attach(admin_vt); - return 0; + return 0; } #endif /* CONFIG_PROC_FS */ Index: vt_sysfs.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_sysfs.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vt_sysfs.c 9 Feb 2004 07:33:28 -0000 1.1 +++ vt_sysfs.c 12 Feb 2004 06:33:04 -0000 1.2 @@ -13,16 +13,18 @@ /* show configuration fields */ #define vt_config_attr(field, format_string) \ static ssize_t \ -vt_show_##field (struct device *dev, char *buf) \ +vt_show_##field (struct class_device *dev, char *buf) \ { \ struct vt_struct *vt; \ \ vt = to_vt_struct (dev); \ return sprintf (buf, format_string, vt->field); \ } \ -static DEVICE_ATTR(field, S_IRUGO, vt_show_##field, NULL); +static CLASS_DEVICE_ATTR(field, S_IRUGO, vt_show_##field, NULL); -struct device vt_parent_dev; +struct class vt_class = { + .name = "vt", +}; vt_config_attr(display_desc, "%s\n"); vt_config_attr(first_vc, "%d\n"); @@ -30,7 +32,7 @@ static ssize_t -vt_show_keyboard (struct device *dev, char *buf) +vt_show_keyboard (struct class_device *dev, char *buf) { struct vt_struct *vt; struct input_handle *handle; @@ -41,84 +43,28 @@ return sprintf (buf, "%s\n", handle->dev->phys); return sprintf (buf, "%s\n", ""); } -static DEVICE_ATTR(keyboard, S_IRUGO, vt_show_keyboard, NULL); - -/** - * vt_dev_get - increments the reference count of the pci device structure - * @vt: the device being referenced - * - * Each live reference to a device should be refcounted. - * - * Drivers for VT devices should normally record such references in - * their probe() methods, when they bind to a device, and release - * them by calling vt_dev_put(), in their disconnect() methods. - * - * A pointer to the device with the incremented reference counter is returned. - */ -struct vt_struct *vt_dev_get(struct vt_struct *vt) -{ - struct device *tmp; - - if (!vt) - return NULL; - - tmp = get_device(&vt->dev); - if (tmp) - return to_vt_struct(tmp); - else - return NULL; -} - -/** - * vt_dev_put - release a use of the pci device structure - * @vt: device that's been disconnected - * - * Must be called when a user of a device is finished with it. When the last - * user of the device calls this function, the memory of the device is freed. - */ -void vt_dev_put(struct vt_struct *vt) -{ - if (vt) - put_device(&vt->dev); -} - -struct bus_type vt_bus_type = { - .name = "vt", -}; - +static CLASS_DEVICE_ATTR(keyboard, S_IRUGO, vt_show_keyboard, NULL); int __init vt_create_sysfs_dev_files (struct vt_struct *vt) { - struct device *dev = &vt->dev; + struct class_device *dev = &vt->dev; - bus_register(&vt_bus_type); - dev->parent = &vt_parent_dev; - dev->bus = &vt_bus_type; - device_initialize(dev); - dev->release = NULL; /* release_vt */ - vt_dev_get(vt); - sprintf (dev->bus_id, "%02x", vt->vt_num); - device_add(dev); + dev->class = &vt_class; + sprintf (dev->class_id, "%02x", vt->vt_num); + class_device_register(dev); /* current configuration's attributes */ - device_create_file (dev, &dev_attr_display_desc); - device_create_file (dev, &dev_attr_first_vc); - device_create_file (dev, &dev_attr_vc_count); - device_create_file (dev, &dev_attr_keyboard); + class_device_create_file (dev, &class_device_attr_display_desc); + class_device_create_file (dev, &class_device_attr_first_vc); + class_device_create_file (dev, &class_device_attr_vc_count); + class_device_create_file (dev, &class_device_attr_keyboard); return 0; } void __init vt_sysfs_init(void) { - struct device *dev=&vt_parent_dev; - struct vt_struct *vt; - - memset(dev, 0, sizeof(*dev)); - dev->parent = NULL; - sprintf(dev->bus_id, "wagadubu"); - device_register(dev); - list_for_each_entry (vt, &vt_list, node) { - vt_create_sysfs_dev_files(vt); - } + /* we have only one boot time console - admin_vt*/ + class_register(&vt_class); + vt_create_sysfs_dev_files(admin_vt); } |
From: Aivils S. <ai...@us...> - 2004-02-12 06:37:45
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12910/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: vt is a class. fbdev and fbcon load in any order. Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fbmem.c 9 Feb 2004 07:31:07 -0000 1.3 +++ fbmem.c 12 Feb 2004 06:33:04 -0000 1.4 @@ -1280,6 +1280,9 @@ devfs_mk_cdev(MKDEV(FB_MAJOR, i), S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i); +#ifdef CONFIG_FRAMEBUFFER_CONSOLE + fbcon_add(i, vt2fb[i]); +#endif return 0; } |
From: James S. <jsi...@in...> - 2004-02-09 17:37:22
|
Awesome work !!!!!! On Sun, 8 Feb 2004, Aivils Stoss wrote: > Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv413/ruby-2.6/drivers/char > > Modified Files: > Makefile vt.c > Added Files: > vt_sysfs.c > Log Message: > add initial read-only sysfs support > > --- NEW FILE: vt_sysfs.c --- > /* > * drivers/char/vt_userspace.c - basic VirtualTerminal class support > * A very simple (and naive) implementation by Aivils Stoss > */ > > #include <linux/device.h> > #include <linux/module.h> > #include <linux/init.h> > #include <linux/list.h> > #include <linux/vt_kern.h> > #include <linux/input.h> > > /* show configuration fields */ > #define vt_config_attr(field, format_string) \ > static ssize_t \ > vt_show_##field (struct device *dev, char *buf) \ > { \ > struct vt_struct *vt; \ > \ > vt = to_vt_struct (dev); \ > return sprintf (buf, format_string, vt->field); \ > } \ > static DEVICE_ATTR(field, S_IRUGO, vt_show_##field, NULL); > > struct device vt_parent_dev; > > vt_config_attr(display_desc, "%s\n"); > vt_config_attr(first_vc, "%d\n"); > vt_config_attr(vc_count, "%d\n"); > > > static ssize_t > vt_show_keyboard (struct device *dev, char *buf) > { > struct vt_struct *vt; > struct input_handle *handle; > > vt = to_vt_struct (dev); > handle = vt->keyboard; > if (handle && handle->dev->phys) > return sprintf (buf, "%s\n", handle->dev->phys); > return sprintf (buf, "%s\n", ""); > } > static DEVICE_ATTR(keyboard, S_IRUGO, vt_show_keyboard, NULL); > > /** > * vt_dev_get - increments the reference count of the pci device structure > * @vt: the device being referenced > * > * Each live reference to a device should be refcounted. > * > * Drivers for VT devices should normally record such references in > * their probe() methods, when they bind to a device, and release > * them by calling vt_dev_put(), in their disconnect() methods. > * > * A pointer to the device with the incremented reference counter is returned. > */ > struct vt_struct *vt_dev_get(struct vt_struct *vt) > { > struct device *tmp; > > if (!vt) > return NULL; > > tmp = get_device(&vt->dev); > if (tmp) > return to_vt_struct(tmp); > else > return NULL; > } > > /** > * vt_dev_put - release a use of the pci device structure > * @vt: device that's been disconnected > * > * Must be called when a user of a device is finished with it. When the last > * user of the device calls this function, the memory of the device is freed. > */ > void vt_dev_put(struct vt_struct *vt) > { > if (vt) > put_device(&vt->dev); > } > > struct bus_type vt_bus_type = { > .name = "vt", > }; > > > int __init vt_create_sysfs_dev_files (struct vt_struct *vt) > { > struct device *dev = &vt->dev; > > bus_register(&vt_bus_type); > dev->parent = &vt_parent_dev; > dev->bus = &vt_bus_type; > device_initialize(dev); > dev->release = NULL; /* release_vt */ > vt_dev_get(vt); > sprintf (dev->bus_id, "%02x", vt->vt_num); > device_add(dev); > > /* current configuration's attributes */ > device_create_file (dev, &dev_attr_display_desc); > device_create_file (dev, &dev_attr_first_vc); > device_create_file (dev, &dev_attr_vc_count); > device_create_file (dev, &dev_attr_keyboard); > > return 0; > } > > void __init vt_sysfs_init(void) > { > struct device *dev=&vt_parent_dev; > struct vt_struct *vt; > > memset(dev, 0, sizeof(*dev)); > dev->parent = NULL; > sprintf(dev->bus_id, "wagadubu"); > device_register(dev); > list_for_each_entry (vt, &vt_list, node) { > vt_create_sysfs_dev_files(vt); > } > } > > Index: Makefile > =================================================================== > RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -d -r1.6 -r1.7 > --- Makefile 9 Feb 2004 07:31:07 -0000 1.6 > +++ Makefile 9 Feb 2004 07:33:28 -0000 1.7 > @@ -10,7 +10,7 @@ > obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o > > obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o \ > - consolemap_deftbl.o selection.o keyboard.o vt_proc.o > + consolemap_deftbl.o selection.o keyboard.o vt_proc.o vt_sysfs.o > obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o > obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o > obj-$(CONFIG_ESPSERIAL) += esp.o > > Index: vt.c > =================================================================== > RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v > retrieving revision 1.14 > retrieving revision 1.15 > diff -u -d -r1.14 -r1.15 > --- vt.c 9 Feb 2004 07:31:07 -0000 1.14 > +++ vt.c 9 Feb 2004 07:33:28 -0000 1.15 > @@ -1851,6 +1851,7 @@ > #ifdef CONFIG_PROC_FS > vt_proc_init(); > #endif > + vt_sysfs_init(); > return 0; > } > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Linuxconsole-commit mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxconsole-commit > |
From: Aivils S. <ai...@us...> - 2004-02-09 07:36:39
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv413/ruby-2.6/drivers/video/console Modified Files: fbcon.c Log Message: add initial read-only sysfs support Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fbcon.c 5 Dec 2003 12:11:21 -0000 1.4 +++ fbcon.c 9 Feb 2004 07:33:28 -0000 1.5 @@ -2302,6 +2302,7 @@ return -ENODEV; } vt_proc_attach(vt); + vt_create_sysfs_dev_files(vt); printk("Console: %s %s %dx%d vc:%d-%d\n", vt->default_mode->vc_can_do_color ? "Colour" : "Mono", display_desc, |
From: Aivils S. <ai...@us...> - 2004-02-09 07:36:39
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv413/ruby-2.6/drivers/char Modified Files: Makefile vt.c Added Files: vt_sysfs.c Log Message: add initial read-only sysfs support --- NEW FILE: vt_sysfs.c --- /* * drivers/char/vt_userspace.c - basic VirtualTerminal class support * A very simple (and naive) implementation by Aivils Stoss */ #include <linux/device.h> #include <linux/module.h> #include <linux/init.h> #include <linux/list.h> #include <linux/vt_kern.h> #include <linux/input.h> /* show configuration fields */ #define vt_config_attr(field, format_string) \ static ssize_t \ vt_show_##field (struct device *dev, char *buf) \ { \ struct vt_struct *vt; \ \ vt = to_vt_struct (dev); \ return sprintf (buf, format_string, vt->field); \ } \ static DEVICE_ATTR(field, S_IRUGO, vt_show_##field, NULL); struct device vt_parent_dev; vt_config_attr(display_desc, "%s\n"); vt_config_attr(first_vc, "%d\n"); vt_config_attr(vc_count, "%d\n"); static ssize_t vt_show_keyboard (struct device *dev, char *buf) { struct vt_struct *vt; struct input_handle *handle; vt = to_vt_struct (dev); handle = vt->keyboard; if (handle && handle->dev->phys) return sprintf (buf, "%s\n", handle->dev->phys); return sprintf (buf, "%s\n", ""); } static DEVICE_ATTR(keyboard, S_IRUGO, vt_show_keyboard, NULL); /** * vt_dev_get - increments the reference count of the pci device structure * @vt: the device being referenced * * Each live reference to a device should be refcounted. * * Drivers for VT devices should normally record such references in * their probe() methods, when they bind to a device, and release * them by calling vt_dev_put(), in their disconnect() methods. * * A pointer to the device with the incremented reference counter is returned. */ struct vt_struct *vt_dev_get(struct vt_struct *vt) { struct device *tmp; if (!vt) return NULL; tmp = get_device(&vt->dev); if (tmp) return to_vt_struct(tmp); else return NULL; } /** * vt_dev_put - release a use of the pci device structure * @vt: device that's been disconnected * * Must be called when a user of a device is finished with it. When the last * user of the device calls this function, the memory of the device is freed. */ void vt_dev_put(struct vt_struct *vt) { if (vt) put_device(&vt->dev); } struct bus_type vt_bus_type = { .name = "vt", }; int __init vt_create_sysfs_dev_files (struct vt_struct *vt) { struct device *dev = &vt->dev; bus_register(&vt_bus_type); dev->parent = &vt_parent_dev; dev->bus = &vt_bus_type; device_initialize(dev); dev->release = NULL; /* release_vt */ vt_dev_get(vt); sprintf (dev->bus_id, "%02x", vt->vt_num); device_add(dev); /* current configuration's attributes */ device_create_file (dev, &dev_attr_display_desc); device_create_file (dev, &dev_attr_first_vc); device_create_file (dev, &dev_attr_vc_count); device_create_file (dev, &dev_attr_keyboard); return 0; } void __init vt_sysfs_init(void) { struct device *dev=&vt_parent_dev; struct vt_struct *vt; memset(dev, 0, sizeof(*dev)); dev->parent = NULL; sprintf(dev->bus_id, "wagadubu"); device_register(dev); list_for_each_entry (vt, &vt_list, node) { vt_create_sysfs_dev_files(vt); } } Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 9 Feb 2004 07:31:07 -0000 1.6 +++ Makefile 9 Feb 2004 07:33:28 -0000 1.7 @@ -10,7 +10,7 @@ obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o \ - consolemap_deftbl.o selection.o keyboard.o vt_proc.o + consolemap_deftbl.o selection.o keyboard.o vt_proc.o vt_sysfs.o obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o obj-$(CONFIG_ESPSERIAL) += esp.o Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- vt.c 9 Feb 2004 07:31:07 -0000 1.14 +++ vt.c 9 Feb 2004 07:33:28 -0000 1.15 @@ -1851,6 +1851,7 @@ #ifdef CONFIG_PROC_FS vt_proc_init(); #endif + vt_sysfs_init(); return 0; } |
From: Aivils S. <ai...@us...> - 2004-02-09 07:36:39
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv413/ruby-2.6/include/linux Modified Files: vt_kern.h Log Message: add initial read-only sysfs support Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vt_kern.h 9 Feb 2004 07:31:07 -0000 1.6 +++ vt_kern.h 9 Feb 2004 07:33:28 -0000 1.7 @@ -9,6 +9,7 @@ #include <linux/pm.h> #include <linux/vt.h> #include <linux/kbd_kern.h> +#include <linux/device.h> #define MIN_NR_CONSOLES 1 /* must be at least 1 */ #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ @@ -245,11 +246,14 @@ unsigned char vt_ledstate; unsigned char vt_ledioctl; char *display_desc; + struct device dev; /* Generic device interface */ }; extern struct list_head vt_list; extern struct vt_struct *admin_vt; +#define to_vt_struct(n) container_of(n, struct vt_struct, dev) + /* universal VT emulation functions */ void vte_ris(struct vc_data *vc, int do_clear); inline void vte_cr(struct vc_data *vc); @@ -323,4 +327,7 @@ void complete_change_console(struct vc_data *new_vc, struct vc_data *old_vc); void change_console(struct vc_data *new_vc, struct vc_data *old_vc); +/* vt_sysfs.c*/ +int __init vt_create_sysfs_dev_files (struct vt_struct *vt); +void __init vt_sysfs_init(void); #endif /* _VT_KERN_H */ |
From: Aivils S. <ai...@us...> - 2004-02-09 07:34:23
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32333/ruby-2.6/include/linux Modified Files: input.h vt_kern.h Log Message: sync to 2.6.2 Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/input.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- input.h 5 Feb 2004 11:53:56 -0000 1.3 +++ input.h 9 Feb 2004 07:31:07 -0000 1.4 @@ -189,18 +189,18 @@ #define KEY_KP3 81 #define KEY_KP0 82 #define KEY_KPDOT 83 -#define KEY_103RD 84 -#define KEY_F13 85 + +#define KEY_ZENKAKUHANKAKU 85 #define KEY_102ND 86 #define KEY_F11 87 #define KEY_F12 88 -#define KEY_F14 89 -#define KEY_F15 90 -#define KEY_F16 91 -#define KEY_F17 92 -#define KEY_F18 93 -#define KEY_F19 94 -#define KEY_F20 95 +#define KEY_RO 89 +#define KEY_KATAKANA 90 +#define KEY_HIRAGANA 91 +#define KEY_HENKAN 92 +#define KEY_KATAKANAHIRAGANA 93 +#define KEY_MUHENKAN 94 +#define KEY_KPJPCOMMA 95 #define KEY_KPENTER 96 #define KEY_RIGHTCTRL 97 #define KEY_KPSLASH 98 @@ -225,11 +225,11 @@ #define KEY_KPEQUAL 117 #define KEY_KPPLUSMINUS 118 #define KEY_PAUSE 119 -#define KEY_F21 120 -#define KEY_F22 121 -#define KEY_F23 122 -#define KEY_F24 123 -#define KEY_KPCOMMA 124 + +#define KEY_KPCOMMA 121 +#define KEY_HANGUEL 122 +#define KEY_HANJA 123 +#define KEY_YEN 124 #define KEY_LEFTMETA 125 #define KEY_RIGHTMETA 126 #define KEY_COMPOSE 127 @@ -288,24 +288,18 @@ #define KEY_KPLEFTPAREN 179 #define KEY_KPRIGHTPAREN 180 -#define KEY_INTL1 181 -#define KEY_INTL2 182 -#define KEY_INTL3 183 -#define KEY_INTL4 184 -#define KEY_INTL5 185 -#define KEY_INTL6 186 -#define KEY_INTL7 187 -#define KEY_INTL8 188 -#define KEY_INTL9 189 -#define KEY_LANG1 190 -#define KEY_LANG2 191 -#define KEY_LANG3 192 -#define KEY_LANG4 193 -#define KEY_LANG5 194 -#define KEY_LANG6 195 -#define KEY_LANG7 196 -#define KEY_LANG8 197 -#define KEY_LANG9 198 +#define KEY_F13 183 +#define KEY_F14 184 +#define KEY_F15 185 +#define KEY_F16 186 +#define KEY_F17 187 +#define KEY_F18 188 +#define KEY_F19 189 +#define KEY_F20 190 +#define KEY_F21 191 +#define KEY_F22 192 +#define KEY_F23 193 +#define KEY_F24 194 #define KEY_PLAYCD 200 #define KEY_PAUSECD 201 @@ -580,6 +574,7 @@ #define BUS_ISAPNP 0x02 #define BUS_USB 0x03 #define BUS_HIL 0x04 +#define BUS_BLUETOOTH 0x05 #define BUS_ISA 0x10 #define BUS_I8042 0x11 @@ -809,6 +804,7 @@ int (*erase_effect)(struct input_dev *dev, int effect_id); struct input_handle *grab; + struct device *dev; struct list_head h_list; struct list_head node; @@ -870,7 +866,7 @@ char *name; struct input_device_id *id_table; - struct input_device_id *blacklist; + struct input_device_id *blacklist; struct list_head h_list; struct list_head node; @@ -922,7 +918,7 @@ #define input_regs(a,b) do { (a)->regs = (b); } while (0) #define input_sync(a) do { input_event(a, EV_SYN, SYN_REPORT, 0); (a)->regs = NULL; } while (0) -extern struct class input_class; +extern struct class_simple *input_class; #endif #endif Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vt_kern.h 28 Oct 2003 07:14:53 -0000 1.5 +++ vt_kern.h 9 Feb 2004 07:31:07 -0000 1.6 @@ -244,6 +244,7 @@ struct proc_dir_entry *procdir; unsigned char vt_ledstate; unsigned char vt_ledioctl; + char *display_desc; }; extern struct list_head vt_list; |
From: Aivils S. <ai...@us...> - 2004-02-09 07:34:23
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32333/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.2 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- compat_ioctl.c 5 Feb 2004 11:53:56 -0000 1.5 +++ compat_ioctl.c 9 Feb 2004 07:31:07 -0000 1.6 @@ -65,6 +65,7 @@ #include <linux/ncp_fs.h> #include <linux/i2c.h> #include <linux/i2c-dev.h> +#include <linux/wireless.h> #include <net/sock.h> /* siocdevprivate_ioctl */ #include <net/bluetooth/bluetooth.h> @@ -130,7 +131,7 @@ set_fs (KERNEL_DS); err = sys_ioctl(fd, cmd, (unsigned long)&val); set_fs (old_fs); [...1326 lines suppressed...] HANDLE_IOCTL(I2C_FUNCS, w_long) HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl) HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl) +/* wireless */ +HANDLE_IOCTL(SIOCGIWRANGE, do_wireless_ioctl) +HANDLE_IOCTL(SIOCSIWSPY, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWSPY, do_wireless_ioctl) +HANDLE_IOCTL(SIOCSIWTHRSPY, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWTHRSPY, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWAPLIST, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWSCAN, do_wireless_ioctl) +HANDLE_IOCTL(SIOCSIWESSID, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWESSID, do_wireless_ioctl) +HANDLE_IOCTL(SIOCSIWNICKN, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWNICKN, do_wireless_ioctl) +HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl) +HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl) #undef DECLARES #endif |
From: Aivils S. <ai...@us...> - 2004-02-09 07:34:23
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32333/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.2 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 5 Feb 2004 11:53:56 -0000 1.5 +++ Makefile 9 Feb 2004 07:31:07 -0000 1.6 @@ -1,7 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = -ruby +NAME=Feisty Dunnart # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -690,7 +691,7 @@ _modinst_: @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ echo "Warning: you may need to install module-init-tools"; \ - echo "See http://www.codemonkey.org.uk/post-halloween-2.5.txt";\ + echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ sleep 1; \ fi @rm -rf $(MODLIB)/kernel @@ -825,8 +826,15 @@ -name '*.[chS]' -print ) endef -quiet_cmd_cscope = MAKE $@ -cmd_cscope = $(all-sources) | cscope -k -b -i - +quiet_cmd_cscope-file = FILELST cscope.files + cmd_cscope-file = $(all-sources) > cscope.files + +quiet_cmd_cscope = MAKE cscope.out + cmd_cscope = cscope -k -b + +cscope: FORCE + $(call cmd,cscope-file) + $(call cmd,cscope) quiet_cmd_TAGS = MAKE $@ cmd_TAGS = $(all-sources) | etags - @@ -840,9 +848,6 @@ $(all-sources) | xargs ctags $$CTAGSF -a endef -cscope: FORCE - $(call cmd,cscope) - TAGS: FORCE $(call cmd,TAGS) |