1 From 942d4ff8f16fcf9d9fdf50d7241a3a8fb4fec39a Mon Sep 17 00:00:00 2001
2 From: David Herrmann <dh.herrmann@googlemail.com>
3 Date: Sat, 16 Jun 2012 23:20:52 +0200
4 Subject: [PATCH 07/10] fblog: forward kernel log messages to all framebuffers
6 This provides a console-driver that forwards all log messages to all
7 framebuffers and redraws them.
9 To avoid redrawing multiple times in short intervals, we could use a
10 work-queue here by simply pushing the task onto the system work-queue.
11 However, fblog is not performance critical and only used for debugging so
12 we avoid the complexity for now. This may change in the future, though.
14 Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
16 drivers/video/console/fblog.c | 19 +++++++++++++++++++
17 1 file changed, 19 insertions(+)
19 diff --git a/drivers/video/console/fblog.c b/drivers/video/console/fblog.c
20 index 9b05c56..5297eca 100644
21 --- a/drivers/video/console/fblog.c
22 +++ b/drivers/video/console/fblog.c
23 @@ -449,6 +449,25 @@ static void fblog_deactivate(void)
24 fblog_unregister_all();
27 +static void fblog_con_write(struct console *con, const char *buf,
32 + for (i = 0; i < FB_MAX; ++i) {
34 + fblog_buf_write(&fblog_fbs[i]->buf, buf, len);
35 + fblog_redraw(fblog_fbs[i]);
40 +static struct console fblog_con_driver = {
42 + .write = fblog_con_write,
43 + .flags = CON_PRINTBUFFER | CON_ENABLED,
46 static ssize_t fblog_dev_active_show(struct device *dev,
47 struct device_attribute *attr,