Modify it to adjust Tizen IVI enviroment
[platform/upstream/kmscon.git] / fblog / 0007-fblog-forward-kernel-log-messages-to-all-framebuffer.patch
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
5
6 This provides a console-driver that forwards all log messages to all
7 framebuffers and redraws them.
8
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.
13
14 Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
15 ---
16  drivers/video/console/fblog.c |   19 +++++++++++++++++++
17  1 file changed, 19 insertions(+)
18
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();
25  }
26  
27 +static void fblog_con_write(struct console *con, const char *buf,
28 +                           unsigned int len)
29 +{
30 +       int i;
31 +
32 +       for (i = 0; i < FB_MAX; ++i) {
33 +               if (fblog_fbs[i]) {
34 +                       fblog_buf_write(&fblog_fbs[i]->buf, buf, len);
35 +                       fblog_redraw(fblog_fbs[i]);
36 +               }
37 +       }
38 +}
39 +
40 +static struct console fblog_con_driver = {
41 +       .name = "fblog",
42 +       .write = fblog_con_write,
43 +       .flags = CON_PRINTBUFFER | CON_ENABLED,
44 +};
45 +
46  static ssize_t fblog_dev_active_show(struct device *dev,
47                                      struct device_attribute *attr,
48                                      char *buf)
49 -- 
50 1.7.10.4
51