summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorGreg White <gwhite@rockbox.org>2007-01-11 10:40:26 +0000
committerGreg White <gwhite@rockbox.org>2007-01-11 10:40:26 +0000
commita175b21fdb3cd80275e521a3df7805c4e9da376f (patch)
tree9767957e0eebf4746b3854860c2a2fd6e761ac3b /firmware
parent05e2d47c9f76ef08af12a03ae9bff000f4a388a2 (diff)
Reduce initial fade delay; remove bogus debug from lcd-meg-fx.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11985 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c6
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/lcd-meg-fx.c16
2 files changed, 2 insertions, 20 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
index 9a1c684506..5b32c98572 100644
--- a/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
@@ -123,8 +123,8 @@ void __backlight_init(void)
buttonlight_selected = 0x04;
- /* delay 5 seconds before any fading */
- initial_tick_delay = 5000;
+ /* delay 2 seconds before any fading */
+ initial_tick_delay = 2000;
/* put the led control on the tick list */
tick_add_task(led_control_service);
}
@@ -570,8 +570,6 @@ static void led_control_service(void)
sc606_write(SC606_REG_CONF, buttonlight_leds);
backlight_control = BACKLIGHT_CONTROL_IDLE;
- /* turn the lcd completely off after the fade or off command */
- lcd_enable(false);
break;
diff --git a/firmware/target/arm/gigabeat/meg-fx/lcd-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/lcd-meg-fx.c
index cbeddc6ee7..778e049dd5 100644
--- a/firmware/target/arm/gigabeat/meg-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/lcd-meg-fx.c
@@ -24,11 +24,6 @@ volatile bool lcd_poweroff = false;
extern unsigned fg_pattern;
extern unsigned bg_pattern;
-static struct mutex lcd_update_mtx;
-static struct mutex lcd_clear_mtx;
-static struct mutex lcd_enable_mtx;
-
-
bool lcd_enabled()
{
return lcd_on;
@@ -37,10 +32,6 @@ bool lcd_enabled()
/* LCD init */
void lcd_init_device(void)
{
- mutex_init(&lcd_update_mtx);
- mutex_init(&lcd_clear_mtx);
- mutex_init(&lcd_enable_mtx);
-
memset16(fg_pattern_blit, fg_pattern, sizeof(fg_pattern_blit)/2);
memset16(bg_pattern_blit, bg_pattern, sizeof(bg_pattern_blit)/2);
clean_dcache_range((void *)fg_pattern_blit, sizeof(fg_pattern_blit));
@@ -73,8 +64,6 @@ void lcd_update_rect(int x, int y, int width, int height)
}
if (use_dma_blit)
{
-// mutex_lock(&lcd_update_mtx);
-
/* Wait for this controller to stop pending transfer */
while((DSTAT1 & 0x000fffff))
CLKCON |= (1 << 2); /* set IDLE bit */
@@ -104,7 +93,6 @@ void lcd_update_rect(int x, int y, int width, int height)
/* Wait for transfer to complete */
while((DSTAT1 & 0x000fffff))
CLKCON |= (1 << 2); /* set IDLE bit */
-// mutex_unlock(&lcd_update_mtx);
}
else
memcpy(((char*)FRAME) + (y * sizeof(fb_data) * LCD_WIDTH), ((char *)&lcd_framebuffer) + (y * sizeof(fb_data) * LCD_WIDTH), ((height * sizeof(fb_data) * LCD_WIDTH)));
@@ -115,7 +103,6 @@ void lcd_enable(bool state)
{
if(!lcd_poweroff)
return;
- mutex_lock(&lcd_enable_mtx);
if(state) {
if(!lcd_on) {
lcd_on = true;
@@ -129,7 +116,6 @@ void lcd_enable(bool state)
LCDCON1 &= ~1;
}
}
- mutex_unlock(&lcd_enable_mtx);
}
void lcd_set_foreground(unsigned color)
@@ -174,7 +160,6 @@ void lcd_clear_display_dma(void)
inc = true;
}
}
-// mutex_lock(&lcd_clear_mtx);
/* Wait for any pending transfer to complete */
while((DSTAT3 & 0x000fffff))
CLKCON |= (1 << 2); /* set IDLE bit */
@@ -198,7 +183,6 @@ void lcd_clear_display_dma(void)
/* Wait for transfer to complete */
while((DSTAT3 & 0x000fffff))
CLKCON |= (1 << 2); /* set IDLE bit */
-// mutex_unlock(&lcd_update_mtx);
}
void lcd_clear_display(void)