diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2013-05-30 01:56:17 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:00:46 -0400 |
commit | d62e7e8a788bc6d45bf21dd0baa1812f86372fee (patch) | |
tree | 0272fdcde39f3dd82624b4b75635aeaf58aec8cf /include/linux/backlight.h | |
parent | febca8687a6e17a9f8bc392955f1a0e0c8f843c8 (diff) |
ENGR00264855 backlight: Support backlight shared by multiple fbs
One backlight device may shared by multiple framebuffers.
We don't hope blanking one of the framebuffers may turn the
backlight off for all the other framebuffers, since they are
likely active to show display content. This patch adds logic
to record each framebuffer's backlight usage to determine the
backlight device use count and whether the backlight should be
turned on or off.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 37cbf741e4dff1f757f3ade6bb861d9a2af70693)
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r-- | include/linux/backlight.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index da9a0825e007..5de71a00290e 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define _LINUX_BACKLIGHT_H | 9 | #define _LINUX_BACKLIGHT_H |
10 | 10 | ||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/fb.h> | ||
12 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
13 | #include <linux/notifier.h> | 14 | #include <linux/notifier.h> |
14 | 15 | ||
@@ -101,6 +102,11 @@ struct backlight_device { | |||
101 | struct notifier_block fb_notif; | 102 | struct notifier_block fb_notif; |
102 | 103 | ||
103 | struct device dev; | 104 | struct device dev; |
105 | |||
106 | /* Multiple framebuffers may share one backlight device */ | ||
107 | bool fb_bl_on[FB_MAX]; | ||
108 | |||
109 | int use_count; | ||
104 | }; | 110 | }; |
105 | 111 | ||
106 | static inline void backlight_update_status(struct backlight_device *bd) | 112 | static inline void backlight_update_status(struct backlight_device *bd) |