From 60e2cd6de946c0c473c0e9bfde5b7b1d47a5b28f Mon Sep 17 00:00:00 2001 From: Tomasz Moń Date: Thu, 8 Jul 2021 18:23:18 +0200 Subject: 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 --- apps/plugins/plugin.lds | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/plugins/plugin.lds') 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) #elif CONFIG_CPU==DM320 -/* Give this 1 meg to allow it to align to the MMU boundary */ #ifndef LCD_NATIVE_WIDTH #define LCD_NATIVE_WIDTH LCD_WIDTH #endif @@ -45,9 +44,17 @@ OUTPUT_FORMAT(elf32-littlemips) #define LCD_NATIVE_HEIGHT LCD_HEIGHT #endif +#ifdef MROBE_500 +/* Give this 1 meg to allow it to align to the MMU boundary */ #define LCD_FUDGE LCD_NATIVE_WIDTH%32 -#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2) +#define LCD_BUFFER_SIZE ((LCD_NATIVE_WIDTH+LCD_FUDGE)*LCD_NATIVE_HEIGHT*2) #define LCD_TTB_AREA 0x100000*((LCD_BUFFER_SIZE>>19)+1) +#else +/* must be 16Kb (0x4000) aligned */ +#define TTB_SIZE (0x4000) +#define LCD_BUFFER_SIZE (LCD_NATIVE_WIDTH*LCD_NATIVE_HEIGHT*2) +#define LCD_TTB_AREA (TTB_SIZE + LCD_BUFFER_SIZE) +#endif #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_TTB_AREA -- cgit v1.2.3