@@ -3227,7 +3227,7 @@ int fbcon_fb_registered(struct fb_info *info)
return ret;
}
-static void fbcon_fb_blanked(struct fb_info *info, int blank)
+void fbcon_fb_blanked(struct fb_info *info, int blank)
{
struct fbcon_ops *ops = info->fbcon_par;
struct vc_data *vc;
@@ -3331,9 +3331,6 @@ static int fbcon_event_notify(struct notifier_block *self,
con2fb = event->data;
con2fb->framebuffer = con2fb_map[con2fb->console - 1];
break;
- case FB_EVENT_BLANK:
- fbcon_fb_blanked(info, *(int *)event->data);
- break;
case FB_EVENT_REMAP_ALL_CONSOLE:
idx = info->node;
fbcon_remap_all(idx);
@@ -1068,6 +1068,7 @@ fb_blank(struct fb_info *info, int blank)
event.data = ␣
early_ret = fb_notifier_call_chain(FB_EARLY_EVENT_BLANK, &event);
+ fbcon_fb_blanked(info, blank);
if (info->fbops->fb_blank)
ret = info->fbops->fb_blank(blank, info);
@@ -14,6 +14,7 @@ int fbcon_mode_deleted(struct fb_info *info,
void fbcon_new_modelist(struct fb_info *info);
void fbcon_get_requirement(struct fb_info *info,
struct fb_blit_caps *caps);
+void fbcon_fb_blanked(struct fb_info *info, int blank);
#else
static inline void fb_console_init(void) {}
static inline void fb_console_exit(void) {}
@@ -27,6 +28,7 @@ int fbcon_mode_deleted(struct fb_info *info,
void fbcon_new_modelist(struct fb_info *info) {}
void fbcon_get_requirement(struct fb_info *info,
struct fb_blit_caps *caps) {}
+void fbcon_fb_blanked(struct fb_info *info, int blank) {}
#endif
#endif /* _LINUX_FBCON_H */
We cant remove FB_EVENT_BLANK because that's still used by the backlight and lcd code, but that's kinda fine: No recursion between fbdev core code and fbcon code possible for that case. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Yisheng Xie <ysxie@foxmail.com> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Peter Rosin <peda@axentia.se> Cc: Mikulas Patocka <mpatocka@redhat.com> --- drivers/video/fbdev/core/fbcon.c | 5 +---- drivers/video/fbdev/core/fbmem.c | 1 + include/linux/fbcon.h | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-)