summaryrefslogtreecommitdiff
path: root/include/linux/fb.h
diff options
context:
space:
mode:
authorAntonino Daplas <adaplas@hotpop.com>2004-08-22 22:51:45 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:51:45 -0700
commit80f6ef4abc7f4583d95da92555a289887ff23d58 (patch)
tree604f863a655312a2d46cff5c23cbde534f800853 /include/linux/fb.h
parent9abf5f515a9d246e6154514b0b966505970cef3e (diff)
[PATCH] Video Mode Handling - Linked list of video modes
The patch adds support for a mode database in a linked list form. Included in the patch are exportable functions that will: a. convert struct fb_videomode to struct fb_var_screeninfo and vice versa b. search the mode list for matching or best-fit modes c. add/delete entries to the database d. convert a mode array to a mode list e. destroy the entire list d. compare 2 modes Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r--include/linux/fb.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 14b34bee7d07..2ad372ba9abe 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -2,6 +2,7 @@
#define _LINUX_FB_H
#include <asm/types.h>
+#include <linux/list.h>
/* Definitions of frame buffers */
@@ -711,6 +712,7 @@ extern void framebuffer_release(struct fb_info *info);
#define FB_MODE_IS_VESA 4
#define FB_MODE_IS_CALCULATED 8
#define FB_MODE_IS_FIRST 16
+#define FB_MODE_IS_FROM_VAR 32
extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
const struct fb_info *fb_info);
@@ -729,6 +731,22 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 34
extern const struct fb_videomode vesa_modes[];
+extern void fb_var_to_videomode(struct fb_videomode *mode,
+ struct fb_var_screeninfo *var);
+extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
+ struct fb_videomode *mode);
+extern int fb_mode_is_equal(struct fb_videomode *mode1,
+ struct fb_videomode *mode2);
+extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head);
+extern void fb_delete_videomode(struct fb_videomode *mode,
+ struct list_head *head);
+extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var,
+ struct list_head *head);
+extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var,
+ struct list_head *head);
+extern void fb_destroy_modelist(struct list_head *head);
+extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num,
+ struct list_head *head);
/* drivers/video/fbcmap.c */
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
@@ -757,6 +775,11 @@ struct fb_videomode {
u32 flag;
};
+struct fb_modelist {
+ struct list_head list;
+ struct fb_videomode mode;
+};
+
extern int fb_find_mode(struct fb_var_screeninfo *var,
struct fb_info *info, const char *mode_option,
const struct fb_videomode *db,