summaryrefslogtreecommitdiff
path: root/apps/plugins/plugin.lds
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2021-07-08 18:23:18 +0200
committerTomasz Moń <desowin@gmail.com>2021-07-09 09:24:38 +0000
commit60e2cd6de946c0c473c0e9bfde5b7b1d47a5b28f (patch)
tree07ebe2764bc37a0189da55a62312524769a5ecab /apps/plugins/plugin.lds
parent2e9b93dc5df5aff35a64c55493bc2d2d74b4aa0d (diff)
downloadrockbox-60e2cd6de946c0c473c0e9bfde5b7b1d47a5b28f.tar.gz
rockbox-60e2cd6de946c0c473c0e9bfde5b7b1d47a5b28f.zip
DM320: Regorganize LCD and TTB memory layout
Do not introduce any change for M:Robe 500 as it uses the two LCD frames in non-obvious way. Sansa Connect and Creative ZVM use only single front framebuffer. Place TTB at DRAM end to minimize memory loss due to alignment. Reserve as little as possible memory for the LCD frames. On Sansa Connect this change extends audio buffer by 858 KiB. Change-Id: I21bdeec4cfba86d71803a39acd651a87e73767e6
Diffstat (limited to 'apps/plugins/plugin.lds')
-rw-r--r--apps/plugins/plugin.lds11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index cc0be3abd5..fac47d8c45 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -36,7 +36,6 @@ OUTPUT_FORMAT(elf32-littlemips)
36 36
37#elif CONFIG_CPU==DM320 37#elif CONFIG_CPU==DM320
38 38
39/* Give this 1 meg to allow it to align to the MMU boundary */
40#ifndef LCD_NATIVE_WIDTH 39#ifndef LCD_NATIVE_WIDTH
41#define LCD_NATIVE_WIDTH LCD_WIDTH 40#define LCD_NATIVE_WIDTH LCD_WIDTH
42#endif 41#endif
@@ -45,9 +44,17 @@ OUTPUT_FORMAT(elf32-littlemips)
45#define LCD_NATIVE_HEIGHT LCD_HEIGHT 44#define LCD_NATIVE_HEIGHT LCD_HEIGHT
46#endif 45#endif
47 46
47#ifdef MROBE_500
48/* Give this 1 meg to allow it to align to the MMU boundary */
48#define LCD_FUDGE LCD_NATIVE_WIDTH%32 49#define LCD_FUDGE LCD_NATIVE_WIDTH%32
49#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2) 50#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2)
50#define LCD_TTB_AREA 0x100000*((LCD_BUFFER_SIZE>>19)+1) 51#define LCD_TTB_AREA 0x100000*((LCD_BUFFER_SIZE>>19)+1)
52#else
53/* must be 16Kb (0x4000) aligned */
54#define TTB_SIZE (0x4000)
55#define LCD_BUFFER_SIZE (LCD_NATIVE_WIDTH*LCD_NATIVE_HEIGHT*2)
56#define LCD_TTB_AREA (TTB_SIZE + LCD_BUFFER_SIZE)
57#endif
51 58
52#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA 59#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA
53 60