diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-02-09 04:46:45 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-02-20 03:38:45 -0500 |
commit | 994efacdf9a087b52f71e620b58dfa526b0cf928 (patch) | |
tree | 2b2668df970fe350ce2ab4a7bb7ae91d6313ce0f /drivers/video/console | |
parent | 34f18a71d9bc55e8210c3fe02938336f82f40b30 (diff) |
backlight/fbcon: Add FB_EVENT_CONBLANK
The backlight class wants notification whenever the console is blanked
but doesn't get this when hardware blanking fails and software blanking
is used. Changing FB_EVENT_BLANK to report both would be a behaviour
change which could confuse the console layer so add a new event for
software blanking and have the backlight class listen for both.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/fbcon.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index be3f2c3f132c..0429fd2cece0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2233,6 +2233,8 @@ static int fbcon_switch(struct vc_data *vc) | |||
2233 | static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, | 2233 | static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, |
2234 | int blank) | 2234 | int blank) |
2235 | { | 2235 | { |
2236 | struct fb_event event; | ||
2237 | |||
2236 | if (blank) { | 2238 | if (blank) { |
2237 | unsigned short charmask = vc->vc_hi_font_mask ? | 2239 | unsigned short charmask = vc->vc_hi_font_mask ? |
2238 | 0x1ff : 0xff; | 2240 | 0x1ff : 0xff; |
@@ -2243,6 +2245,11 @@ static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, | |||
2243 | fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); | 2245 | fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); |
2244 | vc->vc_video_erase_char = oldc; | 2246 | vc->vc_video_erase_char = oldc; |
2245 | } | 2247 | } |
2248 | |||
2249 | |||
2250 | event.info = info; | ||
2251 | event.data = ␣ | ||
2252 | fb_notifier_call_chain(FB_EVENT_CONBLANK, &event); | ||
2246 | } | 2253 | } |
2247 | 2254 | ||
2248 | static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) | 2255 | static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) |