*/
#include <common.h>
#include <ramoops.h>
+#ifdef CONFIG_S5PC1XXFB
+#include <fbutils.h>
+#endif
static char msg[RAMOOPS_SIZE];
static int dumped;
static void ramoops_show(void)
{
int i;
+#ifdef CONFIG_S5PC1XXFB
+ unsigned int chars;
+#endif
if (!dumped) {
puts("No Messages\n");
return;
}
+#ifdef CONFIG_S5PC1XXFB
+ init_font();
+ fb_clear();
+ set_font_color(FONT_WHITE);
+ chars = get_chars();
+ printf("chars %d\n", chars);
+#endif
+
printf("\n\n");
- for (i = 0; i < RAMOOPS_SIZE; i++)
- printf("%c", msg[i]);
+ for (i = 0; i < RAMOOPS_SIZE; i++) {
+ char s[1];
+ sprintf(s, "%c", msg[i]);
+ puts(s);
+#ifdef CONFIG_S5PC1XXFB
+ if (!s5p_no_lcd_support() && i > (RAMOOPS_SIZE - chars))
+ fb_printf(s);
+#endif
+ }
printf("\n\n");
+
+#ifdef CONFIG_S5PC1XXFB
+ exit_font();
+#endif
}
int ramoops_init(unsigned int base)
g_default_x = g_default_y = 0;
g_x = g_y = 0;
}
+
+void fb_clear(void)
+{
+ int y;
+ int line_length = panel_info.vl_width * 4;
+
+ for (y = 0; y < panel_info.vl_height; y++)
+ memset(line_addr[y], 0x0, line_length);
+}
+
+unsigned int get_chars(void)
+{
+ int chars;
+ int lines;
+
+ chars = panel_info.vl_width / font_vga_8x16.width - 10;
+ lines = panel_info.vl_height / (font_vga_8x16.height + 2);
+
+ return chars * lines;
+}
/* draw progress */
void draw_progress(int y, int per, unsigned char color);
+/* clear the framebuffer */
+void fb_clear(void);
+
+unsigned int get_chars(void);
+
#endif /* _FONT_H */