diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-12 15:38:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-25 10:15:29 +0200 |
commit | 9d73b518fc3c61640123f8499aab7f8373e41dbd (patch) | |
tree | af61e6fd5a655afb46f66aa8ca7d0d68f2026c83 /arch/sandbox/board | |
parent | 910d0132905ca3ff12dddbcbceb94b4b5112ab5c (diff) | |
download | barebox-9d73b518fc3c61640123f8499aab7f8373e41dbd.tar.gz barebox-9d73b518fc3c61640123f8499aab7f8373e41dbd.tar.xz |
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 <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/board')
-rw-r--r-- | arch/sandbox/board/board.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c index 6bccd2cb6d..71efcc49e5 100644 --- a/arch/sandbox/board/board.c +++ b/arch/sandbox/board/board.c @@ -26,16 +26,37 @@ #include <mach/linux.h> #include <init.h> #include <errno.h> +#include <fb.h> + +struct fb_videomode mode = { + .name = "sdl", /* optional */ + .xres = 640, + .yres = 480, +}; static struct device_d tap_device = { .id = DEVICE_ID_DYNAMIC, .name = "tap", }; +static struct device_d sdl_device = { + .id = DEVICE_ID_DYNAMIC, + .name = "sdlfb", + .platform_data = &mode, +}; + static int devices_init(void) { register_device(&tap_device); + if (sdl_xres) + mode.xres = sdl_xres; + + if (sdl_yres) + mode.yres = sdl_yres; + + register_device(&sdl_device); + return 0; } |