summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-16bit.c9
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c36
2 files changed, 3 insertions, 42 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index 0a3d193cad..44e42ad617 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -33,11 +33,6 @@
#include "font.h"
#include "rbunicode.h"
#include "bidi.h"
-#if defined(TOSHIBA_GIGABEAT_F)
-#define NON_GB_STATIC
-#else
-#define NON_GB_STATIC static
-#endif
#define SCROLLABLE_LINES ((LCD_HEIGHT+4)/5 < 32 ? (LCD_HEIGHT+4)/5 : 32)
@@ -54,8 +49,8 @@ fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IRAM_LCDFRAMEBUFFER __attribu
static fb_data* lcd_backdrop = NULL;
static long lcd_backdrop_offset IDATA_ATTR = 0;
-NON_GB_STATIC unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG;
-NON_GB_STATIC unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG;
+static unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG;
+static unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG;
static int drawmode = DRMODE_SOLID;
static int xmargin = 0;
static int ymargin = 0;
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
index 3bb2801b02..17b0a6966e 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
@@ -14,7 +14,6 @@
#define LCDADDR(x, y) (&lcd_framebuffer[(y)][(x)])
-volatile bool use_dma_blit = false;
static volatile bool lcd_on = true;
volatile bool lcd_poweroff = false;
/*
@@ -89,40 +88,7 @@ void lcd_update_rect(int x, int y, int width, int height)
sleep(200);
return;
}
- if (use_dma_blit)
- {
- /* Wait for this controller to stop pending transfer */
- while((DSTAT1 & 0x000fffff))
- CLKCON |= (1 << 2); /* set IDLE bit */
-
- /* Flush DCache */
- invalidate_dcache_range((void *)(((int) &lcd_framebuffer[0][0])+(y * sizeof(fb_data) * LCD_WIDTH)), (height * sizeof(fb_data) * LCD_WIDTH));
-
- /* set DMA dest */
- DIDST1 = ((int) FRAME) + (y * sizeof(fb_data) * LCD_WIDTH);
-
- /* FRAME on AHB buf, increment */
- DIDSTC1 = 0;
- /* Handshake on AHB, Burst transfer, Whole service, Don't reload, transfer 32-bits */
- DCON1 = ((1<<30) | (1<<28) | (1<<27) | (1<<22) | (2<<20)) | ((height * sizeof(fb_data) * LCD_WIDTH) >> 4);
-
- /* set DMA source */
- DISRC1 = ((int) &lcd_framebuffer[0][0]) + (y * sizeof(fb_data) * LCD_WIDTH) + 0x30000000;
- /* memory is on AHB bus, increment addresses */
- DISRCC1 = 0x00;
-
- /* Activate the channel */
- DMASKTRIG1 = 0x2;
-
- /* Start DMA */
- DMASKTRIG1 |= 0x1;
-
- /* Wait for transfer to complete */
- while((DSTAT1 & 0x000fffff))
- CLKCON |= (1 << 2); /* set IDLE bit */
- }
- 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)));
+ memcpy(((char*)FRAME) + (y * sizeof(fb_data) * LCD_WIDTH), ((char *)&lcd_framebuffer) + (y * sizeof(fb_data) * LCD_WIDTH), ((height * sizeof(fb_data) * LCD_WIDTH)));
}