summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-11-14 11:27:41 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-11-14 11:27:41 +0000
commit81f72ddef6ff4e07ad437b48b5460f761a7f17f3 (patch)
treefc5b9e0c9f08c6ee9fc3c8fb3e7626e96fb4c8f3 /firmware/target
parentd1963e14dede231129a9ae9988b55c157181e8a0 (diff)
downloadrockbox-81f72ddef6ff4e07ad437b48b5460f761a7f17f3.tar.gz
rockbox-81f72ddef6ff4e07ad437b48b5460f761a7f17f3.tar.bz2
rockbox-81f72ddef6ff4e07ad437b48b5460f761a7f17f3.zip
Set DRMODE_SOLID, uniform colors, and sysfont before clearing LCD to display panic or exception messages - see FS#10665.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23623 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/system-arm.c10
-rw-r--r--firmware/target/coldfire/system-coldfire.c9
-rw-r--r--firmware/target/mips/ingenic_jz47xx/system-jz4740.c10
-rw-r--r--firmware/target/sh/system-sh.c10
4 files changed, 34 insertions, 5 deletions
diff --git a/firmware/target/arm/system-arm.c b/firmware/target/arm/system-arm.c
index 920dbacd10..91d8613bac 100644
--- a/firmware/target/arm/system-arm.c
+++ b/firmware/target/arm/system-arm.c
@@ -36,10 +36,16 @@ static const char* const uiename[] = {
*/
void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num)
{
- lcd_clear_display();
-#ifdef HAVE_LCD_BITMAP
+#if LCD_DEPTH > 1
+ lcd_set_backdrop(NULL);
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_set_foreground(LCD_BLACK);
+ lcd_set_background(LCD_WHITE);
+#endif
lcd_setfont(FONT_SYSFIXED);
+ lcd_set_viewport(NULL);
#endif
+ lcd_clear_display();
lcd_puts(0, 0, uiename[num]);
lcd_putsf(0, 1, "at %08x" IF_COP(" (%d)"), pc
IF_COP(, CURRENT_CORE));
diff --git a/firmware/target/coldfire/system-coldfire.c b/firmware/target/coldfire/system-coldfire.c
index 8ae702fdfc..a387824526 100644
--- a/firmware/target/coldfire/system-coldfire.c
+++ b/firmware/target/coldfire/system-coldfire.c
@@ -167,8 +167,15 @@ static void system_display_exception_info(unsigned long format,
int vector = (format >> 18) & 0xff;
/* clear screen */
- lcd_clear_display ();
+#if LCD_DEPTH > 1
+ lcd_set_backdrop(NULL);
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_set_foreground(LCD_BLACK);
+ lcd_set_background(LCD_WHITE);
+#endif
lcd_setfont(FONT_SYSFIXED);
+ lcd_set_viewport(NULL);
+ lcd_clear_display();
lcd_putsf(0, 0, "I%02x:%s", vector, irqname[vector]);
lcd_putsf(0, 1, "at %08x", pc);
diff --git a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
index c5f99aba23..68d4759f4d 100644
--- a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
@@ -262,9 +262,17 @@ void exception_handler(void* stack_ptr, unsigned int cause, unsigned int epc)
"$1", "LO", "HI", "STATUS", "EPC" };
int i;
+#ifdef HAVE_LCD_BITMAP
+#if LCD_DEPTH > 1
lcd_set_backdrop(NULL);
- lcd_clear_display();
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_set_foreground(LCD_BLACK);
+ lcd_set_background(LCD_WHITE);
+#endif
lcd_setfont(FONT_SYSFIXED);
+ lcd_set_viewport(NULL);
+#endif
+ lcd_clear_display();
_backlight_on();
snprintf(buffer, sizeof(buffer), "0x%08x at 0x%08x", read_c0_badvaddr(), epc);
diff --git a/firmware/target/sh/system-sh.c b/firmware/target/sh/system-sh.c
index 24821095e8..e054801b57 100644
--- a/firmware/target/sh/system-sh.c
+++ b/firmware/target/sh/system-sh.c
@@ -299,10 +299,18 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
asm volatile ("sts\tpr,%0" : "=r"(n));
/* clear screen */
- lcd_clear_display();
#ifdef HAVE_LCD_BITMAP
+#if LCD_DEPTH > 1
+ lcd_set_backdrop(NULL);
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_set_foreground(LCD_BLACK);
+ lcd_set_background(LCD_WHITE);
+#endif
lcd_setfont(FONT_SYSFIXED);
+ lcd_set_viewport(NULL);
#endif
+
+ lcd_clear_display();
/* output exception */
n = (n - (unsigned)UIE4 + 12)>>2; /* get exception or interrupt number */
lcd_putsf(0, 0, "I%02x:%s", n, irqname[n]);