diff options
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index c6ce416ab587..0dff12a1daef 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1046,20 +1046,29 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) | |||
1046 | int | 1046 | int |
1047 | fb_blank(struct fb_info *info, int blank) | 1047 | fb_blank(struct fb_info *info, int blank) |
1048 | { | 1048 | { |
1049 | int ret = -EINVAL; | 1049 | struct fb_event event; |
1050 | int ret = -EINVAL, early_ret; | ||
1050 | 1051 | ||
1051 | if (blank > FB_BLANK_POWERDOWN) | 1052 | if (blank > FB_BLANK_POWERDOWN) |
1052 | blank = FB_BLANK_POWERDOWN; | 1053 | blank = FB_BLANK_POWERDOWN; |
1053 | 1054 | ||
1055 | event.info = info; | ||
1056 | event.data = ␣ | ||
1057 | |||
1058 | early_ret = fb_notifier_call_chain(FB_EARLY_EVENT_BLANK, &event); | ||
1059 | |||
1054 | if (info->fbops->fb_blank) | 1060 | if (info->fbops->fb_blank) |
1055 | ret = info->fbops->fb_blank(blank, info); | 1061 | ret = info->fbops->fb_blank(blank, info); |
1056 | 1062 | ||
1057 | if (!ret) { | 1063 | if (!ret) |
1058 | struct fb_event event; | ||
1059 | |||
1060 | event.info = info; | ||
1061 | event.data = ␣ | ||
1062 | fb_notifier_call_chain(FB_EVENT_BLANK, &event); | 1064 | fb_notifier_call_chain(FB_EVENT_BLANK, &event); |
1065 | else { | ||
1066 | /* | ||
1067 | * if fb_blank is failed then revert effects of | ||
1068 | * the early blank event. | ||
1069 | */ | ||
1070 | if (!early_ret) | ||
1071 | fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK, &event); | ||
1063 | } | 1072 | } |
1064 | 1073 | ||
1065 | return ret; | 1074 | return ret; |