aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r--include/linux/fb.h45
1 files changed, 31 insertions, 14 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 315d89740ddf..ffefeeeeca93 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_FB_H 1#ifndef _LINUX_FB_H
2#define _LINUX_FB_H 2#define _LINUX_FB_H
3 3
4#include <linux/backlight.h>
4#include <asm/types.h> 5#include <asm/types.h>
5 6
6/* Definitions of frame buffers */ 7/* Definitions of frame buffers */
@@ -366,6 +367,12 @@ struct fb_cursor {
366 struct fb_image image; /* Cursor image */ 367 struct fb_image image; /* Cursor image */
367}; 368};
368 369
370#ifdef CONFIG_FB_BACKLIGHT
371/* Settings for the generic backlight code */
372#define FB_BACKLIGHT_LEVELS 128
373#define FB_BACKLIGHT_MAX 0xFF
374#endif
375
369#ifdef __KERNEL__ 376#ifdef __KERNEL__
370 377
371#include <linux/fs.h> 378#include <linux/fs.h>
@@ -373,7 +380,6 @@ struct fb_cursor {
373#include <linux/tty.h> 380#include <linux/tty.h>
374#include <linux/device.h> 381#include <linux/device.h>
375#include <linux/workqueue.h> 382#include <linux/workqueue.h>
376#include <linux/devfs_fs_kernel.h>
377#include <linux/notifier.h> 383#include <linux/notifier.h>
378#include <linux/list.h> 384#include <linux/list.h>
379#include <asm/io.h> 385#include <asm/io.h>
@@ -497,23 +503,19 @@ struct fb_cursor_user {
497#define FB_EVENT_MODE_DELETE 0x04 503#define FB_EVENT_MODE_DELETE 0x04
498/* A driver registered itself */ 504/* A driver registered itself */
499#define FB_EVENT_FB_REGISTERED 0x05 505#define FB_EVENT_FB_REGISTERED 0x05
506/* A driver unregistered itself */
507#define FB_EVENT_FB_UNREGISTERED 0x06
500/* CONSOLE-SPECIFIC: get console to framebuffer mapping */ 508/* CONSOLE-SPECIFIC: get console to framebuffer mapping */
501#define FB_EVENT_GET_CONSOLE_MAP 0x06 509#define FB_EVENT_GET_CONSOLE_MAP 0x07
502/* CONSOLE-SPECIFIC: set console to framebuffer mapping */ 510/* CONSOLE-SPECIFIC: set console to framebuffer mapping */
503#define FB_EVENT_SET_CONSOLE_MAP 0x07 511#define FB_EVENT_SET_CONSOLE_MAP 0x08
504/* A display blank is requested */ 512/* A display blank is requested */
505#define FB_EVENT_BLANK 0x08 513#define FB_EVENT_BLANK 0x09
506/* Private modelist is to be replaced */ 514/* Private modelist is to be replaced */
507#define FB_EVENT_NEW_MODELIST 0x09 515#define FB_EVENT_NEW_MODELIST 0x0A
508/* The resolution of the passed in fb_info about to change and 516/* The resolution of the passed in fb_info about to change and
509 all vc's should be changed */ 517 all vc's should be changed */
510#define FB_EVENT_MODE_CHANGE_ALL 0x0A 518#define FB_EVENT_MODE_CHANGE_ALL 0x0B
511/* CONSOLE-SPECIFIC: set console rotation */
512#define FB_EVENT_SET_CON_ROTATE 0x0B
513/* CONSOLE-SPECIFIC: get console rotation */
514#define FB_EVENT_GET_CON_ROTATE 0x0C
515/* CONSOLE-SPECIFIC: rotate all consoles */
516#define FB_EVENT_SET_CON_ROTATE_ALL 0x0D
517 519
518struct fb_event { 520struct fb_event {
519 struct fb_info *info; 521 struct fb_info *info;
@@ -555,7 +557,7 @@ struct fb_pixmap {
555 * Frame buffer operations 557 * Frame buffer operations
556 * 558 *
557 * LOCKING NOTE: those functions must _ALL_ be called with the console 559 * LOCKING NOTE: those functions must _ALL_ be called with the console
558 * semaphore held, this is the only suitable locking mecanism we have 560 * semaphore held, this is the only suitable locking mechanism we have
559 * in 2.6. Some may be called at interrupt time at this point though. 561 * in 2.6. Some may be called at interrupt time at this point though.
560 */ 562 */
561 563
@@ -756,6 +758,21 @@ struct fb_info {
756 struct fb_cmap cmap; /* Current cmap */ 758 struct fb_cmap cmap; /* Current cmap */
757 struct list_head modelist; /* mode list */ 759 struct list_head modelist; /* mode list */
758 struct fb_videomode *mode; /* current mode */ 760 struct fb_videomode *mode; /* current mode */
761
762#ifdef CONFIG_FB_BACKLIGHT
763 /* Lock ordering:
764 * bl_mutex (protects bl_dev and bl_curve)
765 * bl_dev->sem (backlight class)
766 */
767 struct mutex bl_mutex;
768
769 /* assigned backlight device */
770 struct backlight_device *bl_dev;
771
772 /* Backlight level curve */
773 u8 bl_curve[FB_BACKLIGHT_LEVELS];
774#endif
775
759 struct fb_ops *fbops; 776 struct fb_ops *fbops;
760 struct device *device; 777 struct device *device;
761 struct class_device *class_device; /* sysfs per device attrs */ 778 struct class_device *class_device; /* sysfs per device attrs */
@@ -870,7 +887,6 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var,
870 struct fb_fix_screeninfo *fix); 887 struct fb_fix_screeninfo *fix);
871extern int fb_get_options(char *name, char **option); 888extern int fb_get_options(char *name, char **option);
872extern int fb_new_modelist(struct fb_info *info); 889extern int fb_new_modelist(struct fb_info *info);
873extern int fb_con_duit(struct fb_info *info, int event, void *data);
874 890
875extern struct fb_info *registered_fb[FB_MAX]; 891extern struct fb_info *registered_fb[FB_MAX];
876extern int num_registered_fb; 892extern int num_registered_fb;
@@ -895,6 +911,7 @@ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
895extern void framebuffer_release(struct fb_info *info); 911extern void framebuffer_release(struct fb_info *info);
896extern int fb_init_class_device(struct fb_info *fb_info); 912extern int fb_init_class_device(struct fb_info *fb_info);
897extern void fb_cleanup_class_device(struct fb_info *head); 913extern void fb_cleanup_class_device(struct fb_info *head);
914extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
898 915
899/* drivers/video/fbmon.c */ 916/* drivers/video/fbmon.c */
900#define FB_MAXTIMINGS 0 917#define FB_MAXTIMINGS 0