[Intel-gfx] [PATCH 25/33] fbcon: directly call fbcon_fb_blanked

Daniel Vetter daniel.vetter at ffwll.ch
Mon May 20 08:22:08 UTC 2019


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 at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie at samsung.com>
Cc: Hans de Goede <hdegoede at redhat.com>
Cc: Yisheng Xie <ysxie at foxmail.com>
Cc: "Michał Mirosław" <mirq-linux at rere.qmqm.pl>
Cc: Peter Rosin <peda at axentia.se>
Cc: Mikulas Patocka <mpatocka at 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(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 1549056a848e..f85d794a3bee 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -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);
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index d428d08c358a..9932130bf728 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -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);
diff --git a/include/linux/fbcon.h b/include/linux/fbcon.h
index 7f0a530a913c..90e196c835dd 100644
--- a/include/linux/fbcon.h
+++ b/include/linux/fbcon.h
@@ -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 */
-- 
2.20.1



More information about the Intel-gfx mailing list