diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 20:12:50 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 20:12:50 -0800 |
| commit | d619064c3de3cd055f41d4554c9d92526a4f33b8 (patch) | |
| tree | 6101110a2126403bdf8f546dec49725b3608221a /include/linux | |
| parent | d1333ebd7d8cb47f863461d20905d7c775bda0a4 (diff) | |
| parent | dac9e97d6faf7c5fef80d8e1987fc1246aba2320 (diff) | |
Merge http://linux-sound.bkbits.net/linux-sound
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fb.h | 121 | ||||
| -rw-r--r-- | include/linux/mm.h | 21 |
2 files changed, 82 insertions, 60 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 5ba81ae1ccad..834ed08507f8 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -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,49 @@ struct fb_cursor { 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; + +/* + * 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,37 +376,60 @@ struct fb_ops { 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 { @@ -405,7 +442,7 @@ struct fb_info { 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_pixmap pixmap; /* Image Hardware Mapper */ struct fb_cmap cmap; /* Current cmap */ struct fb_ops *fbops; char *screen_base; /* Virtual address */ @@ -482,11 +519,12 @@ 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 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 struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -517,8 +555,7 @@ extern const struct fb_videomode vesa_modes[]; /* 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 +578,8 @@ struct fb_videomode { #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 +606,8 @@ static inline int fb_find_mode(struct fb_var_screeninfo *var, } #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, diff --git a/include/linux/mm.h b/include/linux/mm.h index ffc1e13d0a55..d21630b8f96d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -12,7 +12,6 @@ #include <linux/mmzone.h> #include <linux/rbtree.h> #include <linux/fs.h> -#include <linux/elf.h> #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; @@ -644,24 +643,8 @@ kernel_map_pages(struct page *page, int numpages, int enable) #endif #ifndef CONFIG_ARCH_GATE_AREA -static inline int in_gate_area(struct task_struct *task, unsigned long addr) -{ -#ifdef AT_SYSINFO_EHDR - if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END)) - return 1; -#endif - return 0; -} - -extern struct vm_area_struct gate_vma; -static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk) -{ -#ifdef AT_SYSINFO_EHDR - return &gate_vma; -#else - return 0; -#endif -} +extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); +int in_gate_area(struct task_struct *task, unsigned long addr); #endif #endif /* __KERNEL__ */ |
