FB: sync with N800 tree (support for dynamic SRAM allocations)
Subsystems (4)
PATCH 1/4 FB: sync with N800 tree (support for dynamic SRAM allocations)
- in addition to fixed FB regions - as passed by the bootloader - allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out from sram.c to fb.c
--- arch/arm/mach-omap1/io.c | 4 +- arch/arm/mach-omap2/io.c | 3 +- arch/arm/plat-omap/fb.c | 271 ++++++++++++++++++++++++++++++++---- arch/arm/plat-omap/sram.c | 60 ++------- include/asm-arm/arch-omap/omapfb.h | 5 + include/asm-arm/arch-omap/sram.h | 3 - 6 files changed, 261 insertions(+), 85 deletions(-)
arch/arm/mach-omap1/io.c +2 -2
@@ -17,11 +17,11 @@#include <asm/io.h> #include <asm/arch/mux.h> #include <asm/arch/tc.h> -#include <asm/arch/omapfb.h> extern int omap1_clk_init (void );extern void omap_check_revision (void );extern void omap_sram_init (void ); +extern void omapfb_reserve_sdram (void );/* * The machine specific code may provide the extra mapping besides the
@@ -121,7 +121,7 @@ void __init omap1_map_common_io(void)#endif omap_sram_init (); -omapfb_reserve_mem (); +omapfb_reserve_sdram (); }/*
arch/arm/mach-omap2/io.c +0 -0
zndex 4640d9a..c3dafcb 100644
arch/arm/mach-omap2/io.c +2 -1
@@ -29,6 +29,7 @@ extern int omap2_clk_init(void);extern void omap2_check_revision (void );extern void omap2_init_memory (void );extern void gpmc_init (void ); +extern void omapfb_reserve_sdram (void );/* * The machine specific code may provide the extra mapping besides the
@@ -94,7 +95,7 @@ void __init omap2_map_common_io(void)omap2_check_revision ();omap_sram_init (); -omapfb_reserve_mem (); +omapfb_reserve_sdram (); }void __init omap2_init_common_hw (void )
arch/arm/plat-omap/fb.c +241 -30
310 lines not on this page · raw message
arch/arm/plat-omap/sram.c +11 -49
84 lines not on this page · raw message
include/asm-arm/arch-omap/omapfb.h +5 -0
@@ -66,6 +66,10 @@#define OMAPFB_EVENT_READY 1#define OMAPFB_EVENT_DISABLED 2 +#define OMAPFB_MEMTYPE_SDRAM 0 +#define OMAPFB_MEMTYPE_SRAM 1 +#define OMAPFB_MEMTYPE_MAX 1 +enum omapfb_color_format {OMAPFB_COLOR_RGB565 =0 ,OMAPFB_COLOR_YUV422 ,
@@ -251,6 +255,7 @@ struct omapfb_mem_region {dma_addr_t paddr;void *vaddr;unsigned long size; +u8 type;/* OMAPFB_PLANE_MEM_* */ int alloc:1; };
include/asm-arm/arch-omap/sram.h +0 -3
@@ -20,9 +20,6 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, u32 mem_type);extern u32 omap2_set_prcm (u32 dpll_ctrl_val,u32 sdrc_rfr_val,int bypass); -extern int omap_fb_sram_plane; -extern int omap_fb_sram_valid; -/* Do not use these */ extern void sram_reprogram_clock (u32 ckctl,u32 dpllctl);extern unsigned long sram_reprogram_clock_sz;
Signature · 1 line
1.4.4.3.GIT
[email protected]
maintainerQuoted 4 lines · Imre Deak
- in addition to fixed FB regions - as passed by the bootloader - allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out fromsram.ctofb.c
Pushing to omap-upstream today.
Tony
Quoted 6 lines · Imre Deak
- in addition to fixed FB regions - as passed by the bootloader - allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out fromsram.ctofb.cSigned-off-by Imre Deak <[email protected]>
Quoted 8 lines
--- arch/arm/mach-omap1/io.c | 4 +- arch/arm/mach-omap2/io.c | 3 +- arch/arm/plat-omap/fb.c | 271 ++++++++++++++++++++++++++++++++---- arch/arm/plat-omap/sram.c | 60 ++------- include/asm-arm/arch-omap/omapfb.h | 5 + include/asm-arm/arch-omap/sram.h | 3 - 6 files changed, 261 insertions(+), 85 deletions(-)
OK, I verified: reverting this lets my H4 board boot. Alternatively, the fix is to get rid of a GCC warning, so that stack garbage doesn't get used ...
========= CUT HERE
Fix GCC-reported compile time bug which prevents booting when the framebuffer code is disabled.
arch/arm/plat-omap/fb.c +4 -1
@@ -327,7 +327,10 @@ unsigned long omapfb_reserve_sram(unsignunsigned long sram_vstart, unsigned long sram_size, unsigned long start_avail, - unsigned long size_avail) {} + unsigned long size_avail) +{ + return 0; +}#endif
Tony Lindgren
maintainerQuoted 30 lines · David Brownell
Quoted 6 lines · Imre Deak
- in addition to fixed FB regions - as passed by the bootloader - allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out fromsram.ctofb.cSigned-off-by Imre Deak <[email protected]>Quoted 8 lines
--- arch/arm/mach-omap1/io.c | 4 +- arch/arm/mach-omap2/io.c | 3 +- arch/arm/plat-omap/fb.c | 271 ++++++++++++++++++++++++++++++++---- arch/arm/plat-omap/sram.c | 60 ++------- include/asm-arm/arch-omap/omapfb.h | 5 + include/asm-arm/arch-omap/sram.h | 3 - 6 files changed, 261 insertions(+), 85 deletions(-)OK, I verified: reverting this lets my H4 board boot. Alternatively, the fix is to get rid of a GCC warning, so that stack garbage doesn't get used ...
========= CUT HERE
Fix GCC-reported compile time bug which prevents booting when the framebuffer code is disabled.Signed-off-by David Brownell <[email protected]>arch/arm/plat-omap/fb.c +0
-0@@ -327,7 +327,10 @@ unsigned long omapfb_reserve_sram(unsign unsigned long sram_vstart,
arch/arm/plat-omap/fb.c unsigned long omapfb_reserve_sram(unsign · line 336
Quoted 10 lines
arch/arm/plat-omap/fb.c +4
-1unsigned long sram_size, unsigned long start_avail, - unsigned long size_avail) {} + unsigned long size_avail) +{ + return 0; +}#endif
Pushing today.
Tony