1 From c0dbeaf1fa932dbae6027a49ddbff973b2689eea Mon Sep 17 00:00:00 2001
2 From: David Herrmann <dh.herrmann@googlemail.com>
3 Date: Sat, 16 Jun 2012 23:04:48 +0200
4 Subject: [PATCH 05/10] fblog: add framebuffer helpers
6 These helpers scan the system for all available framebuffers and register
7 or unregister them. This is needed during startup and stopping fblog so we
8 are aware of all connected displays.
10 The third helper handles mode changes by rescanning the mode and adjusting
13 Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
15 drivers/video/console/fblog.c | 29 +++++++++++++++++++++++++++++
16 1 file changed, 29 insertions(+)
18 diff --git a/drivers/video/console/fblog.c b/drivers/video/console/fblog.c
19 index e790971..7d4032e 100644
20 --- a/drivers/video/console/fblog.c
21 +++ b/drivers/video/console/fblog.c
22 @@ -399,6 +399,35 @@ static void fblog_unregister(struct fblog_fb *fb)
26 +static void fblog_register_all(void)
30 + for (i = 0; i < FB_MAX; ++i)
31 + fblog_register(registered_fb[i]);
34 +static void fblog_unregister_all(void)
38 + for (i = 0; i < FB_MAX; ++i)
39 + fblog_unregister(fblog_info2fb(registered_fb[i]));
42 +static void fblog_refresh(struct fblog_fb *fb)
44 + unsigned int width, height;
46 + if (!fb || !fb->font)
49 + width = fb->info->var.xres / fb->font->width;
50 + height = fb->info->var.yres / fb->font->height;
51 + fblog_buf_resize(&fb->buf, width, height);
55 static int __init fblog_init(void)