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