From 994efacdf9a087b52f71e620b58dfa526b0cf928 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 9 Feb 2007 09:46:45 +0000 Subject: 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 --- drivers/video/console/fbcon.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/video/console') diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index be3f2c3..0429fd2 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) static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, int blank) { + struct fb_event event; + if (blank) { unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; @@ -2243,6 +2245,11 @@ static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); vc->vc_video_erase_char = oldc; } + + + event.info = info; + event.data = ␣ + fb_notifier_call_chain(FB_EVENT_CONBLANK, &event); } static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) -- cgit v1.1