From 9d73b518fc3c61640123f8499aab7f8373e41dbd Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 12 Sep 2012 15:38:42 +0200 Subject: sandbox: add sdl video support This will allow speed up the dev on framebuffer. By default the resolution is VGA but this can be changed via cmdline. We use a pthread to Flip the screen every 100ms as we can not detect when barebox update it as barebox simpliy write in a buffer. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- arch/sandbox/mach-sandbox/include/mach/linux.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/sandbox/mach-sandbox') diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h b/arch/sandbox/mach-sandbox/include/mach/linux.h index 5917fe93de..81f4946ab1 100644 --- a/arch/sandbox/mach-sandbox/include/mach/linux.h +++ b/arch/sandbox/mach-sandbox/include/mach/linux.h @@ -1,6 +1,8 @@ #ifndef __ASM_ARCH_LINUX_H #define __ASM_ARCH_LINUX_H +struct fb_bitfield; + int linux_register_device(const char *name, void *start, void *end); int tap_alloc(char *dev); uint64_t linux_get_time(void); @@ -20,4 +22,15 @@ struct linux_console_data { unsigned int flags; }; +extern int sdl_xres; +extern int sdl_yres; +int sdl_init(void); +void sdl_close(void); +int sdl_open(int xres, int yres, int bpp, void* buf); +void sdl_stop_timer(void); +void sdl_start_timer(void); +void sdl_get_bitfield_rgba(struct fb_bitfield *r, struct fb_bitfield *g, + struct fb_bitfield *b, struct fb_bitfield *a); +void sdl_setpixel(int x, int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a); + #endif /* __ASM_ARCH_LINUX_H */ -- cgit v1.2.3